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
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
Copy file name to clipboardExpand all lines: files/en-us/web/api/popover_api/using_interest_invokers/index.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -113,8 +113,8 @@ When styling popovers used with interest invokers, you can use the same styling
113
113
114
114
That said, there are some CSS features specific to interest invokers:
115
115
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.
118
118
119
119
Let's look at a simple example that demonstrates how these features work.
120
120
@@ -365,7 +365,7 @@ p {
365
365
}
366
366
```
367
367
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:
369
369
370
370
```css live-sample___non-popover
371
371
button:interest-source {
@@ -471,7 +471,7 @@ In the markup, we include a link to my GitHub profile inside a short paragraph,
471
471
472
472
### CSS
473
473
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.
475
475
476
476
```css hidden live-sample___link-preview-popover
477
477
html {
@@ -522,7 +522,7 @@ Our next CSS rule sets a `position-area` value of `bottom right` on our popover
522
522
}
523
523
```
524
524
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 "interesttarget" 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 "interesttarget" state, as it has not previously been rendered visually.
Copy file name to clipboardExpand all lines: files/en-us/web/css/reference/properties/interest-delay-end/index.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ sidebar: cssref
12
12
13
13
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.
14
14
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.
16
16
17
17
## Syntax
18
18
@@ -108,7 +108,7 @@ Now try checking the checkbox and trying the same actions again. This time, the
Copy file name to clipboardExpand all lines: files/en-us/web/css/reference/properties/interest-delay-start/index.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ sidebar: cssref
12
12
13
13
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.
14
14
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.
16
16
17
17
## Syntax
18
18
@@ -131,7 +131,7 @@ button {
131
131
}
132
132
```
133
133
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`).
@@ -54,11 +54,11 @@ A control element such as an {{htmlelement("a")}} or {{htmlelement("button")}} c
54
54
55
55
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 timealink is hovered.
56
56
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).
58
58
59
59
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.
60
60
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")}}.
62
62
63
63
## Formal definition
64
64
@@ -129,7 +129,7 @@ Now try checking the checkbox and trying the same actions again. This time, the
0 commit comments