Skip to content

Commit db4027d

Browse files
fix(popover): transitions work!
n
1 parent 7ed150c commit db4027d

File tree

2 files changed

+7
-2
lines changed
  • apps/website/src/routes/docs/headless/popover/examples
  • packages/kit-headless/src/components/popover

2 files changed

+7
-2
lines changed

apps/website/src/routes/docs/headless/popover/examples/hero.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ import { Popover, PopoverTrigger } from '@qwik-ui/headless';
44
export default component$(() => {
55
useStyles$(`
66
.my-transition {
7-
transition: 300ms opacity ease;
7+
transition: opacity 0.5s, display 0.5s allow-discrete, overlay 0.5s allow-discrete;
8+
}
9+
10+
@supports not selector(:popover-open) {
11+
.my-transition {
12+
transition: opacity 0.5s;
13+
}
814
}
915
1016
.my-transition.popover-showing {

packages/kit-headless/src/components/popover/utils.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export function supportShowAnimation(popover: HTMLElement, isPolyfill: boolean)
1717
* export function supportClosingAnimation(popover: HTMLElement, afterAnimate: () => void) {
1818
*/
1919
export function supportClosingAnimation(popover: HTMLElement) {
20-
console.log('Closing animation:', popover.classList.contains('popover-showing'));
2120
popover.classList.remove('popover-showing');
2221
popover.classList.add('popover-closing');
2322

0 commit comments

Comments
 (0)