惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Cisco Talos Blog
Cisco Talos Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
爱范儿
爱范儿
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Jina AI
Jina AI
雷峰网
雷峰网
The Register - Security
The Register - Security
The Cloudflare Blog
博客园 - 【当耐特】
M
MIT News - Artificial intelligence
I
InfoQ
博客园 - 三生石上(FineUI控件)
H
Help Net Security
博客园 - 司徒正美
Vercel News
Vercel News
WordPress大学
WordPress大学
S
SegmentFault 最新的问题
云风的 BLOG
云风的 BLOG
B
Blog
Google DeepMind News
Google DeepMind News
B
Blog RSS Feed
L
LangChain Blog
人人都是产品经理
人人都是产品经理
GbyAI
GbyAI
T
The Blog of Author Tim Ferriss
T
Tailwind CSS Blog
aimingoo的专栏
aimingoo的专栏
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
Recorded Future
Recorded Future
小众软件
小众软件
Martin Fowler
Martin Fowler
罗磊的独立博客
Stack Overflow Blog
Stack Overflow Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
腾讯CDC
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Apple Machine Learning Research
Apple Machine Learning Research
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
博客园 - Franky
Hugging Face - Blog
Hugging Face - Blog
Y
Y Combinator Blog
V
Visual Studio Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
大猫的无限游戏
大猫的无限游戏
Engineering at Meta
Engineering at Meta
N
Netflix TechBlog - Medium
V
V2EX
Blog — PlanetScale
Blog — PlanetScale

Recent Commits to csswg-drafts:main

[css-color-4][editorial] fix warning about variable only used once [css-color-4][editorial] wpt · w3c/csswg-drafts@f37938a [css-color-4] Clarify carry-forward in color interpolation #14134 · w3c/csswg-drafts@526bc74 [css-link-params][editorial] Prepare for FPWD · w3c/csswg-drafts@c7d565c [css-view-tranitions-2] Update two-phase view transition explainer (#… [css-navigation-1] Remove controversial parts (#14138) [css-speech-1][editorial] Enforce positive <generic-voice> variant us… · w3c/csswg-drafts@b99f0c7 [selectors-4][editorial] Update previous versions · w3c/csswg-drafts@a3a7543 [selectors-4][editorial] silence bikeshed nitpicking · w3c/csswg-drafts@7780a1f [selectors-4][editorial] wpt · w3c/csswg-drafts@aa61b2c [selectors-4] Better description of :lang() psuedo class selector #3022. · w3c/csswg-drafts@1ed57ea Clarify note on ViewTransition/types manipulation. (#14110) · w3c/csswg-drafts@14685cd [selectors-4] Add CanIUse panels #1193 (#14120) [css-navigation-1] Move parameter resolution into <<route-location>> … Initial plan [cssom-view-1] Per flackr feedback, not worth making quirks mode care… · w3c/csswg-drafts@169b434 [css-overscroll-1] Clarify the wording to be about scrollable axis. · w3c/csswg-drafts@d5541f2 [css-conditional-5] Clarify a little bit that we can skip containers. · w3c/csswg-drafts@416c971 [css-overscroll-1] Never mind, exclude single-axis scrollers from the… · w3c/csswg-drafts@23ba67b [css-nav-1] Fix up 'can be manually scrolled' to care about axises, u… · w3c/csswg-drafts@8f211ee [css-nav-1] Clean up some of the bikeshed errors · w3c/csswg-drafts@f746899 [css-conditional-5] For the scroller queries, elements are only CQ co… · w3c/csswg-drafts@a017379 [css-conditional-5][editorial] Rewrap to semantic linebreaks · w3c/csswg-drafts@4be4924
[css-navigation-1] Change `:trigger-link` to `:nav-source` and includ… · w3c/csswg-drafts@d554423
noamr · 2026-07-02 · via Recent Commits to csswg-drafts:main

@@ -596,30 +596,35 @@ by matching the relevant parts of the navigation URL to the link URL.

596596

NOTE: Some of the design discussion for this feature has been in

597597

<a href="https://github.com/w3c/csswg-drafts/issues/13163">w3c/csswg-drafts#13163</a>.

598598599-

<h3 id="trigger-link-pseudo-class">The '':trigger-link'' pseudo-class</h3>

599+

<h3 id="nav-source-pseudo-class">The '':nav-source'' pseudo-class</h3>

600600601-

This specification defines a new

602-

<dfn id="trigger-link-pseudo" selector>'':trigger-link''</dfn>

603-

that matches link elements that trigger the current navigation.

604-605-

The '':trigger-link'' pseudo-class matches any element where both:

606-

* the element matches '':any-link''

607-

* the [=current navigation state=] is not null, and element is its [=navigation state/source element=].

601+

This specification defines a <dfn id="nav-source-pseudo" selector>'':nav-source''</dfn> pseudo-class,

602+

matching the element that triggered the current navigation. It is a CSS reflection of the {{NavigateEvent/sourceElement}} property in the Navigation API.

603+

The trigger element can be an [^a^], [^area^], [^form^], a [^input/type/submit^] input, or a [^button^].

608604609-

Issue: should this apply to forms or submit buttons?

605+

The '':nav-source'' pseudo-class matches any element <var>el</var> where

606+

the [=current navigation state=] is not null, and <var>el</var> is its [=navigation state/source element=].

610607611608

<div class="example">

612609613-

A simple example of a '':trigger-link'' selector is this one,

610+

A simple example of a '':nav-source'' selector is this one,

614611

which sets the ''view-transition-name'' for an image thumbnail that is a child of the link that triggers the current navigation.

615612616-617-

<pre highlight=css>

618-

:trigger-link .thumb {

613+

<pre highlight=css>``

614+

a:nav-source .thumb {

619615

view-transition-name: active-image;

620616

}

621617

</pre>

622618619+

The '':nav-source'' pseudo-class can also be used for forms and submit buttons:

620+621+

<pre highlight=css>``

622+

form:nav-source .submit,

623+

.submit:nav-source {

624+

outline: 3px solid green;

625+

}

626+

</pre>

627+623628

</div>

624629625630

<h2 id="conditional-navigation-queries">Conditional rules for navigation queries</h2>