W3C home > Mailing lists > Public > www-style@w3.org > February 2013

[css3-syntax] Style rules as a syntactic construct vs. selector + declarations that apply to elements

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Thu, 07 Feb 2013 00:22:12 -0700
Message-ID: <51135624.9050405@kozea.fr>
To: www-style@w3.org

Proposed changes

* Maybe rename "style rule" to something that only reflect the syntax 
and not the semantics. Ideas for the name? Tab had "qualified 
declaration block".
* Rename "selector" (in Syntax only) to "X prelude", where X is the 
result of the above. This parallels nicely with "at-rule prelude".
* Remove the definition of X being a Selector + declarations that apply 
to elements.
* For top-level style rules, have that definitions in css3-cascade. 
(css3-animation and css3-conditional already define how to interpret 
nested stuff with the style rule syntax.)


If we want this, I can make the edits in a branch and make a pull 
request for review. (Yes, you read that last part right. More on that 
soon ^_^)


So in css3-syntax, a stylesheet is basically tree of style rules, 
at-rules and declarations. The module says very little on how to 
interpret them, expect for this part of ß2:

> A style rule starts with a selector (defined by the Selectors
> specification[1]), then has a {}-wrapped block containing a sequence of
> declarations. The selector specifies which elements the declarations
> will apply to.
> [1] http://www.w3.org/TR/selectors/

But this is not always the case. For example, @keyframes rules contain 
stuff that use the style rule syntax but have "keyframe selectors" 
rather than Selectors selectors. On the other hand, @page rules also 
have "page selectors" but are not style rules.

An addition, some languages such as Disruptive Innovationsís STTS [2] or 
Tab Atkinsís CAS [3] use the CSS syntax but are not CSS. These will have 
their own semantics for stuff that use the style rule syntax. Our 
charter explicitly mentions such usage of the CSS syntax.

[2] STTS: http://disruptive-innovations.com/products/#STTS
[3] Cascading Attribute Sheets: http://www.xanthir.com/b4K_0

Simon Sapin
Received on Thursday, 7 February 2013 07:22:43 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:26 UTC