-
Notifications
You must be signed in to change notification settings - Fork 609
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
Does not work with inline CSS #224
Comments
It scans img tags. Why you would ever use inline CSS? :P |
It has its uses |
@SimonFricker Do you mean it doesn't work with background images inserted via inline CSS? If so, we'd recommend you use one of our sass or less mixins. The problem is that if the script were to try and effect inline styles, we'd lose a lot of performance because 1) we'd have to run a check for a background style on every element in the DOM and 2) when we did find those elements, there would be a LOT of dirty regex work that would have to take place. In our opinion, it's better to use the mixins because they generate media queries, which are a much better way of handling image swapping via CSS. |
@JoshCarey Alright, you've convinced me. I'll see if I can squeeze something into 2.0. |
@JoshCarey this was my exact use case too. |
Ok guys, it's official. We'll be supporting inline background images in version 2.0 which is currently in active development. |
I have this exact scenario, and I see in the documentation that this seems to have been implemented, but isn't actually working for me. Any updates? |
@tb9jen Are you using version 2? If so, let me know what you're seeing and I'll take a look. |
Thanks, I got it working by calling window.retinajs(); after the page was done loading. I think what was happening is that the thumbnail from WP wasn't loaded until after it ran the first time but it seems to be working now. |
Great! Let us know if you have any other issues. |
Does not work with inline CSS :(
The text was updated successfully, but these errors were encountered: