-
Notifications
You must be signed in to change notification settings - Fork 8
Add alt and class #4
base: master
Are you sure you want to change the base?
Conversation
%s(tiny@2x) => "640x", | ||
%s(small@2x) => "960x", | ||
%s(medium@2x) => "1536x", | ||
%s(large@2x) => "2000x", | ||
%s(large@2x) => "3200x" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are there two large@2x's? I think that may want to be changed to huge?
To add a class to the picture tag: | ||
|
||
```erb | ||
<%= picture_tag(image_path, picture_class: "some_class"}) %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@levibrown I think it would be better if this behaved like image_tag
. Namely, the html class and alt should be passed in options with keys class
and alt
. http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html#method-i-image_tag
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I added a commit to fix the readme large/huge typo. @jlsuttles, thoughts on the rest of the PR? |
@levibrown Hey! Are you using this branch? We should probably get it merged in. |
@jlsuttles As far as I know nobody is using this branch. Should be good to merge. |
adds alt attr to the picture tag element and the ability to add a class.