[selectors-4] semantics and roadmap for the ':local-link' pseudo-class.

Hi folks,

I'm writing with two questions about the ':local-link' CSS
pseudo-class, formerly-known as ':links-here', and originally
proposed[1] as ':current'.

For context: my use-case relates to an issue[2] in a Sphinx[3] HTML
theme.  I would like to select a group of hyperlinks whose targets
exists anywhere in the current document -- or in other words: targets
that the browser could scroll to without having to load another
document.

I discovered local-link and have learned some of its history while
researching possible solutions.  The specification for local-link was
included[4] into selectors-4, although eventually deferred[5] to
selectors-5.  Some years after that deferral, a streamlined spec was
re-introduced[6] to selectors-4, and remains current today.

My two questions are:

  * Is there a pseudo-class planned that would match hyperlink targets
anywhere within the current document?  (I believe that the deferred
local-link spec may have previously catered to this; meanwhile the
amended spec caters to slightly different use-cases)

  * Will the re-introduced, amended specification of local-link in
selectors-4 supersede the deferred specification currently remaining
in selectors-5?  (and if so: should the latter be renamed or removed
from that document?)

Please note: I've also added some commentary on what I hope is the
relevant csswg-drafts GitHub issue thread[7], including an ASCII art
diagram to illustrate what I understand to be the differences in
behaviour given an example scenario (NB: there does not yet seem to be
web-platform-tests coverage for this feature).

Thank you,
James

[1] - https://github.com/w3c/csswg-drafts/commit/80cf530ceb1fb05ccfe785335cb06d96d6e4f262
(Y2007)

[2] - https://github.com/readthedocs/sphinx_rtd_theme/issues/880

[3] - https://www.sphinx-doc.org

[4] - https://github.com/w3c/csswg-drafts/commit/bcd3dc42fdd0dfc8651614e61723aca910ed1498
(Y2011)

[5] https://github.com/w3c/csswg-drafts/commit/7721f6e7af81d93b32c97fb89ae94cc0afe77ce1
(Y2014)

[6] - https://github.com/w3c/csswg-drafts/commit/e3093cf48c8fd26f90c4def71d587bfeff780243
(Y2018)

[7] - https://github.com/w3c/csswg-drafts/issues/2010

Received on Wednesday, 24 July 2024 09:45:10 UTC