W3C home > Mailing lists > Public > www-style@w3.org > July 2001

multiple declarations-blocks in style attribute

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Mon, 30 Jul 2001 22:48:00 +0200
To: www-style@w3.org
Cc: bert@w3.org
Message-ID: <iugbmt0i42ka341hh5u9ilis95odhma41k@4ax.com>

   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

[1] http://www.w3.org/TR/2001/WD-css-style-attr-20010305

Björn Höhrmann { mailto:bjoern@hoehrmann.de } http://www.bjoernsworld.de
am Badedeich 7 } Telefon: +49(0)4667/981028 { http://bjoern.hoehrmann.de
25899 Dagebüll { PGP Pub. KeyID: 0xA4357E78 } http://www.learn.to/quote/
Received on Monday, 30 July 2001 16:49:08 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:26:58 UTC