-
Notifications
You must be signed in to change notification settings - Fork 27
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
css image-set() #144
Comments
I added some comments in support of this in #156 |
Some items that pointed out on the issue #156:
|
What do you mean by this? It has universal support (97% in the wild), but there is varying levels of support for it. Source: https://caniuse.com/css-image-set |
@atjn image-set on background images: https://caniuse.com/mdn-css_properties_background-image_image-set |
@fellyph image-set on background images is the same as image-set. There is no image-set for something else. The MDN data you are linking to is unfortunately not up to date - it should show the same support that is shown in my source. You can validate this by looking at the Web Platform Tests: https://wpt.fyi/results/css/css-images/image-set |
Briefly looking through test results:
Given the difficulty Safari had with aliasing For the curious, Gmail contains a variety of declarations (for a variety of class names) like: .klass:before {
content: "";
content: -webkit-image-set("" 1x, "" 2x)
} It's not immediately clear to me what the goal of these declarations is. |
My understanding of the purpose of this process is to let browser vendors know what it is that developers want. As a developer I want parity between what I can do with images in HTML and CSS. Cross browser consistent support of The original -webkit syntax was, if i remember correctly, a Safari unoff that was later made into a spec with some significant changes. The tests as created by Firefox during their implementation treat the -webkit version as a faux |
@gsnedders on the aliasing issue, how about we include that with an understanding that the Chrome team will work with the Gmail team to fix that problem, but if we fail we change/exclude the tests in question? |
There were some mentions of this feature in State of CSS 2022, although not enough to make the top list in #248. 18 mentions is almost 1% of the 1995 responses, and these are the ones that included some detail:
|
In the MDN short survey on CSS & HTML, "CSS images ( Since this option bundled together multiple proposals we can't know what resonated, but given the State of CSS results I'm fairly certain it was mostly |
There has been some movement on There are now 2 new bugs: Issue 1399341: Support type() notation in css image-set() Issue 1394277: Fix dynamic image-set related tests |
Thank you for proposing CSS image-set() for inclusion in Interop 2023. We are pleased to let you know that this proposal was accepted as part of the Web Compatibility focus area. You can follow the progress of this Focus Area on the Interop 2023 dashboard. For an overview of our process, see the proposal selection summary. Thank you for contributing to Interop 2023! Posted on behalf of the Interop team. |
Description
The CSS
image-set()
function adds HTML<picture>
element like negotiation of different image resolutions and files types functionality to CSS.Rationale
<picture>
functionality for CSS images is long overdue.<picture>
is being used as an absolute positioned "background" to work around this issue. This breaks the separation of content and style but is a reasonable thing to do right now to get the functionality.Specification
https://drafts.csswg.org/css-images-4/#image-set-notation
Tests
https://wpt.fyi/results/css/css-images/image-set?label=experimental&label=master&aligned
The text was updated successfully, but these errors were encountered: