mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-15 22:48:20 +00:00
Stop nesting states under pseudo-elements (#219)
Tailwind emits variants used inside a pseudo-element rule (hover:, focus-visible:, active:, dark:, not-dark:, data-*, rtl:) as nested &:state rules. Native CSS nesting can't match those, so they never applied in the unminified CDN files. Move each state before the pseudo-element instead.
This commit is contained in:
+42
-3
@@ -1377,15 +1377,54 @@
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range'])::-webkit-slider-thumb {
|
||||
@apply border-ring ring-ring/50 relative size-3 rounded-full border bg-white transition-[color,box-shadow] hover:ring-3 focus-visible:ring-3 active:ring-3 -mt-[calc((var(--slider-thumb-size)-var(--slider-track-height))/2)] focus-visible:outline-hidden;
|
||||
@apply border-ring ring-ring/50 relative size-3 rounded-full border bg-white transition-[color,box-shadow] -mt-[calc((var(--slider-thumb-size)-var(--slider-track-height))/2)];
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range'])::-moz-range-thumb {
|
||||
@apply border-ring ring-ring/50 relative size-3 rounded-full border bg-white transition-[color,box-shadow] hover:ring-3 focus-visible:ring-3 active:ring-3 focus-visible:outline-hidden;
|
||||
@apply border-ring ring-ring/50 relative size-3 rounded-full border bg-white transition-[color,box-shadow];
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range'])::-ms-thumb {
|
||||
@apply border-ring ring-ring/50 relative size-3 rounded-full border bg-white transition-[color,box-shadow] hover:ring-3 focus-visible:ring-3 active:ring-3 focus-visible:outline-hidden;
|
||||
@apply border-ring ring-ring/50 relative size-3 rounded-full border bg-white transition-[color,box-shadow];
|
||||
}
|
||||
|
||||
/* States go before the thumb pseudo-element so they still apply with native CSS nesting. */
|
||||
@media (hover: hover) {
|
||||
:is(.field > input[type='range'], .input[type='range']):hover::-webkit-slider-thumb {
|
||||
@apply ring-3;
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range']):hover::-moz-range-thumb {
|
||||
@apply ring-3;
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range']):hover::-ms-thumb {
|
||||
@apply ring-3;
|
||||
}
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range']):focus-visible::-webkit-slider-thumb {
|
||||
@apply ring-3 outline-hidden;
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range']):focus-visible::-moz-range-thumb {
|
||||
@apply ring-3 outline-hidden;
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range']):focus-visible::-ms-thumb {
|
||||
@apply ring-3 outline-hidden;
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range']):active::-webkit-slider-thumb {
|
||||
@apply ring-3;
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range']):active::-moz-range-thumb {
|
||||
@apply ring-3;
|
||||
}
|
||||
|
||||
:is(.field > input[type='range'], .input[type='range']):active::-ms-thumb {
|
||||
@apply ring-3;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user