mirror of
https://github.com/hunvreus/basecoat.git
synced 2026-11-11 04:38:18 +00:00
Narrow dark mode selectors
This commit is contained in:
@@ -2,6 +2,10 @@
|
||||
|
||||
## Unreleased
|
||||
|
||||
### Changed
|
||||
|
||||
- Narrowed dark-mode generated selectors to `html.dark` to reduce broad style recalculation work.
|
||||
|
||||
## [1.0.0-beta.7] - 2026-06-25
|
||||
|
||||
### Added
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
@custom-variant dark (&:is(.dark *));
|
||||
@custom-variant dark (&:is(html.dark *));
|
||||
|
||||
:root {
|
||||
--radius: 0.625rem;
|
||||
|
||||
@@ -803,11 +803,11 @@
|
||||
@apply bg-background rounded-full shadow-sm not-dark:bg-clip-padding;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
@apply bg-foreground;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
@apply bg-primary-foreground;
|
||||
}
|
||||
|
||||
|
||||
@@ -800,11 +800,11 @@
|
||||
@apply bg-background rounded-full;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
@apply bg-foreground;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
@apply bg-primary-foreground;
|
||||
}
|
||||
|
||||
|
||||
@@ -791,11 +791,11 @@
|
||||
@apply bg-background rounded-full;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
@apply bg-foreground;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
@apply bg-primary-foreground;
|
||||
}
|
||||
|
||||
|
||||
@@ -795,11 +795,11 @@
|
||||
@apply bg-background rounded-full;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
@apply bg-foreground;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
@apply bg-primary-foreground;
|
||||
}
|
||||
|
||||
|
||||
@@ -808,11 +808,11 @@
|
||||
@apply bg-background rounded-full;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
@apply bg-foreground;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
@apply bg-primary-foreground;
|
||||
}
|
||||
|
||||
|
||||
@@ -803,11 +803,11 @@
|
||||
@apply bg-background rounded-2xl shadow-sm not-dark:bg-clip-padding;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
@apply bg-foreground;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
@apply bg-primary-foreground;
|
||||
}
|
||||
|
||||
|
||||
@@ -824,11 +824,11 @@
|
||||
@apply bg-background;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
@apply bg-foreground;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
@apply bg-primary-foreground;
|
||||
}
|
||||
|
||||
|
||||
@@ -808,11 +808,11 @@
|
||||
@apply bg-background rounded-full;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):not(:checked):before {
|
||||
@apply bg-foreground;
|
||||
}
|
||||
|
||||
.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
html.dark :is(.field > input[type='checkbox'][role='switch'], .input[type='checkbox'][role='switch']):checked:before {
|
||||
@apply bg-primary-foreground;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user