zwol: stylized sketch of a face in profile (Default)
[personal profile] zwol

In CSS, url() is defined as part of the lexicon, not the grammar. If you write

  .x { background-image: url(  "foo/bar"  ) }

everything from the u up to the close parenthesis is ONE TOKEN. As far as I can tell, the only effect this has on anything is to make it more difficult to implement a CSS parser.

Date: 2008-05-10 02:09 am (UTC)
ext_39218: (Default)
From: [identity profile] graydon.livejournal.com
"CSS: look, at least it's not as hard to parse as SGML!"

Hmm. Not really the snappy motto you'd hope for.

Date: 2008-05-10 02:50 am (UTC)
From: [identity profile] zwol.livejournal.com
I'm trying to decide whether there's anything that would notice if Moz implemented the parser as if the grammar was the way it shoulda been written in the first place: URI becomes a nonterminal defined as

uri : "url" '(' S* [ STRING | URILITERAL ] S* ')'


and URILITERAL is a new terminal that does the unquoted case. There might be a visible change to error recovery, I don't know. Bleah.

April 2017

S M T W T F S
      1
2345678
9101112131415
16171819 202122
23242526272829
30      

Style Credit

Expand Cut Tags

No cut tags
Page generated Jan. 2nd, 2026 11:30 pm
Powered by Dreamwidth Studios