This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
http://dev.w3.org/csswg/cssom/#csscharsetrule Need a decision to converge on, and the counter makes it seem likely safe to remove: https://www.chromestatus.com/metrics/feature/timeline/popularity/426
The use counter counts usage of CSSCharsetRule#encoding but compat problems could manifest without using that attribute, e.g. by assuming a certain index for a later rule in cssRules. I recommend removing it in one of the browsers. If it sticks I'll remove it from the spec.
You you write a sentence or two why you want to get rid of CSSCharsetRule from the spec, for reference in an Intent to Remove? If you could mark it as at risk or something in the spec that would be nice too.
http://dev.w3.org/csswg/css-syntax/#charset-rule explains a bit why it doesn't make sense to have it in the object model. Also see http://www.w3.org/mid/op.wxt85uaqidj3kv@simons-macbook-pro.local * @charset is a syntax construct that should not be part of the object model, much like the BOM and comments are not part of the object model. * When parsing a stylesheet, the first few bytes are scanned for a specific byte pattern to select an encoding. When the actual CSS parser comes to the @charset rule, it is parsed with normal @-rule syntax rules, which is laxer than the scanner. Thus the object model can be claiming an encoding that was not actually picked up by the @charset scanner. * CSSCharsetRule can be modified but that does not change the encoding of the stylesheet. * CSSCharsetRule complicates other parts of CSSOM e.g. insertRule, removeRule, CSSNamespaceRule. I've marked it as being considered for removal in the spec: https://dvcs.w3.org/hg/csswg/rev/86a5f6f5df18
Thanks, I'll try to get it removed from Blink and let you know how it goes!
It's been removed in Blink, but hasn't reached the stable channel yet: https://code.google.com/p/chromium/issues/detail?id=438147
The removal reached stable with M41 and Chrome 41 was released on March 3. I haven't heard anything and can't find any bug report, so it worked out well. Please remove from spec :)
OK, removed. https://github.com/w3c/csswg-drafts/commit/a7d1486917739758f84e3324d8082632f94509a8 Tab, please make css-syntax not create an at-rule for @charset and then reassign to me, so CSSOM doesn't need to check for it in insertRule.
(In reply to Simon Pieters from comment #7) > Tab, please make css-syntax not create an at-rule for @charset and then > reassign to me, so CSSOM doesn't need to check for it in insertRule. Done. It's now explicitly defined as not a valid rule, and the first one in a stylesheet is explicitly dropped during stylesheet parsing, so grammar-checking that requires some rules (like @import) to be first in the stylesheet won't get messed up.
https://github.com/w3c/csswg-drafts/commit/8398f6ff88eafc91b307919d6a9ce8fe52a0e750
Thanks all!