mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-14 22:18:19 +00:00
Simplify select component selectors
This commit is contained in:
+12
-12
@@ -468,51 +468,51 @@
|
||||
@apply mb-1 w-full;
|
||||
}
|
||||
/* Select */
|
||||
*:not(select).select > button {
|
||||
.select:not(select) > button {
|
||||
@apply border-input dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 h-8 data-[size=sm]:h-7 gap-1.5 rounded-lg data-[size=sm]:rounded-[min(var(--radius-md),10px)] border bg-transparent py-2 ps-2.5 pe-2 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
*:not(select).select > button > span {
|
||||
.select:not(select) > button > span {
|
||||
@apply gap-1.5;
|
||||
}
|
||||
|
||||
*:not(select).select > button > svg {
|
||||
.select:not(select) > button > svg {
|
||||
@apply text-muted-foreground size-4;
|
||||
}
|
||||
|
||||
*:not(select).select [data-popover] {
|
||||
.select:not(select) [data-popover] {
|
||||
@apply bg-popover text-popover-foreground ring-foreground/10 rounded-lg p-1 shadow-md ring-1 duration-100;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
*:not(select).select [role='listbox'] {
|
||||
.select:not(select) [role='listbox'] {
|
||||
@apply scroll-py-1;
|
||||
}
|
||||
|
||||
*:not(select).select [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
||||
.select:not(select) [role='listbox']:not(:has([data-value]:not([aria-hidden='true'])))::before {
|
||||
@apply py-6 text-center text-sm;
|
||||
}
|
||||
|
||||
*:not(select).select [role='heading'] {
|
||||
.select:not(select) [role='heading'] {
|
||||
@apply text-muted-foreground px-1.5 py-1 text-xs;
|
||||
}
|
||||
|
||||
*:not(select).select [role='option'] {
|
||||
.select:not(select) [role='option'] {
|
||||
@apply gap-1.5 rounded-md py-1 ps-1.5 pe-8 text-sm [&_svg:not([class*='size-'])]:size-4;
|
||||
}
|
||||
|
||||
*:not(select).select [role='option'].active,
|
||||
*:not(select).select [role='option']:focus-visible {
|
||||
.select:not(select) [role='option'].active,
|
||||
.select:not(select) [role='option']:focus-visible {
|
||||
@apply bg-muted text-foreground [&_svg]:text-foreground;
|
||||
}
|
||||
|
||||
*:not(select).select [role='group'] {
|
||||
.select:not(select) [role='group'] {
|
||||
@apply scroll-my-1 p-1;
|
||||
}
|
||||
|
||||
*:not(select).select [role='separator'] {
|
||||
.select:not(select) [role='separator'] {
|
||||
@apply bg-border -mx-1 my-1 h-px;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user