-
Notifications
You must be signed in to change notification settings - Fork 774
Description
CSS Style Attributes has been a Recommendation since 2013-11-07. It consists of hardly more than boilerplate and stating the obvious by reciting the grammar for its attribute value:
declaration-list
: S* declaration? [ ';' S* declaration? ]*
;I would have assumed that the ED would be equal to that state, because it bears no sign of being a more recent level. Alas, it is currently dated 2015-04-15, i.e. about one and a half years later than the REC, but names the 2013-10-03 PR as its preceding version, both at the top and in its Changes section. The differences mentioned there apparently never made it into the published specification:
Parse at-rules in declaration lists to allow future extension.
style-attribute
: S* declaration-list
;
declaration-list
: declaration [ ';' S* declaration-list ]?
| at-rule declaration-list
| /* empty */
;I believe the Level 1 ED should be reset to what the REC says, unless this difference is considered an erratum. In the latter case, the WG should strive to finally publish this in /TR. Otherwise, if it still seems relevant, it should become part of a newly created CSS Style Attributes Level 2 ED, which would also address that there now are indeed at-rules within declaration blocks – @media in particular – and even nested style blocks with & selectors.
Note that as it stands, at least in theory, a CSS-enabled user agent does not have to support Selectors at all for styling a document language with a style attribute –and absolutely no at-rules either. (That could be another argument why it is a bad idea to introduce selectors on the right-hand side of the colon.)
I think I remember proposals from 15+ years ago that asked for pseudo-class support within style attributes. The text in css-nesting and css-syntax, however, read as if nested selectors have been deliberately omitted from attribute values, since <declaration-list> excludes at-rules and ”qualified rules“.
I am surprised that not more authors assume that nested rules worlds work in style attributes.