multiple declarations-blocks in style attribute


   The grammar of the current proposal [1] is as follows:

    : S* [ declarations |
           declarations-block |
           inline-ruleset* |
           stylesheet ]
    : declaration [ ';' S* declaration ]*
    : '{' S* declarations '}' S*
    : [ pseudo* S* [ ',' S* pseudo* S* ]* ]?

This grammar

  * allows multiple declarations-blocks because the pseudo
    elements/attributes are optional, e.g.

    style='{color: red} {background-color: green}'

    though they will be recognized as different tokens. Shouldn't the
    grammar allow just multiple declarations-blocks, i.e.
    declarations-block* for the inline-stylesheet production rule? Or is
    this not intended?  I hope it is, this eases it to concatenate
    multiple style attributes in HTML Tidy :-)

  * allows complete stylesheets, e.g.

    <p style='em { font-weight: 900 }'>...<em>...</em>...</p>

    is the current element considered the root element when matching W3C
    selectors? What specifity do they have?

    This leads also to the fact, that one may use

    <p style="@import 'stylesheet'">...</p>

    How are those imports to be handled by user agents? Same goes for
    @media, @page, etc.pp.

    To me it doesn't make sense to add the stylesheet token to the
    allowed tokens in inline-stylesheets.

  * doesn't mention that comments are allowed between tokens. The CSS 
    Levle 2 grammar doesn't, too, but it states it in the normative part
    of the specification. I suggest to add some note that they are


Björn Höhrmann { }
am Badedeich 7 } Telefon: +49(0)4667/981028 {
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 }

Received on Monday, 30 July 2001 16:49:08 UTC