WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 4f9ce91

Browse files
Replace CSS links with macros
1 parent e43cd22 commit 4f9ce91

File tree

9 files changed

+34
-26
lines changed

9 files changed

+34
-26
lines changed

files/en-us/web/api/popover_api/using_interest_invokers/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ When styling popovers used with interest invokers, you can use the same styling
113113

114114
That said, there are some CSS features specific to interest invokers:
115115

116-
- The [`interest-delay`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay) shorthand property and its related [`interest-delay-start`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-start) and [`interest-delay-end`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-end) longhands: These can be used to add a delay between the user gaining or losing interest and the browser acting on that change — for example, showing or hiding a popover.
117-
- The [`:interest-source`](/en-US/docs/Web/CSS/Reference/Selectors/:interest-source) and [`:interest-target`](/en-US/docs/Web/CSS/Reference/Selectors/:interest-target) pseudo-classes: These can be used to apply styles to the interest invoker and its associated target element, respectively, only when interest is indicated.
116+
- The {{cssxref("interest-delay")}} shorthand property and its related {{cssxref("interest-delay-start")}} and {{cssxref("interest-delay-end")}} longhands: These can be used to add a delay between the user gaining or losing interest and the browser acting on that change — for example, showing or hiding a popover.
117+
- The {{cssxref(":interest-source")}} and {{cssxref(":interest-target")}} pseudo-classes: These can be used to apply styles to the interest invoker and its associated target element, respectively, only when interest is indicated.
118118

119119
Let's look at a simple example that demonstrates how these features work.
120120

