-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
allow ratio handling by element #213
Conversation
This looks to be specially useful when using bgset. |
Hi @sbehrends and @aFarkas , thanks for the comments. |
allow ratio handling by element
thx |
We have a similar need and have a patch which pulls out the aspect ratio from the CSS using CSS Custom Variables:
Would a pull request in that direction be appreciated? |
This is neat. As of browser support I'm not sure. I normally use the following technique to communicate between CSS -> JS: |
@jinty |
On Fri, Feb 26, 2016 at 11:46:34PM -0800, Alexander Farkas wrote:
Just trying to get over a nasty flu first... Brian Sutherland |
Handling the ratio allows you to add the {height} replacement in the images url.
Also, this is specially useful when some smart cropping service is available (like https://github.com/thumbor/thumbor).
FYI: the bgset plugin clones the attributes, so I added de data-ratio to be cloned also.