2828
2929 < h1 > CSS Values and Units Module Level 3</ h1 >
3030
31- < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 16 July 2012</ h2 >
31+ < h2 class ="no-num no-toc " id =longstatus-date > Editor's Draft 17 July 2012</ h2 >
3232
3333 < dl >
3434 < dt > This version:
3535
3636 < dd > < a
37- href ="http://www.w3.org/TR/2012/ED-css3-values-20120716 / "> http://www.w3.org/TR/2012/ED-css3-values-20120716 /</ a >
37+ href ="http://www.w3.org/TR/2012/ED-css3-values-20120717 / "> http://www.w3.org/TR/2012/ED-css3-values-20120717 /</ a >
3838
3939 < dt > Latest version:
4040
@@ -394,14 +394,21 @@ <h3 id=component-types><span class=secno>2.1. </span> Component value types</h3>
394394 < p > Some property value definitions also include the slash (/) and/or the
395395 comma (,) as literals. These represent their corresponding tokens.
396396
397- < p > All CSS properties also accept the keyword values ‘< a
398- href ="#inherit "> < code class =css > inherit</ code > </ a > ’ and ‘< a
399- href ="#initial "> < code class =css > initial</ code > </ a > ’ as their property
400- value, but for readability these are not listed explicitly in the property
401- value syntax definitions. These keywords cannot be combined with other
402- component values in same declaration; such a declaration is invalid. For
403- example, ‘< code class =css > background: url(corner.png) no-repeat,
404- inherit;</ code > ’ is invalid.
397+ < p > All CSS properties also accept the < a href ="#common-keywords "> CSS-wide
398+ keyword values</ a > ‘< a href ="#inherit "> < code
399+ class =css > inherit</ code > </ a > ’ and ‘< a href ="#initial "> < code
400+ class =css > initial</ code > </ a > ’ as the sole component of their property
401+ value. For readability these are not listed explicitly in the property
402+ value syntax definitions. For example, the full value definition of < a
403+ href ="http://www.w3.org/TR/css3-background/#border-color "> ‘< code
404+ class =property > border-color</ code > ’</ a > is ‘< code class =css > [
405+ <color> {1,4} ] | inherit | initial</ code > ’ (even though it is listed
406+ as ‘< code class =css > <color> {1,4}</ code > ’).
407+
408+ < p class =note > Note: This implies that, in general, combining these
409+ keywords with other component values in the same declaration results in an
410+ invalid declaration. For example, ‘< code class =css > background:
411+ url(corner.png) no-repeat, inherit;</ code > ’ is invalid.
405412
406413 < h3 id =component-combinators > < span class =secno > 2.2. </ span > Component value
407414 combinators</ h3 >
@@ -431,6 +438,10 @@ <h3 id=component-combinators><span class=secno>2.2. </span> Component value
431438 < pre >
432439<!----> a b | c || d && e f
433440<!----> [ a b ] | [ c || [ d && [ e f ]]]</ pre >
441+ <!--
442+ <p>
443+ White space is allowed, but optional, between components of a combination.
444+ -->
434445
435446 < h3 id =component-multipliers > < span class =secno > 2.3. </ span > Component value
436447 multipliers</ h3 >
@@ -455,6 +466,11 @@ <h3 id=component-multipliers><span class=secno>2.3. </span> Component value
455466 < li > A hash mark (#) indicates that the preceding type, word, or group
456467 occurs one or more times, separated by comma tokens.
457468 </ ul >
469+ <!--
470+ <p>
471+ White space is allowed, but optional, between repetitions
472+ and around the comma separator of ''#''-multiplied lists.
473+ -->
458474
459475 < p > For repeated component values (indicated by ‘< code
460476 class =css > *</ code > ’, ‘< code class =css > +</ code > ’, or ‘< code
@@ -465,12 +481,12 @@ <h3 id=component-multipliers><span class=secno>2.3. </span> Component value
465481 < h3 id =component-whitespace > < span class =secno > 2.4. </ span > Component values
466482 and white space</ h3 >
467483
468- < p > Component values are specified in terms of tokens, as described in < a
469- href =" http://www.w3.org/TR/CSS21/syndata.html#tokenization " > Chapter 4 </ a >
470- of < a href ="#CSS21 " rel = biblioentry > [CSS21] <!--{{!CSS21}}--> < /a > . As the
471- grammar allows spaces between tokens in the components of the
472- < code > value </ code > production, spaces may appear between components in
473- property values .
484+ < p > Unless otherwise specified, white space and/or comments may appear
485+ before, after, and/or between components in a property value or
486+ subcomponents in a < a href ="#functional-notation " > functional notation < /a >
487+ that is defined using these component < a
488+ href =" #component-combinators " > combinators </ a > and < a
489+ href =" #component-multipliers " > multipliers </ a > .
474490
475491 < p class =note > Note: In many cases, spaces will in fact be < em > required</ em >
476492 between components in order to distinguish them from each other. For
@@ -614,7 +630,7 @@ <h4 id=common-keywords><span class=secno>3.1.1. </span> CSS-wide keywords:
614630 initial value. < a href ="#CSS3CASCADE "
615631 rel =biblioentry > [CSS3CASCADE]<!--{{CSS3CASCADE}}--> </ a >
616632
617- < p class =note > The < dfn id =default > ‘< code
633+ < p class =note > Note, the < dfn id =default > ‘< code
618634 class =css > default</ code > ’</ dfn > keyword is reserved for future use.
619635
620636 < h3 id =strings > < span class =secno > 3.2. </ span > Quoted Strings: the ‘< a
@@ -701,10 +717,10 @@ <h3 id=urls><span class=secno>3.3. </span> Resource Locators: the ‘<a
701717 < p > In order to create modular style sheets that are not dependent on the
702718 absolute location of a resource, authors should use relative URIs.
703719 Relative URIs (as defined in < a href ="#URI "
704- rel =biblioentry > [URI]<!--{{URI}}--> </ a > ) are resolved to full URIs using a
705- base URI. RFC 3986, section 3, defines the normative algorithm for this
706- process. For CSS style sheets, the base URI is that of the style sheet,
707- not that of the source document.
720+ rel =biblioentry > [URI]<!--{{! URI}}--> </ a > ) are resolved to full URIs using
721+ a base URI. RFC 3986, section 3, defines the normative algorithm for
722+ this process. For CSS style sheets, the base URI is that of the style
723+ sheet, not that of the source document.
708724
709725 < p > When a < a href ="#url-value "> < i > <url> </ i > </ a > appears in the computed
710726 value of a property, it is resolved to an absolute URL, as described in
@@ -755,23 +771,23 @@ <h3 id=integers><span class=secno>4.1. </span> Integers: the ‘<a
755771 corresponds to a subset of the < a href ="#number "> < code > NUMBER</ code > </ a >
756772 token in the < a
757773 href ="http://www.w3.org/TR/CSS21/syndata.html#tokenization "> grammar</ a > .
758- Integers may be immediately preceded by ‘< code class =css > -</ code > ’ or
759- ‘< code class =css > +</ code > ’ to indicate the sign.
774+ The first digit of an integer may be immediately preceded by ‘< code
775+ class =css > -</ code > ’ or ‘< code class =css > +</ code > ’ to indicate the
776+ integer's sign.
760777
761778 < h3 id =numbers > < span class =secno > 4.2. </ span > Numbers: the ‘< a
762779 href ="#number-value "> < code class =css > <number> </ code > </ a > ’ type</ h3 >
763780
764781 < p > Number values are denoted by < dfn
765782 id =number-value > < var > <number> </ var > </ dfn > . A < dfn
766- id =number > number</ dfn > is either an < a
767- href ="#integer-value "> < var > <integer> </ var > </ a > , or zero or more decimal
783+ id =number > number</ dfn > is either an <integer> or zero or more decimal
768784 digits followed by a dot (.) followed by one or more decimal digits. It
769785 corresponds to the < a href ="#number "> < code > NUMBER</ code > </ a > token in the
770786 < a
771787 href ="http://www.w3.org/TR/CSS21/syndata.html#tokenization "> grammar</ a > .
772- Like integers, numbers may also be immediately preceded by ‘ < code
773- class = css > - </ code > ’ or ‘< code class =css > + </ code > ’ to indicate the
774- sign.
788+ As with integers, the first character of a number may be immediately
789+ preceded by ‘< code class =css > - </ code > ’ or ‘ < code
790+ class = css > + </ code > ’ to indicate the number's sign.
775791
776792 < h3 id =percentages > < span class =secno > 4.3. </ span > Percentages: the ‘< a
777793 href ="#percentage-value "> < code class =css > <percentage> </ code > </ a > ’
@@ -1304,13 +1320,15 @@ <h3 id=position><span class=secno>7.3. </span> 2D Positioning: the ‘<a
13041320 < h2 id =functional-notation > < span class =secno > 8. </ span > Functional
13051321 Notations</ h2 >
13061322
1307- < p > Some values use a < dfn id =functional-notation0 > functional notation</ dfn >
1308- to type values and to lump values together. The syntax starts with the
1309- name of the function immediately followed by a left parenthesis followed
1310- by the argument(s) to the notation followed by a right parenthesis. If a
1311- function takes a list of arguments, the arguments are separated by a comma
1312- (‘< code class =css > ,</ code > ’) with optional whitespace before and after
1313- the comma.
1323+ < p > A < dfn id =functional-notation0 > functional notation</ dfn > is a type of
1324+ component value that can represent more complex types or invoke special
1325+ processing. The syntax starts with the name of the function immediately
1326+ followed by a left parenthesis (i.e. a < code > FUNCTION</ code > token)
1327+ followed by the argument(s) to the notation followed by a right
1328+ parenthesis. White space is allowed, but optional, immediately inside the
1329+ parentheses. If a function takes a list of arguments, the arguments are
1330+ separated by a comma (‘< code class =css > ,</ code > ’) with optional
1331+ whitespace before and after the comma.
13141332
13151333 < pre class =example >
13161334<!-- --> background: url(http://www.example.org/image);
@@ -1685,8 +1703,8 @@ <h3 id=attr-notation><span class=secno>8.3. </span> Attribute References:
16851703 href ="http://dev.w3.org/csswg/css3-namespace/#css-qnames "> CSS qualified
16861704 name</ a > (the wqname production in < a href ="#CSS3NAMESPACE "
16871705 rel =biblioentry > [CSS3NAMESPACE]<!--{{!CSS3NAMESPACE}}--> </ a > ) that
1688- represents an attribute name. < span class = note > Most of the time , this will
1689- just be an identifier.</ span >
1706+ represents an attribute name. (In the absence of namespacing , this will
1707+ just be a CSS identifier.)
16901708
16911709 < p > The optional < var > <type-or-unit> </ var > argument is a keyword drawn
16921710 from the list below that tells the UA how to interpret the attribute
@@ -1699,6 +1717,12 @@ <h3 id=attr-notation><span class=secno>8.3. </span> Attribute References:
16991717 property. If it's absent, the default value for the given
17001718 < var > <type-or-unit> </ var > (from the list below) is implied.
17011719
1720+ < p class =note > Note that, unlike ‘< a href ="#toggle "> < code
1721+ class =css > toggle()</ code > </ a > ’ < var > <value> </ var > s, an ‘< a
1722+ href ="#attr "> < code class =css > attr()</ code > </ a > ’ < var > <fallback> </ var >
1723+ value may contain top-level commas, as it is always the last argument in
1724+ the functional notation.
1725+
17021726 < p > The attr() expression is only valid if:
17031727
17041728 < ul >
@@ -1887,17 +1911,17 @@ <h3 id=attr-notation><span class=secno>8.3. </span> Attribute References:
18871911}
18881912metal {
18891913 background: silver url(metal.png);
1890- }
1891-
1914+ }</ pre >
1915+ </ div >
1916+ <!--
18921917/* this also uses a possible extension to the 'content' property
18931918to handle replaced content and alternatives to unavailable,
18941919corrupted or unsupported content */
18951920img {
18961921 content: replaced attr(src url), attr(alt string, none);
18971922 height: attr(height px, auto);
18981923 width: attr(width px, auto);
1899- }</ pre >
1900- </ div >
1924+ }-->
19011925
19021926 < div class ="illegal example ">
19031927 < p > All of the following examples are invalid and would cause a parse-time
@@ -2304,6 +2328,16 @@ <h3 class=no-num id=normative-references>Normative references</h3>
23042328 href ="http://www.ietf.org/rfc/rfc2119.txt "> http://www.ietf.org/rfc/rfc2119.txt</ a >
23052329 </ dd >
23062330 <!---->
2331+
2332+ < dt id =URI > [URI]
2333+
2334+ < dd > T. Berners-Lee; R. Fielding; L. Masinter. < a
2335+ href ="http://www.ietf.org/rfc/rfc3986.txt "> < cite > Uniform Resource
2336+ Identifiers (URI): generic syntax.</ cite > </ a > January 2005. Internet RFC
2337+ 3986. URL: < a
2338+ href ="http://www.ietf.org/rfc/rfc3986.txt "> http://www.ietf.org/rfc/rfc3986.txt</ a >
2339+ </ dd >
2340+ <!---->
23072341 </ dl >
23082342 <!--end-normative-->
23092343
@@ -2333,16 +2367,6 @@ <h3 class=no-num id=other-references>Other references</h3>
23332367 href ="http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/ "> http://www.w3.org/TR/2012/REC-css3-mediaqueries-20120619/</ a >
23342368 </ dd >
23352369 <!---->
2336-
2337- < dt id =URI > [URI]
2338-
2339- < dd > T. Berners-Lee; R. Fielding; L. Masinter. < a
2340- href ="http://www.ietf.org/rfc/rfc3986.txt "> < cite > Uniform Resource
2341- Identifiers (URI): generic syntax.</ cite > </ a > January 2005. Internet RFC
2342- 3986. URL: < a
2343- href ="http://www.ietf.org/rfc/rfc3986.txt "> http://www.ietf.org/rfc/rfc3986.txt</ a >
2344- </ dd >
2345- <!---->
23462370 </ dl >
23472371 <!--end-informative-->
23482372
0 commit comments