You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The <code><an+b></code> type</a></ul><li><ahref=#rule-defs><spanclass=secno>7</span>
118
118
Defining Grammars for Rules and Other Values</a><ulclass=toc><li><ahref=#declaration-rule-list><spanclass=secno>7.1</span>
119
-
Defining Block Contents: the <spanclass=productiondata-link-type=type><var><declaration-list></var></span>, <spanclass=productiondata-link-type=type><var><rule-list></var></span>, and <spanclass=productiondata-link-type=type><var><stylesheet></var></span> productions</a></ul><li><ahref=#css-stylesheets><spanclass=secno>8</span>
119
+
Defining Block Contents: the <spanclass=productiondata-link-type=type><declaration-list></span>, <spanclass=productiondata-link-type=type><rule-list></span>, and <spanclass=productiondata-link-type=type><stylesheet></span> productions</a></ul><li><ahref=#css-stylesheets><spanclass=secno>8</span>
<p> "<code>color: blue;</code>" is a declaration specifying that,
195
195
for the elements that match the selector,
196
-
their <aclass=propertydata-link-type=propdeschref=http://www.w3.org/TR/CSS21/colors.html#propdef-colortitle=color>color</a> property should have the value <spanclass=cssdata-link-type=maybe>blue</span>.
197
-
Similiarly, their <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-text-4/#text-decoration0title=text-decoration>text-decoration</a> property should have the value <spanclass=cssdata-link-type=maybe>underline</span>.
196
+
their <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-color-3/#color0title=color>color</a> property should have the value <spanclass=cssdata-link-type=maybe>blue</span>.
197
+
Similiarly, their <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-text-decor-3/#text-decorationtitle=text-decoration>text-decoration</a> property should have the value <spanclass=cssdata-link-type=maybe>underline</span>.
198
198
</div>
199
199
200
200
<p> At-rules are all different, but they have a basic structure in common.
Defining Block Contents: the <aclass=productiondata-link-type=typehref=#typedef-declaration-list><var><declaration-list></var></a>, <aclass=productiondata-link-type=typehref=#typedef-rule-list><var><rule-list></var></a>, and <aclass=productiondata-link-type=typehref=#typedef-stylesheet><var><stylesheet></var></a> productions</span><aclass=section-linkhref=#declaration-rule-list>§</a></h3>
2659
+
Defining Block Contents: the <aclass=productiondata-link-type=typehref=#typedef-declaration-list><declaration-list></a>, <aclass=productiondata-link-type=typehref=#typedef-rule-list><rule-list></a>, and <aclass=productiondata-link-type=typehref=#typedef-stylesheet><stylesheet></a> productions</span><aclass=section-linkhref=#declaration-rule-list>§</a></h3>
2660
2660
2661
2661
<p> The CSS parser is agnostic as to the contents of blocks,
2662
2662
such as those that come at the end of some at-rules.
@@ -2672,7 +2672,7 @@ <h3 data-level=7.1 id=declaration-rule-list><span class=secno>7.1 </span><span c
2672
2672
It represents that the contents of the block must be parsed using the <ahref=#consume-a-list-of-rules0>consume a list of rules</a> algorithm.
2673
2673
2674
2674
<p> Finally, the <dfndata-dfn-type=typeid=typedef-stylesheet><stylesheet></dfn> production represents a list of rules.
2675
-
It is identical to <aclass=productiondata-link-type=typehref=#typedef-rule-list><var><rule-list></var></a>,
2675
+
It is identical to <aclass=productiondata-link-type=typehref=#typedef-rule-list><rule-list></a>,
2676
2676
except that blocks using it default to accepting all rules
2677
2677
that aren't otherwise limited to a particular context.
2678
2678
@@ -2681,24 +2681,24 @@ <h3 data-level=7.1 id=declaration-rule-list><span class=secno>7.1 </span><span c
must further define that they accept as declarations all animatable CSS properties,
2730
2730
plus the <aclass=propertydata-link-type=propdeschref=http://dev.w3.org/csswg/css-animations-1/#animation-timing-functiontitle=animation-timing-function>animation-timing-function</a> property,
2731
2731
but that they do not interact with the cascade.
2732
2732
</div>
2733
2733
2734
-
<p> For rules that use <aclass=productiondata-link-type=typehref=#typedef-stylesheet><var><stylesheet></var></a>,
2734
+
<p> For rules that use <aclass=productiondata-link-type=typehref=#typedef-stylesheet><stylesheet></a>,
2735
2735
all rules are allowed by default,
2736
2736
but the spec for the rule may define what types of rules are <em>invalid</em> inside the rule.
2737
2737
@@ -2740,8 +2740,8 @@ <h3 data-level=7.1 id=declaration-rule-list><span class=secno>7.1 </span><span c
2740
2740
except more <spanclass=cssdata-link-type=maybe>@media</span> rules.
<p> It additionally defines a restriction that the <aclass=productiondata-link-type=typehref=#typedef-stylesheet><var><stylesheet></var></a> can not contain <spanclass=cssdata-link-type=maybe>@media</span> rules,
<p> It additionally defines a restriction that the <aclass=productiondata-link-type=typehref=#typedef-stylesheet><stylesheet></a> can not contain <spanclass=cssdata-link-type=maybe>@media</span> rules,
2745
2745
which causes them to be dropped from the outer rule's value if they appear.
The validity of the style rule’s contents have no effect on the validity of the style rule itself.
2785
2785
Unless otherwise specified, property names are <ahref=#ascii-case-insensitive>ASCII case-insensitive</a>.
2786
2786
2787
-
<p> If a <ahref=#style-rule>style rule</a> contains multiple declarations with the same name,
2788
-
all but the last such declaration are discarded.
2789
-
2790
2787
<pclass=note> Note: The names of Custom Properties <adata-biblio-type=informativedata-link-type=bibliohref=#css-variablestitle=CSS-VARIABLES>[CSS-VARIABLES]</a> are case-sensitive.
2791
2788
2792
2789
<p><ahref=#qualified-rule>Qualified rules</a> at the top-level of a CSS stylesheet are style rules.
<p> The <dfndata-dfn-type=at-ruleid=at-ruledef-charset><aclass=cssdata-link-type=maybehref=#at-ruledef-charset>@charset</a></dfn> rule is a very special <ahref=#at-rule>at-rule</a> associated with determining the character encoding of the stylesheet.
<p> Additionally, an <aclass=cssdata-link-type=maybehref=#at-ruledef-charset>@charset</a> rule is invalid if it is not at the top-level of a stylesheet,
2808
2805
or if it is not the very first rule of a stylesheet.
2809
2806
2810
2807
<p><aclass=cssdata-link-type=maybehref=#at-ruledef-charset>@charset</a> rules have an <dfndata-dfn-type=dfnid=encoding>encoding</dfn>,
2811
-
given by the value of the <aclass=productiondata-link-type=type><var><string></var></a>.
2808
+
given by the value of the <aclass=productiondata-link-type=typehref=http://dev.w3.org/csswg/css-values-3/#string-value><string></a>.
2812
2809
2813
2810
<p> The <aclass=cssdata-link-type=maybehref=#at-ruledef-charset>@charset</a> rule has <strong>no effect on a stylesheet</strong>.
Editor: Simon Sapin, Mozilla, http://exyr.org/about/
10
10
Abstract: This module describes, in general terms, the basic structure and syntax of CSS stylesheets. It defines, in detail, the syntax and parsing of CSS - how to turn a stream of bytes into a meaningful stylesheet.
0 commit comments