-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Docs: Data URI for transparent gif has type #587
Comments
I just updated a code I'm working on and I didn't like the results. I have a list of articles. Featured articles should have images 100% wide on mobile. So: How was this transparent gif idea tested? With or without the I can, sure, fix this using classes, but should a "non-existent" image version be rendered, even if it is just 1×1 pixel? Isn't this a hack for something like |
If you've set a 100% width on the images, then yes, I'd expect them to scale while maintaining their aspect ratio. The 1x1 pixel is a bit of a hack. That being said, I don't think the intent of srcset or picture is to switch between displaying images and not displaying them, but the 1x1 pixel image does achieve that. |
Thanks, @quoo . Sadly we can't point one specific CSS selector to these images. Thank you for your attention. |
@robsonsobral since this is a spec issue (with a discussion at the link afarkas posted), I'm going to close this issue out for now. If you'd like this to stay open, please let us know. Another option for you would be to use attribute selectors with CSS, allowing you to target the images without adding a class selector. Something like |
In the docs you recommend using a transparent data uri gif:
There needs to be a
;
betweengif
andbase64
as follows:data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==
Please consider updating the docs.
The text was updated successfully, but these errors were encountered: