Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Import condition #7658
base: main
Are you sure you want to change the base?
Import condition #7658
Changes from 4 commits
a7974fa
679fe46
a02d7ef
e8275b5
5d9d2de
011aca7
ff457c8
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we update "says which media the resource applies to"? I'm personally not sure. The sentence here is supposed to be a statement of fact so it doesn't need to be super-accurate. But I feel like with the new value space maybe the current sentence becomes inaccurate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So to double-check, do we have implementer buy-in for changing not only
link
andstyle
, but alsometa
andsource
? I think it's best if we change them all, for consistency. But it is extra work, and some implementers might not be excited about doing that extra work so that you can do conditional meta theme colors.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The layer syntax would only have meaning in the
link
&style
elements - and is only needed on the former (the CSS syntax can be used directly insidestyle
). Other import conditions, such as support queries, may be useful on all three. We could narrow the scope of this PR to only the essential change, and expand later if desired?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do implementers want to do here?
Even for the
link
element,media
can be specified and is processed forpreload
in addition tostylesheet
. Do we want to check the value of theas
attribute for preloads and decide between media query list or import condition, or always treat as import condition forlink
?For images, videos, and
<meta name=theme-color>
, I think it doesn't make much sense to supportsupports()
since they don't import CSS stylesheets, but I don't feel strongly about it.We also have the
Link
HTTP header which per spec seems to always process themedia
header attribute regardless ofrel
(https://html.spec.whatwg.org/multipage/semantics.html#process-link-headers step 5).Link
supportspreconnect
andpreload
rels per spec (notstylesheet
).