@@ -365,7 +365,7 @@ p {
365365
}
366366
```
367367
368-
Next, we apply some styles to the buttons, only when interest is being shown, using the [`:interest-source`](/en-US/docs/Web/CSS/Reference/Selectors/:interest-source) pseudo-class. This allows users to easily see which button interest is being shown on at any point:
368+
Next, we apply some styles to the buttons, only when interest is being shown, using the {{cssxref(":interest-source")}} pseudo-class. This allows users to easily see which button interest is being shown on at any point:
369369
370370
```css live-sample___non-popover
371371
button:interest-source {
@@ -471,7 +471,7 @@ In the markup, we include a link to my GitHub profile inside a short paragraph,
471471
472472
### CSS
473473
474-
We begin our styles by setting an [`interest-delay-start`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-start) value of `1s` on the link (the `a[interestfor]` selector is useful for selecting only links that are interest invokers). We are setting this to increase the delay between a user pausing over a link and the popover appearing. It could be annoying to have popovers appearing too quickly on a dense, link-heavy page.
474+
We begin our styles by setting an {{cssxref("interest-delay-start")}} value of `1s` on the link (the `a[interestfor]` selector is useful for selecting only links that are interest invokers). We are setting this to increase the delay between a user pausing over a link and the popover appearing. It could be annoying to have popovers appearing too quickly on a dense, link-heavy page.
475475
476476
```css hidden live-sample___link-preview-popover
477477
html {
@@ -522,7 +522,7 @@ Our next CSS rule sets a `position-area` value of `bottom right` on our popover
522522
}
523523
```
524524
525-
In our last CSS block, we to animate the popover's {{cssxref("opacity")}} property smoothly as it appears (when interest is shown, as specified by the [`:interest-target`](/en-US/docs/Web/CSS/Reference/Selectors/:interest-target) pseudo-class). Because the popover is animating from being hidden (via `display: none`), there are a few extra features required to achieve this. We need to animate the {{cssxref("overlay")}} and {{cssxref("display")}} properties, setting [`allow-discrete`](/en-US/docs/Web/CSS/Reference/Properties/transition-behavior#allow-discrete) as we do so to allow discrete animations, and we need to use a {{cssxref("@starting-style")}} block to set the starting styles for the popover in the "interest target" state, as it has not previously been rendered visually.
525+
In our last CSS block, we to animate the popover's {{cssxref("opacity")}} property smoothly as it appears (when interest is shown, as specified by the {{cssxref(":interest-target")}} pseudo-class). Because the popover is animating from being hidden (via `display: none`), there are a few extra features required to achieve this. We need to animate the {{cssxref("overlay")}} and {{cssxref("display")}} properties, setting [`allow-discrete`](/en-US/docs/Web/CSS/Reference/Properties/transition-behavior#allow-discrete) as we do so to allow discrete animations, and we need to use a {{cssxref("@starting-style")}} block to set the starting styles for the popover in the "interest target" state, as it has not previously been rendered visually.
526526
527527
```css hidden live-sample___link-preview-popover
528528
[popover]:interest-target {

files/en-us/web/css/guides/basic_user_interface/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ Click "Play" in the example above to see or edit the code for the animation in t
9191
- {{CSSxRef("caret-color")}}
9292
- {{CSSxRef("caret-shape")}}
9393
- {{CSSxRef("cursor")}}
94-
- [`interest-delay`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay), shorthand for:
95-
- [`interest-delay-start`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-start)
96-
- [`interest-delay-end`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-end)
94+
- {{CSSxRef("interest-delay")}}, shorthand for:
95+
- {{CSSxRef("interest-delay-start")}}
96+
- {{CSSxRef("interest-delay-end")}}
9797
- {{CSSxRef("outline")}}, shorthand for:
9898
- {{CSSxRef("outline-color")}}
9999
- {{CSSxRef("outline-style")}}

files/en-us/web/css/guides/selectors/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ The CSS selectors module also introduces the [column combinator](/en-US/docs/Web
5353
- {{CSSXref(":hover")}}
5454
- {{CSSXref(":in-range")}}
5555
- {{CSSXref(":indeterminate")}}
56-
- [`:interest-source`](/en-US/docs/Web/CSS/Reference/Selectors/:interest-source)
57-
- [`:interest-target`](/en-US/docs/Web/CSS/Reference/Selectors/:interest-target)
56+
- {{CSSXref(":interest-source")}}
57+
- {{CSSXref(":interest-target")}}
5858
- {{CSSXref(":invalid")}}
5959
- {{CSSXref(":is", ":is()")}}
6060
- {{CSSXref(":lang", ":lang()")}}

files/en-us/web/css/reference/properties/interest-delay-end/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sidebar: cssref
1212

1313
The **`interest-delay-end`** [CSS](/en-US/docs/Web/CSS) property specifies a delay between the user losing interest in an [interest invoker](/en-US/docs/Web/API/Popover_API/Using_interest_invokers) element and the {{domxref("HTMLElement.loseinterest_event", "loseinterest")}} event being fired, which typically ends an effect on the target.
1414

15-
The `interest-delay-end` and [`interest-delay-start`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-start) properties can both be set using the [`interest-delay`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay) shorthand.
15+
The `interest-delay-end` and {{cssxref("interest-delay-start")}} properties can both be set using the {{cssxref("interest-delay")}} shorthand.
1616

1717
## Syntax
1818

@@ -108,7 +108,7 @@ Now try checking the checkbox and trying the same actions again. This time, the
108108

109109
## See also
110110

111-
- [`interest-delay-start`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-start), [`interest-delay`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay)
111+
- {{cssxref("interest-delay-start")}}, {{cssxref("interest-delay")}}
112112
- [Popover API](/en-US/docs/Web/API/Popover_API)
113113
- [Using interest invokers](/en-US/docs/Web/API/Popover_API/Using_interest_invokers)
114114
- [CSS basic user interface module](/en-US/docs/Web/CSS/Guides/Basic_user_interface)

files/en-us/web/css/reference/properties/interest-delay-start/index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ sidebar: cssref
1212

1313
The **`interest-delay-start`** [CSS](/en-US/docs/Web/CSS) property specifies a delay between the user showing interest in an [interest invoker](/en-US/docs/Web/API/Popover_API/Using_interest_invokers) element and the {{domxref("HTMLElement.interest_event", "interest")}} event being fired, which typically starts an effect on the target.
1414

15-
The `interest-delay-start` and [`interest-delay-end`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-end) properties can both be set using the [`interest-delay`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay) shorthand.
15+
The `interest-delay-start` and {{cssxref("interest-delay-end")}} properties can both be set using the {{cssxref("interest-delay")}} shorthand.
1616

1717
## Syntax
1818

@@ -131,7 +131,7 @@ button {
131131
}
132132
```
133133

134-
Finally, we combine the [`:interest-source`](/en-US/docs/Web/CSS/Reference/Selectors/:interest-source) pseudo-class with the {{cssxref(":has()")}} pseudo-class to create a ruleset that applies `interest-delay-start: 0s` to all buttons inside the paragraph, only if the paragraph contains a button that interest has been shown on (that is, has been selected by `button:interest-source`).
134+
Finally, we combine the {{cssxref(":interest-source")}} pseudo-class with the {{cssxref(":has()")}} pseudo-class to create a ruleset that applies `interest-delay-start: 0s` to all buttons inside the paragraph, only if the paragraph contains a button that interest has been shown on (that is, has been selected by `button:interest-source`).
135135

136136
```css live-sample___interest-delay-remove-on-interest
137137
.container:has(button:interest-source) button {
@@ -157,7 +157,7 @@ Try showing interest in any button and notice how, when you then immediately sho
157157

158158
## See also
159159

160-
- [`interest-delay-end`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-end), [`interest-delay`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay)
160+
- {{cssxref("interest-delay-end")}}, {{cssxref("interest-delay")}}
161161
- [Popover API](/en-US/docs/Web/API/Popover_API)
162162
- [Using interest invokers](/en-US/docs/Web/API/Popover_API/Using_interest_invokers)
163163
- [CSS basic user interface module](/en-US/docs/Web/CSS/Guides/Basic_user_interface)

files/en-us/web/css/reference/properties/interest-delay/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ The **`interest-delay`** [CSS](/en-US/docs/Web/CSS) property specifies a delay,
1616

1717
The `interest-delay` property is a shorthand for the following properties:
1818

19-
- [`interest-delay-start`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-start)
20-
- [`interest-delay-end`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-end)
19+
- {{cssxref("interest-delay-start")}}
20+
- {{cssxref("interest-delay-end")}}
2121

2222
## Syntax
2323

@@ -54,11 +54,11 @@ A control element such as an {{htmlelement("a")}} or {{htmlelement("button")}} c
5454

5555
When the user shows/loses interest, the associated effect doesn't start/stop immediately — the browser introduces a short delay, which may vary by vendor. This makes sense — it would be annoying, for example, for preview popovers to appear immediately every time a link is hovered.
5656

57-
The `interest-delay` property allows developers to customize the delay before the interest effect starts (specified individually by the [`interest-delay-start`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-start) property) and the delay before the interest effect ends (specified individually by the [`interest-delay-end`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-end) property).
57+
The `interest-delay` property allows developers to customize the delay before the interest effect starts (specified individually by the {{cssxref("interest-delay-start")}} property) and the delay before the interest effect ends (specified individually by the {{cssxref("interest-delay-end")}} property).
5858

5959
The `interest-delay` property can take one or two values. These values can be the keyword `normal`, which sets the default browser delay, or a {{cssxref("<time>")}} value, which sets a custom delay. Custom delays must be positive values, otherwise the property is invalid.
6060

61-
If a single value is specified, that value is set for the [`interest-delay-start`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-start) and [`interest-delay-end`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-end). If two values are specified, the first value is set for the [`interest-delay-start`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-start) and the second value is set for the [`interest-delay-end`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-end).
61+
If a single value is specified, that value is set for the {{cssxref("interest-delay-start")}} and {{cssxref("interest-delay-end")}}. If two values are specified, the first value is set for the {{cssxref("interest-delay-start")}} and the second value is set for the {{cssxref("interest-delay-end")}}.
6262

6363
## Formal definition
6464

@@ -129,7 +129,7 @@ Now try checking the checkbox and trying the same actions again. This time, the
129129

130130
## See also
131131

132-
- [`interest-delay-start`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-start), [`interest-delay-end`](/en-US/docs/Web/CSS/Reference/Properties/interest-delay-end)
132+
- {{cssxref("interest-delay-start")}}, {{cssxref("interest-delay-end")}}
133133
- [Popover API](/en-US/docs/Web/API/Popover_API)
134134
- [Using interest invokers](/en-US/docs/Web/API/Popover_API/Using_interest_invokers)
135135
- [CSS basic user interface module](/en-US/docs/Web/CSS/Guides/Basic_user_interface)

files/en-us/web/css/reference/selectors/_colon_interest-source/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Try showing interest in the button (for example by hovering or focusing it), and
7373

7474
## See also
7575

76-
- [`:interest-target`](/en-US/docs/Web/CSS/Reference/Selectors/:interest-target)
76+
- {{cssxref(":interest-target")}}
7777
- [Popover API](/en-US/docs/Web/API/Popover_API)
7878
- [Using interest invokers](/en-US/docs/Web/API/Popover_API/Using_interest_invokers)
7979
- [CSS selectors module](/en-US/docs/Web/CSS/Guides/Selectors)

files/en-us/web/css/reference/selectors/_colon_interest-target/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Try showing interest in the button (for example by hovering or focusing it), and
7878

7979
## See also
8080

81-
- [`:interest-source`](/en-US/docs/Web/CSS/Reference/Selectors/:interest-source)
81+
- {{cssxref(":interest-source")}}
8282
- [Popover API](/en-US/docs/Web/API/Popover_API)
8383
- [Using interest invokers](/en-US/docs/Web/API/Popover_API/Using_interest_invokers)
8484
- [CSS selectors module](/en-US/docs/Web/CSS/Guides/Selectors)

package-lock.json

Lines changed: 12 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)