Skip to content

[css-syntax] "Drop first @charset rule" seems unneeded. #3464

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

Closed
tabatkins opened this issue Dec 20, 2018 · 3 comments
Closed

[css-syntax] "Drop first @charset rule" seems unneeded. #3464

tabatkins opened this issue Dec 20, 2018 · 3 comments
Labels
Closed Accepted by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-syntax-3 Tested Memory aid - issue has WPT tests

Comments

@tabatkins
Copy link
Member

In the comments in WICG/construct-stylesheets#84, @bzbarsky expresses some confusion as to the point of the "drop the first @charset rule" in the "parse a stylesheet" algorithm. After some review, I agree with him: I'm also confused!

I think this was added to express the previous Blink behavior of keeping @charset rules in the CSSOM, except for the first which was dropped. (Firefox apparently never dropped the first one...) Later, I went more scorched-earth and just declared that there was no such thing as a @charset rule (just an encoding declaring that happened to resemble one...), and so all @charset rules should be dropped from the CSSOM.

Since browsers seem to follow the newer Syntax advice to just drop all @charset rules, we can eliminate the explicit "drop first" rule from the spec.

Agenda+ to confirm with WG, as this spec is CR. ^_^ (I should also probably ask for republication, if I don't already have a pending permission...)

@tabatkins tabatkins changed the title [css-syntax] "Drop first @charset rule" seems unndeeded. [css-syntax] "Drop first @charset rule" seems unneeded. Dec 20, 2018
@fantasai
Copy link
Collaborator

(Fwiw, since it's CR, you'll need a DoC and a Changes list to publish.)

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed "Drop first @charset rule" seems unneeded., and agreed to the following:

  • RESOLVED: Drop the drop the first @charset rule
The full IRC log of that discussion <dael> Topic: "Drop first @charset rule" seems unneeded.
<TabAtkins> GitHub: https://github.com//issues/3464
<dael> TabAtkins: This is in CR so need resolution. Way back in the day when I wrote syntax I spec blink's behavior of dropping the first. I later changed things so char-set tules were not rules. None of the charset things show in cssom. Everyone adapted to that, at least blink and FF. There is no @charset so we can drop the requirement to drop the first
<dael> TabAtkins: Looking for obj and, if not, I'll fix the spec and then put together the stuff for publising
<dael> AmeliaBR: @charset is now an unrecognized rule or is it recognized as a parsing instruction and then removed from CSSOM?
<dael> TabAtkins: Unrecgnoized rule. It's dropped like and @foo rule
<dael> fantasai: Proposal is drop all instead of drop first?
<dael> TabAtkins: There's already rules to drop all. but there's also a rule to say drop first. This is nonsensical so I want to fix.
<dael> fantasai: So spec says in one place it's drop first and in another place drop all
<dael> TabAtkins: Yeah
<dael> astearns: I'm in favor of fixing things Boris finds confusing
<dael> fantasai: If Mozilla signs off I'm fine
<dael> TabAtkins: I think Boris effectively did
<dael> astearns: What about webkit?
<dael> astearns: Prop: Drop the drop the first @charset rule
<dael> RESOLVED: Drop the drop the first @charset rule
<dael> TabAtkins: This is the only unresolved thing. It's due for a publication so I'll put together DoC. But if no one objects I'd like ar esolution to publish
<dael> astearns: I'd like to see the DoC since it's been a long time.
<dael> TabAtkins: No problem. There's been a couple changes
<dael> astearns: I don't expect many, but knowing which will be useful
<dael> TabAtkins: Last publish was in 2014

@tabatkins tabatkins added the Tested Memory aid - issue has WPT tests label Jan 24, 2019
@tabatkins
Copy link
Member Author

Tested in web-platform-tests/wpt@388ba3a

@tabatkins tabatkins added Closed Accepted by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. labels Jun 28, 2019
@tabatkins tabatkins added this to the CSS Syntax 3 June 2019 CR milestone Jun 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted by CSSWG Resolution Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-syntax-3 Tested Memory aid - issue has WPT tests
Projects
None yet
Development

No branches or pull requests

3 participants