Re: [css-syntax] ISSUE-329: @charset has no effect on stylesheet??

On 15/01/2014 14:53, Anne van Kesteren wrote:
> On Wed, Jan 15, 2014 at 2:47 PM, Richard Ishida <ishida@w3.org> wrote:
>> I don't think it's true that "The @charset rule has no effect on a
>> stylesheet.", otherwise why would you use it at all, and how would you
>> detect the fallback encoding?
>
> You don't use an @charset rule. You use a byte sequence that looks
> like "@charset" when interpreted in an ASCII-compatible encoding. A
> BOM for CSS so to say, but unlike a BOM, it ends up being part of the
> data model as well, as a useless @charset rule, because we suck.

Yeah, I get that, but it all seems a bit like angels on pinheads staring 
at their navels ;-)

But currently that means that section 8.2 currently is actually 
describing something that is never of any use, even though it says it is 
("associated with determining the character encoding of the stylesheet") 
and gives (some) rules for it's use ("invalid if it is not at the 
top-level of a stylesheet, or if it is not the very first rule of a 
stylesheet").

I don't expect that the ordinary user of CSS will see any sophistication 
here - for them this is just an @-rule with some special characteristics 
that they need to get right if it's going to be effective. Why don't we 
just frame it that way in the spec?  I think the benefit would be that 
(a) it's more straightforward, and (b) that it doesn't make it look like 
we suck (instead, those people who don't follow the special rules would 
just make pages that suck).


RI

Received on Wednesday, 15 January 2014 15:22:45 UTC