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: apps/website/src/routes/docs/headless/popover/index.mdx
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -143,7 +143,7 @@ Entry and exit animations have often been a frustrating experience in web develo
143
143
144
144
Until recently, discrete properties were not animatable. Luckily, there's [new properties to CSS](https://developer.chrome.com/blog/entry-exit-animations) that solve this problem.
145
145
146
-
The browser support for these is similar to support of the popover API. That said, the Qwik UI team has done an awesome job of managing animations on polyfill browsers for you using the `popover-showing` and `popover-closing`classes.
146
+
The browser support for these is similar to support of the popover API. That said, the Qwik UI team has done an awesome job of managing animations on polyfill browsers for you using the `data-open` and `data-closing`attributes.
147
147
148
148
```css
149
149
.my-transition {
@@ -159,11 +159,11 @@ The browser support for these is similar to support of the popover API. That sai
159
159
opacity: 0;
160
160
}
161
161
162
-
.popover-showing {
162
+
.my-transition[data-open] {
163
163
opacity: 1;
164
164
}
165
165
166
-
.popover-closing {
166
+
.my-transition[data-closing] {
167
167
opacity: 0;
168
168
}
169
169
```
@@ -333,9 +333,9 @@ We put it under an `@layer` so that it can be easily overridden when adding your
333
333
334
334
To use an animation, add the following CSS classes to the component.
335
335
336
-
- The `.popover-showing` class determines the animation that happens when it is first opened.
336
+
- The `data-open` attribute determines the animation that happens when it is first opened.
337
337
338
-
- The `.popover-closing` class determines what class is added when the listbox is **closed**.
338
+
- The `data-closing` class determines what class is added when the listbox is **closed**.
339
339
340
340
Here's the CSS imported from the example:
341
341
@@ -344,11 +344,11 @@ Here's the CSS imported from the example:
@@ -377,7 +377,7 @@ Here's the CSS imported from the example:
377
377
378
378
### Transition declarations
379
379
380
-
Transitions use the same classes for entry and exit animations. Those being `.popover-showing` and `.popover-closing`. They are explained more in the `Caveats` section.
380
+
Transitions use the same classes for entry and exit animations. Those being `data-open` and `data-closing`. They are explained more in the `Caveats` section.
381
381
382
382
<Showcasename="transition" />
383
383
@@ -395,11 +395,11 @@ CSS from the example:
395
395
transition-behavior: allow-discrete;
396
396
}
397
397
398
-
.popover-transition.popover-showing {
398
+
.popover-transition[data-open] {
399
399
opacity: 1;
400
400
}
401
401
402
-
.popover-transition.popover-closing {
402
+
.popover-transition[data-closing] {
403
403
opacity: 0;
404
404
}
405
405
```
@@ -461,19 +461,19 @@ To read more about the popover API you can check it out on:
461
461
description: 'Style the element when the popover is open.',
462
462
},
463
463
{
464
-
name: '.popover-open',
465
-
type: 'class',
466
-
description: 'Polyfill class added to style unsupported browsers.',
464
+
name: 'data-closing',
465
+
type: 'selector',
466
+
description: 'Style the element when the popover is closing.',
467
467
},
468
468
{
469
-
name: '.popover-showing',
470
-
type: 'class',
471
-
description: 'Class to animate entry behavior.',
469
+
name: 'data-closed',
470
+
type: 'selector',
471
+
description: 'Style the element when the popover is closed.',
0 commit comments