Skip to content

Commit 4128f13

Browse files
committed
Renamed 'style rule' to 'selector rule' to be more generic and avoid confusion with CSSStyleRule (since things like CSSKeyframeRule are also 'selector rules').
--HG-- extra : rebase_source : 19f9f7ce9aa98c76f1b3d89d63ad7707e57760a0
1 parent dabbe0c commit 4128f13

2 files changed

Lines changed: 30 additions & 28 deletions

File tree

css3-syntax/Overview.html

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2043,8 +2043,8 @@ <h3 id=tree-construction><span class=secno>3.6. </span> Tree Construction</h3>
20432043

20442044
<p> The input to the tree construction stage is a sequence of tokens from
20452045
the tokenization stage. The output is a tree of items with a stylesheet at
2046-
the root and all other nodes being at-rules, style rules, or declarations.
2047-
2046+
the root and all other nodes being at-rules, selector rules, or
2047+
declarations.
20482048

20492049
<p> The construction of this stylesheet does not take into account
20502050
unrecognized items, like unknown properties or at-rules. It simply
@@ -2058,19 +2058,19 @@ <h3 id=tree-construction><span class=secno>3.6. </span> Tree Construction</h3>
20582058
<dl>
20592059
<dt>stylesheet
20602060

2061-
<dd> A stylesheet has a value consisting of a list of at-rules and style
2062-
rules.
2061+
<dd> A stylesheet has a value consisting of a list of at-rules and
2062+
selector rules.
20632063

20642064
<dt>at-rule
20652065

20662066
<dd> An at-rule has a name, a prelude consisting of a list of primitives,
2067-
and a value consisting of a list of at-rules, style rules, or
2067+
and a value consisting of a list of at-rules, selector rules, or
20682068
declarations.
20692069

2070-
<dt>style rule
2070+
<dt>selector rule
20712071

2072-
<dd> A style rule has a selector consisting of a list of primitives, and a
2073-
value consisting of a list of at-rules or declarations.
2072+
<dd> A selector rule has a selector consisting of a list of primitives,
2073+
and a value consisting of a list of at-rules or declarations.
20742074

20752075
<dt>declaration
20762076

@@ -2111,7 +2111,7 @@ <h3 id=tree-construction><span class=secno>3.6. </span> Tree Construction</h3>
21112111

