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

Re: [CSS2.1] syntax: url() and unexpected end of (line / style sheet)

From: Zachary Weinberg <zweinberg@mozilla.com>
Date: Wed, 14 May 2008 10:11:30 -0700 (PDT)
To: Bjoern Hoehrmann <derhoermi@gmx.net>
Cc: www-style <www-style@w3.org>
Message-ID: <23369397.96701210785090405.JavaMail.root@cm-mail02.mozilla.org>

----- "Bjoern Hoehrmann" <derhoermi@gmx.net> wrote:
> * Zachary Weinberg wrote:
> >1) "User agents must close all constructs (nonexhaustive list) at
> >the end of the style sheet."  Because URI is a single token rather
> >than a grammar production, it is not clear whether it counts as a
> > "construct" for this rule.
> No, a token cannot be open in this sense[...]. So you parse it like
> other tokens, in your example
> >  <style>#foo { background-image: url("picture.png</style>
> close the string, close the ), and have an unknown functional
> notation.

Let me make sure I understand you: there is no URI token here, so
the lexer should back up and tokenize this as

  FUNCTION[url(] STRING["picture.png"] ')'

with the close quote and close paren provided by the "close open
constructs" rule.  This token sequence is an invalid argument to
background-image:, so the rule is dropped.  Correct?

If so I would argue that this is inconsistent with the treatment of
other things that have the form of function application, e.g.

  <style>#foo { background-color: rgb(12,34,56</style>

and the spec should be changed somehow, so that either both or
neither of those are valid.

> >Tangential question 2: Is there any |value|, either in CSS2.1 or any
> >proposed CSS3 module, whose syntax contains square brackets? 
> Square bracket blocks are part of "any" in CSS 2.1, which is part of
> "value".

Yes, but to use that in a test case, I need a construct where
square bracket blocks are *meaningful* in a value, not just
allowed in the generic syntax.  Sorry for being unclear.

Received on Wednesday, 14 May 2008 17:12:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:36 UTC