[csswg-drafts] [css-syntax] Is `@charset` deprecated? (#9838)

romainmenke has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-syntax] Is `@charset` deprecated? ==
see :
- https://developer.mozilla.org/en-US/docs/Web/CSS/@charset
- https://github.com/mdn/content/pull/31076
- https://www.w3.org/TR/css-syntax-3/#charset-rule

> The `@charset` [CSS](https://developer.mozilla.org/en-US/docs/Web/CSS) rule specifies the character encoding used in the style sheet. Although the first character in `@charset` is the `@` symbol, it is not an [at-rule](https://developer.mozilla.org/en-US/docs/Web/CSS/At-rule). The [CSS syntax](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_syntax) module deprecates this rule, defining it as an unrecognized legacy rule to be dropped when a stylesheet is grammar-checked, but it is [fully supported in all browsers](https://developer.mozilla.org/en-US/docs/Web/CSS/@charset#browser_compatibility).

> Note: In CSS 2.1, [`@charset`](https://www.w3.org/TR/css-syntax-3/#at-ruledef-charset) was a valid rule. Some legacy specs may still refer to a @charset rule, and explicitly talk about its presence in the stylesheet.

One could read the MDN docs as : "`@charset` is deprecated".
But that is incorrect right?

Only parsing `@charset` as an at-rule and potentially exposing it as such was removed if I read `css-syntax-3` correct?

@tabatkins

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9838 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 23 January 2024 12:57:13 UTC