Skip to content

Commit

Permalink
[css-view-transitions-2] Make some syntax clarifications (#10158)
Browse files Browse the repository at this point in the history
- Add [SameObject] to CSSOM
- Clarify that classes can't include white space
  • Loading branch information
noamr committed Apr 8, 2024
1 parent 38044b3 commit f4abc28
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions css-view-transitions-2/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ The {{CSSViewTransitionRule}} represents a ''@view-transition'' rule.
[Exposed=Window]
interface CSSViewTransitionRule : CSSRule {
readonly attribute ViewTransitionNavigation navigation;
readonly attribute FrozenArray<CSSOMString> types;
[SameObject] readonly attribute FrozenArray<CSSOMString> types;
};
</xmp>

Expand Down Expand Up @@ -675,10 +675,15 @@ div.box {
<<pt-name-and-class-selector>> has the following syntax definition:

<pre class=prod>
<dfn>&lt;pt-name-and-class-selector></dfn> = <<pt-name-selector>><<pt-class-selector>>? | <<pt-class-selector>>
<dfn>&lt;pt-name-and-class-selector></dfn> = <<pt-name-selector>> <<pt-class-selector>>? | <<pt-class-selector>>
<dfn>&lt;pt-class-selector></dfn> = ['.' <<custom-ident>>]+
</pre>

When interpreting the above grammar, white space is forbidden:

* Between <<pt-name-selector>> and <<pt-class-selector>>
* Between any of the components of <<pt-class-selector>>.

A [=named view transition pseudo-element=] [=selector=] which has one or more <<custom-ident>> values
in its <<pt-class-selector>> would only match an element if the [=captured element/class list=] value in
[=ViewTransition/named elements=] for the pseudo-element's 'view-transition-name' [=list/contains=] all of those values.
Expand Down

0 comments on commit f4abc28

Please sign in to comment.