Re: [css-syntax] i18n-ISSUE-306: reference to space character

On Wed, Jan 15, 2014 at 2:24 PM, John Cowan <cowan@mercury.ccil.org> wrote:
> Tab Atkins Jr. scripsit:
>> @charset    'iso-8859-1';
>> .foo© { color: red; }
>>
>> Totally valid CSSCharsetRule shows up in the stylesheet.  Assuming
>> that the file is actually saved in iso-8859-1, though, the @charset
>> has zero effect, and the © symbol is corrupted.  Remove the extra
>> whitespace, change to double-quote chars, and it'll work.
>
> Feh.  Do we really suck so much that this result is unavoidable?  I'd like
> to see the syntax definition of the @charset rule narrowed to match the
> @charset marker.  Is that impossible?

Doing so is more trouble than its worth.  The CSS tokenizer doesn't
care what string-quoting character was used, or how many whitespace
characters are in a run, so that information isn't preserved into the
parsing stage.  Let's not add layering violations just to "fix"
something that still wouldn't work anyway (since it *still* doesn't
actually do anything, despite being mutable/constructable).

I still have an action from months ago to investigate actual usage of
CSSCharsetRule, to see if we can just drop it entirely from the CSSOM.
 I'll bet we can.

~TJ

Received on Wednesday, 15 January 2014 23:35:13 UTC