Skip to content

Commit a6a1cd9

Browse files
committed
[css-navigation-1] Restrict at in both @navigation and :link-to() to navigations.
This restricts matching of at: in both @navigation and :link-to() to when a navigation is currently active. This defines the term "current at URL" to help with that, and also renames the existing "current other URL" term to "current with URL" to keep internal and author-exposed terminology consistent.
1 parent 60501e8 commit a6a1cd9

1 file changed

Lines changed: 17 additions & 9 deletions

File tree

css-navigation-1/Overview.bs

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -268,15 +268,16 @@ as follows:
268268

269269
: <<navigation-location-test>>
270270
:: : at: <<navigation-location>>
271-
:: The result is whether the result of
271+
:: The result is true if
272+
the [=current at URL=] <var>at</var> of the document is non-null and
272273
[=URL pattern/match|match a URL pattern=] is non-null
273274
given <var>urlPattern</var> as
274275
the [=navigation location URL pattern=] of <<navigation-location>>
275-
and <var>input</var> as the document's [=Document/URL=].
276+
and <var>input</var> as <var>at</var>.
276277

277278
: with: <<navigation-location>>
278279
:: The result is true if
279-
the [=current other URL=] <var>other</var> of the document is non-null and
280+
the [=current with URL=] <var>other</var> of the document is non-null and
280281
[=URL pattern/match|match a URL pattern=] is non-null when
281282
given <var>urlPattern</var> as
282283
the [=navigation location URL pattern=] of <<navigation-location>>
@@ -523,9 +524,9 @@ if the following steps return true:
523524
of the <<navigation-match>>.
524525
1. Let <var>navigationURL</var> be:
525526
: If <var>matchRelation</var> is ''at'',
526-
:: the document's [[=Document/URL=]].
527+
:: the <a>current at URL</a> of the document.
527528
: Otherwise, if <var>matchRelation</var> is ''with'',
528-
:: the <a>current other URL</a> of the document.
529+
:: the <a>current with URL</a> of the document.
529530
: Otherwise, if <var>matchRelation</var> is ''from'',
530531
:: the <a>current from URL</a> of the document.
531532
: Otherwise (Assert: <var>matchRelation</var> is ''to''),
@@ -556,8 +557,8 @@ NOTE: Some of the design discussion for this feature has been in
556557
<h2 id="current-nav-urls">Definitions of current navigation state</h2>
557558

558559
Both the ''@navigation'' rule and the '':link-to()'' pseudo-class
559-
rely on the following definitions of
560-
the [=current other URL=], [=current from URL=], and [=current to URL=].
560+
rely on the following definitions of [=current at URL=]
561+
the [=current with URL=], [=current from URL=], and [=current to URL=].
561562

562563
The <dfn>current from URL</dfn> of a [=/document=] is a URL or null.
563564
It is defined as follows:
@@ -648,10 +649,17 @@ ISSUE: The above definitions of from and to apparently don't work right
648649
if you start a same-document navigation (e.g., with {{History/pushState}})
649650
in the middle of a cross-document navigation.
650651

651-
The <dfn>current other URL</dfn> of a [=/document=] is a URL or null.
652+
The <dfn>current at URL</dfn> of a [=/document=] is a URL or null.
653+
It is defined as follows:
654+
655+
1. ISSUE: Write this! (It should be null if there is no active navigation,
656+
and the same as the document's [=Document/URL=] if there is.)
657+
658+
The <dfn>current with URL</dfn> of a [=/document=] is a URL or null.
652659
It is defined as follows:
653660

654-
1. ISSUE: Write this!
661+
1. ISSUE: Write this! (It should be like [=current to URL=] and [=current from URL=]
662+
but always referring to the other Document in the navigation.)
655663

656664
The <dfn>current navigation type</dfn> of a [=/document=] is a {{NavigationType}} or null.
657665
It is defined as follows:

0 commit comments

Comments
 (0)