Re: [CSS21] deciding on errata to CSS 2.1 (was Re: Errata to disallow 'inherit' after comma in 'font-family')

Le Ven 4 mai 2012 21:36, Tab Atkins Jr. a écrit :


> [ <string> | <ident>+ ]# | inherit
>
> ...and then explicitly disallow 'inherit' as an <ident> value.


>From left to right:

Brackets ([ ]) are for grouping.

<string> (...) consists of a sequence of characters delimited by double
quotes or single quotes.
3.3. Quoted Strings: the ‘<string>’ type
http://www.w3.org/TR/css3-values/#strings

A bar (|) separates two or more alternatives: exactly one of them must occur.

<ident>: user-defined identifier acting as a component value which
represents any valid CSS identifier that does not otherwise appear as a
pre-defined keyword in that property's value definition.
3.2. User-defined Identifiers: the ‘<identifier>’ type
http://www.w3.org/TR/css3-values/#identifiers

A plus (+) indicates that the preceding type, word, or group occurs one or
more times.

A hash mark (#) indicates that the preceding type, word, or group occurs
one or more times, separated by comma tokens.
2.3. Component value multipliers
http://www.w3.org/TR/css3-values/#component-multipliers

So, under all these contraints..


  div#firstTest {font-family: inherit, "CSSTest Fallback";} /* invalid,
just like before; no change */

  div#secondTest {font-family: "CSSTest Fallback", inherit;} /* invalid,
just like before; no change */

  div#thirdTest {font-family: inherit foo, "CSSTest Fallback";} /* invalid
now; one identifier is pre-defined keyword value */

  div#fourthTest {font-family: foo inherit, "CSSTest Fallback";} /*
invalid now; one identifier is pre-defined keyword value */

  div#fifthTest {font-family: foo, inherit bar, "CSSTest Fallback";} /*
invalid now; one identifier is pre-defined keyword value */

  div#sixthTest {font-family: foo, bar inherit, "CSSTest Fallback";} /*
invalid now; one identifier is pre-defined keyword value */

  div#seventhTest {font-family: "inherit" foo bar, "CSSTest Fallback";} /*
invalid: it's either one string or 1+ identifiers */

  div#eighthTest {font-family: fooinherit, serif;} /* valid, just like
before; no change */

  div#ninthTest {font-family: foo, barinheritbox, serif;} /* valid, just
like before; no change */

  div#tenthTest {font-family: inheritfoo, serif;} /* valid, just like
before; no change */


Also, from
http://lists.w3.org/Archives/Public/www-style/2012Apr/0080.html
Kang-Hao (Kenny) Lu

 div {font-family: xxx inherit;} /* invalid now; one identifier is
pre-defined keyword value (1a.) */

 div {font-family: inherit xx;} /* invalid now; one identifier is
pre-defined keyword value (1b.) */

 div {font-family: xxx, inherit; /* invalid, just like before; no change */

 div {font-family: inherit, xxx;} /* invalid, just like before; no change */



Gérard
-- 
CSS 2.1 Test suite RC6, March 23rd 2011
http://test.csswg.org/suites/css2.1/20110323/html4/toc.html

Contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

Web authors' contributions to CSS 2.1 test suite
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/web-authors-contributions-css21-testsuite.html

Received on Sunday, 6 May 2012 05:09:45 UTC