Files
heroui-vue/apps/docs/.vitepress/theme/utilities.css
T

63 lines
1.5 KiB
CSS

@import "tailwindcss/theme.css" layer(theme);
@import "../../../../packages/styles/themes/shared/theme.css";
@import "../../../../packages/styles/animations.css";
@import "tailwindcss/utilities.css" layer(utilities);
@source "../../demos";
/* Follow the document's explicit theme, including nested preview scopes. */
@custom-variant dark (&:where(.dark, .dark *, [data-theme="dark"], [data-theme="dark"] *));
@custom-variant motion-reduce {
&:is([data-reduce-motion="true"], [data-reduce-motion="true"] *) {
@slot;
}
@media (prefers-reduced-motion: reduce) {
@slot;
}
}
/* Demo-only utilities ported from the baseline docs global.css. */
@keyframes shine {
0% {
translate: -100% 0;
}
100% {
translate: 100% 0;
}
}
@utility shadow-panel {
box-shadow: var(--surface-shadow);
}
@utility animate-shine {
overflow: hidden;
position: relative;
&::after {
content: "";
position: absolute;
inset: 0;
width: 100%;
height: 100%;
background: linear-gradient(
120deg,
transparent 10%,
rgba(255, 255, 255, 0.3) 45%,
rgba(255, 255, 255, 0.1) 55%,
transparent 90%
);
animation: shine 3s ease-in-out infinite;
pointer-events: none;
}
&:where(.dark, .dark *, [data-theme="dark"], [data-theme="dark"] *)::after {
background: linear-gradient(
120deg,
transparent 10%,
rgba(255, 255, 255, 0.1) 45%,
rgba(255, 255, 255, 0.04) 55%,
transparent 90%
);
}
}