Skip to content
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

Add support for pixel density in asset breakpoint object #3

Closed
weotch opened this issue Nov 30, 2016 · 2 comments
Closed

Add support for pixel density in asset breakpoint object #3

weotch opened this issue Nov 30, 2016 · 2 comments

Comments

@weotch
Copy link
Member

weotch commented Nov 30, 2016

From previous asset docs:


You an also specify pixel density constraints:

:image='{ 500: 'image-mobile.png', '500@2': 'image-tablet-2x.png' }'
weotch added a commit that referenced this issue Nov 30, 2016
@weotch
Copy link
Member Author

weotch commented Dec 6, 2016

An easy way to implement this is to map through the config before it is processed, parsing the @ delimiter out and multiplying the left side by the right side. And then, when reading the current width in deciding which image to show, multiple the screen width by the pixel density.

@weotch
Copy link
Member Author

weotch commented Mar 29, 2020

We'll get this via srcset in 2.0.

@weotch weotch closed this as completed Mar 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant