Skip to content

Commit

Permalink
[various][editorial] Update to the new parsing algo names and block p…
Browse files Browse the repository at this point in the history
…roduction names.
  • Loading branch information
tabatkins committed May 12, 2023
1 parent 10d1cea commit ea43cbf
Show file tree
Hide file tree
Showing 11 changed files with 26 additions and 27 deletions.
2 changes: 1 addition & 1 deletion css-animations-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Declaring Keyframes</h2>
defined as follows:

<pre>
@keyframes = @keyframes <<keyframes-name>> { <<rule-list>> }
@keyframes = @keyframes <<keyframes-name>> { <<qualified-rule-list>> }

<dfn>&lt;keyframes-name></dfn> = <<custom-ident>> | <<string>>

Expand Down
2 changes: 1 addition & 1 deletion css-cascade-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1612,7 +1612,7 @@ Assigning Styles Inline: the ''@layer'' block at-rule</h5>

<pre class='prod'>
@layer <<layer-name>>? {
<<stylesheet>>
<<rule-list>>
}
</pre>

Expand Down
6 changes: 3 additions & 3 deletions css-cascade-6/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ Effects of ''@scope''</h4>
The ''@scope'' [=at-rule=] has three primary effects
on the [=style rules=] it contains:

* The [=style rules=] in an ''@scope'' <<stylesheet>>
* The [=style rules=] in an ''@scope'' <<rule-list>>
are [=scoped style rules=].

* The '':scope'' selector is defined to match
Expand Down Expand Up @@ -431,7 +431,7 @@ Syntax of ''@scope''</h4>

<pre class="prod def">
@scope [(<<scope-start>>)]? [to (<<scope-end>>)]? {
<<stylesheet>>
<<rule-list>>
}
</pre>

Expand All @@ -441,7 +441,7 @@ Syntax of ''@scope''</h4>
used to identify the [=scoping root=](s).
* <dfn><<scope-end>></dfn> is a <<forgiving-selector-list>> [=selector=]
used to identify any [=scoping limits=].
* the <<stylesheet>> represents the [=scoped style rules=].
* the <<rule-list>> represents the [=scoped style rules=].

[=Pseudo-elements=] cannot be [=scoping roots=] or [=scoping limits=];
they are invalid both within <<scope-start>> and <<scope-end>>.
Expand Down
10 changes: 5 additions & 5 deletions css-conditional-3/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ at-media-dynamic-001.html
<h2 id="contents-of">
Contents of conditional group rules</h2>

All [=conditional group rules=] are defined to take a <<stylesheet>> in their block,
which means they can accept any rule that is normally allowed at the top-level of a stylesheet,
All [=conditional group rules=] are defined to take a <<rule-list>> in their block,
and accept any rule that is normally allowed at the top-level of a stylesheet,
and not otherwise restricted.
(For example, an ''@import'' rule must appear at the actual beginning of a stylesheet,
and so is not valid inside of another rule.)
Expand All @@ -187,7 +187,7 @@ at-media-content-003.html
at-media-content-004.html
</wpt>

Invalid or unknown rules inside the <<stylesheet>> must be considered invalid and ignored,
Invalid or unknown rules inside the <<rule-list>> must be considered invalid and ignored,
but do not invalidate the [=conditional group rule=].

<wpt title="Invalid rules do not invalidate conditional group rule.">
Expand Down Expand Up @@ -263,7 +263,7 @@ Its syntax is:

<pre class="prod def" nohighlight>
@media <<media-query-list>> {
<<stylesheet>>
<<rule-list>>
}
</pre>

Expand Down Expand Up @@ -346,7 +346,7 @@ The syntax of the ''@supports'' rule is:

<pre class="prod def" nohighlight>
@supports <<supports-condition>> {
<<stylesheet>>
<<rule-list>>
}
</pre>

Expand Down
4 changes: 2 additions & 2 deletions css-conditional-5/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ Generalized Conditional Rules: the ''@when'' rule</h2>

<pre class=prod>
@when <<boolean-condition>> {
<<stylesheet>>
<<rule-list>>
}
</pre>

Expand Down Expand Up @@ -176,7 +176,7 @@ Chained Conditionals: the ''@else'' rule</h2>

<pre class=prod>
@else <<boolean-condition>>? {
<<stylesheet>>
<<rule-list>>
}
</pre>

