W3C home > Mailing lists > Public > www-style@w3.org > May 2013

Re: [cssom] Rationale for including (or not) CSSCharsetRule

From: Glenn Adams <glenn@skynav.com>
Date: Tue, 28 May 2013 08:31:07 -0600
Message-ID: <CACQ=j+e8yYT0T92Jk_h3mev_fywUPuJMkYG=ZP-ipwpLTevMZQ@mail.gmail.com>
To: Simon Sapin <simon.sapin@exyr.org>
Cc: Simon Pieters <simonp@opera.com>, "www-style@w3.org" <www-style@w3.org>, Anne van Kesteren <annevk@annevk.nl>
On Tue, May 28, 2013 at 8:24 AM, Simon Sapin <simon.sapin@exyr.org> wrote:

> Le 28/05/2013 21:21, Simon Pieters a écrit :
>  Hi Glenn and Anne
>> In
>> http://dev.w3.org/cvsweb/~**checkout~/csswg/cssom/Attic/**
>> Overview.html?rev=1.166;**content-type=text%2Fhtml#**history<http://dev.w3.org/cvsweb/~checkout~/csswg/cssom/Attic/Overview.html?rev=1.166;content-type=text%2Fhtml#history>
>> CSSCharsetRule was obsoleted because it was "not deemed necessary".
>> In https://dvcs.w3.org/hg/csswg/**rev/961ed47ad0fc<https://dvcs.w3.org/hg/csswg/rev/961ed47ad0fc>it was restored by Glenn.
>> I could not find any discussion about either of these decisions. If I
>> missed it, please provide a pointer.
>> Could both of you please elaborate on the rationale regarding
>> CSSCharsetRule?
>> If anyone else has opinions about CSSCharsetRule, please state them.
> @charset is not a rule comparable to @import, it’s closer to a BOM. It’s
> not something defined in terms of component values, tokens, or even
> characters, it’s an exact byte pattern that is matched before tokenization
> even starts.
> What would it mean to add or change a CSSCharsetRule on a parsed
> stylesheet?

I agree it doesn't have that much utility. One could construct a
CSSStyleSheet from scratch and then use CSSCharsetRule for serializing
APIs. But removing/replacing a rule on an in-memory style sheet wouldn't
cause an encoding change to occur.

Again, my only reason for suggesting it be retained is for backwards
compatibility (for old JS code that happens to reference it... don't ask my
to tell you which old JS code is using it though).
Received on Tuesday, 28 May 2013 14:32:04 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:30 UTC