-
Notifications
You must be signed in to change notification settings - Fork 673
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
[mediaqueries-4][css-cascade-5] Restrict 'layer' from the <media-type> production? #7225
Comments
Agenda+ bc it should be a tiny discussion, and we'll need a resolution if we go with my suggestion to fix MQ4. |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: [mediaqueries-4][css-cascade-5] Restrict 'layer' from the <media-type> production?<dael> github: https://github.com//issues/7225 <dael> florian: We have a syntax ambig. When you do @import if you write @import <url> layer it could either mean import layer or it could be a MQ for a media type called layer <dael> florian: TabAtkins suggests in MQ 4 spec we declare layer cannot be a media type so if you try and parse that way it's a syntax error. When used in MQ it wouldn't work and when in @import it's a layer <dael> florian: Mostly doesn't change anything b/c layer isn't a valid media type and is not proposed. Error handling is slightly different. if you do @media not-layer it would handle differently. unlikely this is being done <dael> florian: I think TabAtkins suggestion is good and we should go for it <dael> Rossen_: Process question- MQ 4 is a CRD. How close are we...would that reset anything in terms of MQ 4 process? <Rossen_> q? <dael> florian: I don't think it would. MQ 4 is largely waiting on test and impl. It's not really a new feature, it's error handling. Adding it to 5 would make 5 incompat with 4 and we'd have to patch 4 eventually. <dael> florian: Poss errata MQ 3 <dael> Rossen_: Yeah, do we need to? <dael> florian: Probably in ED at first, let it sit to make sure we don't change our mind, then include as a prop correction <dael> Rossen_: Sounds good. Let's proceed with MQ 4 <dael> Rossen_: Additional suggestions or ideas? <dael> Rossen_: TabAtkins is trying to join <dael> florian: We're taking his proposal anyway <TabAtkins> yeah, no need to comment <dael> Rossen_: Not hearing anything else <dael> florian: Prop: In all levels of MQ we will make 'layer' syntactically invalid media type <dael> Rossen_: Obj? <dael> RESOLVED: In all levels of MQ we will make 'layer' syntactically invalid media type <dael> Rossen_: We'll worry about errata later <dael> florian: I'll put in the ED for now |
frivoal
added a commit
to web-platform-tests/wpt
that referenced
this issue
May 5, 2022
moz-v2v-gh
pushed a commit
to mozilla/gecko-dev
that referenced
this issue
May 16, 2022
…edia type, a=testonly Automatic update from web-platform-tests tests for error handling of layer as a media type Based on w3c/csswg-drafts#7225 -- wpt-commits: bed0261ca3f7826bf56b149be069a38288102082 wpt-pr: 33940
jamienicol
pushed a commit
to jamienicol/gecko
that referenced
this issue
May 25, 2022
…edia type, a=testonly Automatic update from web-platform-tests tests for error handling of layer as a media type Based on w3c/csswg-drafts#7225 -- wpt-commits: bed0261ca3f7826bf56b149be069a38288102082 wpt-pr: 33940
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
@nex3 brought up that the grammar for @import is technically ambiguous at the moment:
@import url(foo) layer
could parse as thelayer
keyword to trigger a Cascade Layer, or as an unknown<media-type>
, since<media-type>
is just<ident>
, with a few restricted keywords.We could fix this either at the
@import
location, specifying thatlayer
cannot match<media-type>
there, or directly in MQ, restrictinglayer
from ever being a<media-type>
.The only effect of restricting it at the
<media-type>
level, fwiw, is thatnot layer
will change from matching (because it's negating an unknown media type) to not matching (because it's an invalid keyword, so the whole MQ turns intonot all
). Any other case will be equivalent in matching behavior, but will serialize differently (becomingnot all
rather than preserving the original MQ). I think it's, uh, exceedingly unlikely anyone has ever writtenlayer
for a media type in the first place, tho, so we should be good.The text was updated successfully, but these errors were encountered: