W3C home > Mailing lists > Public > www-style@w3.org > August 2012

[css3-animations][css3-conditional][css3-syntax] spaces after ATKEYWORD should not be required (was: [css3-conditional] value of CSSSupportsRule.conditionText)

From: Kang-Hao (Kenny) Lu <kennyluck@csail.mit.edu>
Date: Mon, 06 Aug 2012 18:54:02 +0800
Message-ID: <501FA24A.9070604@csail.mit.edu>
To: WWW Style <www-style@w3.org>
(12/08/06 15:16), L. David Baron wrote:
> That might make sense in many cases, but I'm not sure it works as a
> general rule; there are places in CSS where white space between
> tokens does make a difference (in particular, in selectors:
> "div/**/p" is not a valid selector while "div p" is).

This reminds me that css3-animations and css3-conditional probably
shouldn't require spaces after ATKEYWORD. Namely,

  keyframes_rule: KEYFRAMES_SYM S+ IDENT S* '{' S* keyframes_blocks '}'

in css3-animations and

  : SUPPORTS_SYM S+ supports_condition group_rule_body


  : DOCUMENT_SYM S+ url_match_fn ( "," S* url_match_fn )*

in css3-conditional should undergo a s/S+/S*/. Note that, according to
CSS 2.1 Appendix G, @media has

  : MEDIA_SYM S* media_list '{' S* ruleset* '}' S*

and every browser implements this (tested with:

  data:text/html,<style>@media/**/all { body { background: green; }

on IE9, Firefox 14, Chrome 21 and Opera 12.50 internal). Firefox 14,
Chrome 21 and Opera 12.50 implement S* instead of S+ for @keyframes too,
and I would be very shocked if IE 10 does S+...

(tested with

  data:text/html,<style>@keyframes/**/test {from{background: green}
to{background: green}} body {animation: test infinite 1s;}</style>

I think css3-syntax should have normative statement about this as it's
not a good idea to reason based on something we intend to make
deprecated, namely, CSS 2.1 Appendix G.

Web Specialist, Oupeng Browser, Beijing
Try Oupeng: http://www.oupeng.com/
Received on Monday, 6 August 2012 10:54:39 UTC

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