Re: [css3-mediaqueries] Request for feedback on syntax

Anne van Kesteren wrote:
> 
> On Sat, 22 Dec 2007 17:45:10 +0100, fantasai 
> <fantasai.lists@inkedblade.net> wrote:
>> If you kept the media query in a string, then you wouldn't have a problem
>> with the other punctuation. But character escapes usually work in string
>> literals, too.
> 
> Yes, so in such a theoretical language you'd have to escape the CSS 
> escape so that the CSS escape makes it to the media query processor.

Yeah, I think that's dumb.

Let's take a less theoretical example.
Let's assume my host language is JavaScript.
And I want to quote a Selector as a string. (I assume we want to have the same
escaping rules for Selectors as we do for Media Queries.)

You telling me that if I sent an argument to querySelector() that happened to
have a backslash in it (dutifully escaped JavaScript-style as '\\' if I'm writing
it as a literal), the backslash should magically disappear... or combine with the
next character to turn into some random other character?

~fantasai

Received on Monday, 24 December 2007 05:55:53 UTC