You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[:any-link] lets you to use the proposed [`:any-link`] pseudo-class in CSS.
10
10
11
11
`:any-link` simplifies selectors targeting links, as the naming of `:link` is misleading; it specifically means unvisited links only, rather than all links.
12
12
13
13
```css
14
-
/* before */
15
-
16
14
nav:any-link>span {
17
15
background-color: yellow;
18
16
}
19
17
20
-
/*after*/
18
+
/*becomes*/
21
19
22
-
nav:link>span,
23
-
nav:visited>span {
20
+
nav:link>span, nav:visited>span {
24
21
background-color: yellow;
25
22
}
26
23
```
@@ -29,28 +26,20 @@ From the [proposal]:
29
26
30
27
> The [`:any-link`] pseudo-class represents an element that acts as the source anchor of a hyperlink. It matches an element if the element would match [`:link`] or [`:visited`].
31
28
32
-
## Options
33
-
34
-
**prefix** (string): prepends a prefix (surrounded by dashes) to the pseudo-class, preventing any clash with native syntax.
0 commit comments