21122112
<li> Make sure that I properly handle the case where the top element in
21132113
the stack isn't a stylesheet, such as when parsing the
2114-
<code>style</code> attribute (there, the top element is a style rule,
2114+
<code>style</code> attribute (there, the top element is a selector rule,
21152115
and we start by entering the declaration mode).
21162116

21172117
<li> Handle the an+b production somehow. Maybe just define it in property
@@ -2154,9 +2154,10 @@ <h4 id=definitions0><span class=secno>3.6.1. </span> Definitions</h4>
21542154
<dt><dfn id=rule-filled>rule-filled</dfn>
21552155

21562156
<dd> An at-rule that takes a block, and within that block accepts at-rules
2157-
and/or style rules (or a close variant of style rules, like a keyframe
2158-
rule), is called <a href="#rule-filled"><i>rule-filled</i></a>. Examples
2159-
of <a href="#rule-filled"><i>rule-filled</i></a> at-rules are ‘<code
2157+
and/or selector rules (which encompasses more than just style rules, such
2158+
as keyframe rules), is called <a
2159+
href="#rule-filled"><i>rule-filled</i></a>. Examples of <a
2160+
href="#rule-filled"><i>rule-filled</i></a> at-rules are ‘<code
21602161
class=css>@media</code>’ and ‘<code class=css>@keyframes</code>’.
21612162

21622163
<dt><dfn id=declaration-filled>declaration-filled</dfn>
@@ -2199,7 +2200,7 @@ <h4 id=top-level-mode-><span class=secno>3.6.2. </span> <dfn
21992200

22002201
<dt>anything else
22012202

2202-
<dd> <i>Create a style rule</i> and push it onto the <a
2203+
<dd> Create a selector rule and push it onto the <a
22032204
href="#stack-of-open-rules"><i>stack of open rules</i></a>. Switch to the
22042205
<a href="#selector-mode0"><i>selector mode</i></a>. Reprocess the <a
22052206
href="#current-input-token"><i>current input token</i></a>.
@@ -2284,7 +2285,7 @@ <h4 id=rule-mode><span class=secno>3.6.4. </span> <dfn id=rule-mode0>Rule
22842285

22852286
<dt>anything else
22862287

2287-
<dd> Create a style rule and push it onto the <a
2288+
<dd> Create a selector rule and push it onto the <a
22882289
href="#stack-of-open-rules"><i>stack of open rules</i></a>. Switch to the
22892290
<a href="#selector-mode0"><i>selector mode</i></a>. Reprocess the <a
22902291
href="#current-input-token"><i>current input token</i></a>.
@@ -2718,9 +2719,10 @@ <h4 id=switch-to-the-current-rules-content-mode><span class=secno>3.6.15.
27182719
rule's content mode</i></a>. It is invoked whenever a declaration or rule
27192720
has been successfully completed, or when an error has finished recovery.
27202721

2721-
<p> If the <a href="#current-rule"><i>current rule</i></a> is a style rule
2722-
or a <a href="#declaration-filled"><i>declaration-filled</i></a> at-rule,
2723-
switch to the <a href="#declaration-mode0"><i>declaration mode</i></a>.
2722+
<p> If the <a href="#current-rule"><i>current rule</i></a> is a selector
2723+
rule or a <a href="#declaration-filled"><i>declaration-filled</i></a>
2724+
at-rule, switch to the <a href="#declaration-mode0"><i>declaration
2725+
mode</i></a>.
27242726

27252727
<p> If the <a href="#current-rule"><i>current rule</i></a> is a <a
27262728
href="#rule-filled"><i>rule-filled</i></a> at-rule, switch to the <a

css3-syntax/Overview.src.html

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,7 +2040,7 @@ <h3>
20402040
The input to the tree construction stage is a sequence of tokens from the tokenization stage.
20412041
The output is a tree of items
20422042
with a stylesheet at the root
2043-
and all other nodes being at-rules, style rules, or declarations.
2043+
and all other nodes being at-rules, selector rules, or declarations.
20442044

20452045
<p>
20462046
The construction of this stylesheet does not take into account unrecognized items,
@@ -2055,17 +2055,17 @@ <h3>
20552055
<dl>
20562056
<dt>stylesheet
20572057
<dd>
2058-
A stylesheet has a value consisting of a list of at-rules and style rules.
2058+
A stylesheet has a value consisting of a list of at-rules and selector rules.
20592059

20602060
<dt>at-rule
20612061
<dd>
20622062
An at-rule has a name,
20632063
a prelude consisting of a list of primitives,
2064-
and a value consisting of a list of at-rules, style rules, or declarations.
2064+
and a value consisting of a list of at-rules, selector rules, or declarations.
20652065

2066-
<dt>style rule</dt>
2066+
<dt>selector rule</dt>
20672067
<dd>
2068-
A style rule has
2068+
A selector rule has
20692069
a selector consisting of a list of primitives,
20702070
and a value consisting of a list of at-rules or declarations.
20712071

@@ -2135,7 +2135,7 @@ <h3>
21352135
<li>
21362136
Make sure that I properly handle the case where the top element in the stack isn't a stylesheet,
21372137
such as when parsing the <code>style</code> attribute
2138-
(there, the top element is a style rule,
2138+
(there, the top element is a selector rule,
21392139
and we start by entering the declaration mode).
21402140

21412141
<li>
@@ -2178,8 +2178,8 @@ <h4>
21782178
<dt><dfn>rule-filled</dfn>
21792179
<dd>
21802180
An at-rule that takes a block,
2181-
and within that block accepts at-rules and/or style rules
2182-
(or a close variant of style rules, like a keyframe rule),
2181+
and within that block accepts at-rules and/or selector rules
2182+
(which encompasses more than just style rules, such as keyframe rules),
21832183
is called <i>rule-filled</i>.
21842184
Examples of <i>rule-filled</i> at-rules are ''@media'' and ''@keyframes''.
21852185

@@ -2221,7 +2221,7 @@ <h4>
22212221

22222222
<dt>anything else
22232223
<dd>
2224-
<i>Create a style rule</i>
2224+
Create a selector rule
22252225
and push it onto the <i>stack of open rules</i>.
22262226
Switch to the <i>selector mode</i>.
22272227
Reprocess the <i>current input token</i>.
@@ -2302,7 +2302,7 @@ <h4>
23022302

23032303
<dt>anything else
23042304
<dd>
2305-
Create a style rule
2305+
Create a selector rule
23062306
and push it onto the <i>stack of open rules</i>.
23072307
Switch to the <i>selector mode</i>.
23082308
Reprocess the <i>current input token</i>.
@@ -2724,7 +2724,7 @@ <h4>
27242724
or when an error has finished recovery.
27252725

27262726
<p>
2727-
If the <i>current rule</i> is a style rule or a <i>declaration-filled</i> at-rule,
2727+
If the <i>current rule</i> is a selector rule or a <i>declaration-filled</i> at-rule,
27282728
switch to the <i>declaration mode</i>.
27292729

27302730
<p>

0 commit comments

Comments
 (0)