@@ -185,10 +185,15 @@ styles that cause [=view transitions=].
185185 pattern: url-pattern("/product/:id");
186186}
187187
188- @navigation ((from: --search-results-page) and
189- (to: --product-page)) or
190- ((from: --product-page) and
191- (to: --search-results-page)) {
188+ @navigation (from: --search-results-page) and
189+ (to: --product-page) {
190+ /* These styles apply when a navigation is in progress
191+ from a search results page to a product page (as
192+ defined by the @route rules above), but not in the
193+ reverse direction. */
194+ }
195+
196+ @navigation (between: --search-results-page and --product-page) {
192197 /* These styles apply when a navigation is in progress
193198 between a search results page and a product page (as
194199 defined by the @route rules above), in either
@@ -213,17 +218,24 @@ with <<navigation-condition>> defined as:
213218 | <<navigation-in-parens>> [ and <<navigation-in-parens>> ]*
214219 | <<navigation-in-parens>> [ or <<navigation-in-parens>> ]*
215220<dfn><<navigation-in-parens>></dfn> = ( <<navigation-condition>> ) | ( <<navigation-test>> ) | <<general-enclosed>>
216- <dfn><<navigation-test>></dfn> = <<navigation-location-test>> | <<navigation-type-test>>
221+ <dfn><<navigation-test>></dfn> = <<navigation-location-test>> |
222+ <<navigation-location-between-test>> |
223+ <<navigation-type-test>>
217224
218225<dfn><<navigation-location-test>></dfn> = <<navigation-location-keyword>> : <<navigation-location>>
219- <dfn><<navigation-location-keyword>></dfn> = at | from | to
226+ <dfn><<navigation-location-keyword>></dfn> = at | other | from | to
220227<dfn><<navigation-location>></dfn> = <<route-name>> | <<url-pattern()>>
221228<dfn><<route-name>></dfn> = <<dashed-ident>>
222229
230+ <dfn><<navigation-location-between-test>></dfn> =
231+ between : <<navigation-location>> and <<navigation-location>>
232+
223233<dfn><<navigation-type-test>></dfn> = history : <<navigation-type-keyword>>
224234<dfn><<navigation-type-keyword>></dfn> = traverse | back | forward | reload
225235</pre>
226236
237+ ISSUE: Should we use ''at'' or ''current'' ?
238+
227239The above grammar is purposely very loose for forwards-compatibility reasons,
228240since the <<general-enclosed>> production
229241allows for substantial future extensibility.
@@ -262,6 +274,14 @@ as follows:
262274 the [=navigation location URL pattern=] of <<navigation-location>>
263275 and <var> input</var> as the document's [=Document/URL=] .
264276
277+ : other: <<navigation-location>>
278+ :: The result is true if
279+ the [=current other URL=] <var> other</var> of the document is non-null and
280+ [=URL pattern/match|match a URL pattern=] is non-null when
281+ given <var> urlPattern</var> as
282+ the [=navigation location URL pattern=] of <<navigation-location>>
283+ and <var> input</var> as <var> other</var> .
284+
265285 : from: <<navigation-location>>
266286 :: The result is true if
267287 the [=current from URL=] <var> from</var> of the document is non-null and
@@ -278,6 +298,20 @@ as follows:
278298 the [=navigation location URL pattern=] of <<navigation-location>>
279299 and <var> input</var> as <var> to</var> .
280300
301+ : <<navigation-location-between-test>>
302+ :: : between: <<navigation-location>> and <<navigation-location>>
303+ :: The result is true if
304+ the [=current from URL=] <var> from</var> of the document is non-null,
305+ the [=current to URL=] <var> to</var> of the document is non-null,
306+ [=URL pattern/match|match a URL pattern=] is non-null
307+ given <var> urlPattern</var> as
308+ the [=navigation location URL pattern=] of one of the two <<navigation-location>> s
309+ and <var> input</var> as <var> from</var> , and
310+ [=URL pattern/match|match a URL pattern=] is non-null
311+ given <var> urlPattern</var> as
312+ the [=navigation location URL pattern=] of the other of the two <<navigation-location>> s
313+ and <var> input</var> as <var> to</var> .
314+
281315: <<navigation-type-test>>
282316:: : history: traverse
283317 :: True if the [=current navigation type=] is {{NavigationType/traverse}} .
@@ -455,6 +489,8 @@ and the pseudo-class matches any element where:
455489 navigation-from | navigation-to
456490</pre>
457491
492+ ISSUE: Should we use ''navigation-at'' or ''navigation-current'' ?
493+
458494A <<link-condition>> matches the target of the link when both:
459495* the <<link-condition-base>> matches the target of the link, and
460496* either:
@@ -494,7 +530,7 @@ if the following steps return true:
494530 : If <var> matchTarget</var> is ''navigation-other'' ,
495531 :: the <a>current other URL</a> of the document.
496532 : Otherwise, if <var> matchTarget</var> is ''navigation-current'' ,
497- :: the <a>current URL</a> of the document .
533+ :: the document's [[=Document/URL=]] .
498534 : Otherwise, if <var> matchTarget</var> is ''navigation-from'' ,
499535 :: the <a>current from URL</a> of the document.
500536 : Otherwise (Assert: <var> matchTarget</var> is ''navigation-to'' ),
@@ -537,7 +573,7 @@ NOTE: Some of the design discussion for this feature has been in
537573
538574Both the ''@navigation'' rule and the '':link-to()'' pseudo-class
539575rely on the following definitions of
540- the [=current from URL=] and [=current to URL=] .
576+ the [=current other URL=] , [=current from URL=], and [=current to URL=] .
541577
542578The <dfn>current from URL</dfn> of a [=/document=] is a URL or null.
543579It is defined as follows:
@@ -628,11 +664,6 @@ ISSUE: The above definitions of from and to apparently don't work right
628664if you start a same-document navigation (e.g., with {{History/pushState}} )
629665in the middle of a cross-document navigation.
630666
631- The <dfn>current URL</dfn> of a [=/document=] is a URL.
632- It is defined as follows:
633-
634- 1. ISSUE: Write this!
635-
636667The <dfn>current other URL</dfn> of a [=/document=] is a URL or null.
637668It is defined as follows:
638669
0 commit comments