Files
basecoat/src/css/components/switch.css
T

13 lines
782 B
CSS
Raw Normal View History

/* Switch */
@layer components {
:is(.form, .field) input[type='checkbox'][role='switch'],
.input[type='checkbox'][role='switch'] {
@apply appearance-none focus-visible:border-ring focus-visible:ring-ring/50 inline-flex h-[1.15rem] w-8 shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50;
@apply bg-input dark:bg-input/80 checked:bg-primary dark:checked:bg-primary;
@apply before:content-[''] before:pointer-events-none before:block before:size-4 before:rounded-full before:ring-0 before:transition-all;
@apply before:bg-background dark:before:bg-foreground;
@apply dark:checked:before:bg-primary-foreground checked:before:ms-3.5;
}
}