Expand Down
4 changes: 2 additions & 2 deletions css-contain-3/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ Container Queries: the ''@container'' rule</h3>
is a [=conditional group rule=] whose condition contains
a <dfn export>container query</dfn>,
which is a boolean combination of [=container size queries=] and/or [=container style queries=].
Style declarations within the <<stylesheet>> block of an ''@container'' rule
Style declarations within the <<block-contents>> block of an ''@container'' rule
are [[css-cascade-4#filtering|filtered]] by its condition
to only match when the [=container query=]
is true for their element’s [=query container=].
Expand All @@ -580,7 +580,7 @@ Container Queries: the ''@container'' rule</h3>

<pre class="prod def">
@container <<container-condition>> {
<<stylesheet>>
<<block-contents>>
}
</pre>

Expand Down
4 changes: 2 additions & 2 deletions css-fonts-4/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -5494,7 +5494,7 @@ mapping author-chosen human-friendly names
to feature indexes for the associated feature.

<pre class=prod>
@font-feature-values <<family-name>># { <<declaration-list>> }
@font-feature-values <<family-name>># { <<declaration-rule-list>> }
<<feature-value-block>> = <<font-feature-value-type>> { <<declaration-list>> }
Expand All @@ -5518,7 +5518,7 @@ If syntax errors occur within the <<family-name>> list,
the entire rule ''@font-feature-values'' rule is invalid
and must be ignored.

The ''@font-feature-values'' block accepts <<declaration-list>> as its contents;
The ''@font-feature-values'' block accepts <<declaration-rule-list>> as its contents;
these list items are either:

[=at-rules=] named by one of the <<font-feature-value-type>> at-keyword tokens,
Expand Down
5 changes: 3 additions & 2 deletions css-nesting-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -622,8 +622,9 @@ Nesting Other At-Rules {#conditionals}
can be nested inside of a [=style rule=] as well.

When nested in this way,
the contents of a [=nested group rule=] are parsed as <<style-block>>
rather than <<stylesheet>>:
the contents of a [=nested group rule=]'s block
are parsed as <<block-contents>>
rather than <<rule-list>>:

* [=Style rules=] are [=nested style rules=],
with their [=nesting selector=] taking its definition
Expand Down
2 changes: 1 addition & 1 deletion css-page-3/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ pseudo-classes.</em>
plus the additional rules noted below:

<pre class=prod>
@page = @page <<page-selector-list>>? { <<declaration-list>> }
@page = @page <<page-selector-list>>? { <<declaration-rule-list>> }
<dfn><<page-selector-list>></dfn> = <<page-selector>>#
<dfn><<page-selector>></dfn> = [ <<ident-token>>? <<pseudo-page>>* ]!
<dfn><<pseudo-page>></dfn> = ':' [ left | right | first | blank ]
Expand Down
6 changes: 3 additions & 3 deletions css-scoping-1/deferred-to-level-4.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,12 @@ CSS Syntax for Scoping: the ''@scope'' rule</h4>

<pre class='prod'>
@scope <<selector-list>> {
<<stylesheet>>
<<rule-list>>
}
</pre>

where the elements matched by the <<selector-list>>
are <a>scoping roots</a> for the style rules in <<stylesheet>>,
are <a>scoping roots</a> for the style rules in <<rule-list>>,
and selectors of style rules scoped by ''@scope'' are
<a>scope-contained</a> to their <a>scoping root</a>.

Expand All @@ -89,7 +89,7 @@ CSS Syntax for Scoping: the ''@scope'' rule</h4>
which could affect the optimization strategies for implementing scoped styles.

If multiple elements match the <<selector-list>>,
the <<stylesheet>> is effectively duplicated
the <<rule-list>> is effectively duplicated
and scoped independently to each one.
Authors should avoid using overly-generic selectors
as it can have confusing interactions with the cascade.
Expand Down
8 changes: 3 additions & 5 deletions cssom-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,7 @@ The <dfn method for=CSSStyleSheet>replace(<a for=CSSRule>text</a>)</dfn> method
<li>Set the <a>disallow modification flag</a>.
<li><a>In parallel</a>, do these steps:
<ol>
<li>Let <var>rules</var> be the result of running <a>parse a list of rules</a> from <var>text</var>. If <var>rules</var> is
not a list of rules (i.e. an error occurred during parsing), set <var>rules</var> to an empty list.
<li>Let <var>rules</var> be the result of running <a>parse a stylesheet's contents</a> from <var>text</var>.
<li>If <var>rules</var> contains one or more <a>@import</a> rules, <a lt="remove a CSS rule">remove those rules</a> from <var>rules</var>.
<li>Set <var>sheet</var>'s <a>CSS rules</a> to <var>rules</var>.
<li>Unset <var>sheet</var>'s <a>disallow modification flag</a>.
Expand All @@ -1073,8 +1072,7 @@ To <dfn export>synchronously replace the rules of a CSSStyleSheet</dfn> on <var>
<ol>
<li>If the <a>constructed flag</a> is not set, or the <a>disallow modification flag</a> is set, throw a {{NotAllowedError}}
{{DOMException}}.
<li>Let <var>rules</var> be the result of running <a>parse a list of rules</a> from <var>text</var>. If <var>rules</var> is
not a list of rules (i.e. an error occurred during parsing), set <var>rules</var> to an empty list.
<li>Let <var>rules</var> be the result of running <a>parse a stylesheet's contents</a> from <var>text</var>.
<li>If <var>rules</var> contains one or more <a>@import</a> rules, <a lt="remove a CSS rule">remove those rules</a> from <var>rules</var>.
<li>Set <var>sheet</var>'s <a>CSS rules</a> to <var>rules</var>.
</ol>
Expand Down Expand Up @@ -2239,7 +2237,7 @@ the DOM a <a>CSS declaration block</a> is a
To <dfn export>parse a CSS declaration block</dfn> from a string <var>string</var>, follow these steps:

<ol>
<li>Let <var>declarations</var> be the return value of invoking <a>parse a list of declarations</a> with <var>string</var>.
<li>Let <var>declarations</var> be the returned declarations from invoking <a>parse a block's contents</a> with <var>string</var>.
<li>Let <var>parsed declarations</var> be a new empty list.
<li>For each item <var>declaration</var> in <var>declarations</var>, follow these substeps:
<ol>
Expand Down

0 comments on commit ea43cbf

Please sign in to comment.