values: $zindex-levels,
),
// scss-docs-end utils-zindex
- // scss-docs-start utils-check-colors
- "check-color": (
- property: --#{$prefix}check-checked-bg --#{$prefix}check-checked-border-color --#{$prefix}radio-checked-bg --#{$prefix}radio-checked-border-color --#{$prefix}switch-checked-bg,
- class: checked,
- values: theme-color-values("bg")
- )
- // scss-docs-end utils-check-colors
),
$utilities
);
:where(input) {
appearance: none;
// later: maybe set a tertiary bg color?
- background-color: var(--#{$prefix}check-bg);
- border: 1px solid var(--#{$prefix}check-border-color);
+ background-color: var(--#{$prefix}theme-bg, var(--#{$prefix}check-bg));
+ border: 1px solid var(--#{$prefix}theme-bg, var(--#{$prefix}check-border-color));
// stylelint-disable-next-line property-disallowed-list
border-radius: .25em;
}
:where(input:checked, input:indeterminate) {
- background-color: var(--#{$prefix}check-checked-bg);
- border-color: var(--#{$prefix}check-checked-border-color);
+ background-color: var(--#{$prefix}theme-bg, var(--#{$prefix}check-checked-bg));
+ border-color: var(--#{$prefix}theme-bg, var(--#{$prefix}check-checked-border-color));
}
&:has(input:checked) .checked,
height: 1rem;
margin-block: .125rem;
appearance: none;
- background-color: var(--#{$prefix}radio-bg);
- border: 1px solid var(--#{$prefix}radio-border-color);
+ background-color: var(--#{$prefix}theme-bg, var(--#{$prefix}radio-bg));
+ border: 1px solid var(--#{$prefix}theme-bg, var(--#{$prefix}radio-border-color));
// stylelint-disable-next-line property-disallowed-list
border-radius: 50%;
&:checked {
- color: var(--#{$prefix}primary-contrast);
- background-color: var(--#{$prefix}radio-checked-bg);
- border-color: var(--#{$prefix}radio-checked-border-color);
+ color: var(--#{$prefix}theme-contrast, var(--#{$prefix}primary-contrast));
+ background-color: var(--#{$prefix}theme-bg, var(--#{$prefix}radio-checked-bg));
+ border-color: var(--#{$prefix}theme-bg, var(--#{$prefix}radio-checked-border-color));
&::before {
position: absolute;
## Theme colors
-Modify the appearance of checked checkboxes by adding the `.checked-{color}` class to the `.check` element. This will set the checked background and border color to the theme color.
+Modify the appearance of checked checkboxes by adding the `.theme-{color}` class to the `.check` element. This will set the checked background and border color to the theme color.
<Example class="d-flex flex-column gap-2" code={getData('theme-colors').map((themeColor) => `<b-checkgroup>
- <div class="check checked-${themeColor.name}">
+ <div class="check theme-${themeColor.name}">
<input type="checkbox" id="check${themeColor.name}" checked />
<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'>
<path class="checked" fill='none' stroke='currentcolor' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/>
## Theme colors
-Modify the appearance of checked checkboxes by adding the `.checked-{color}` class to the `.radio` element. This will set the checked background and border color to the theme color.
+Modify the appearance of checked checkboxes by adding the `.theme-{color}` class to the `.radio` element. This will set the checked background and border color to the theme color.
<Example class="d-flex flex-column gap-2" code={getData('theme-colors').map((themeColor) => `<b-radiogroup>
- <input type="radio" id="radio${themeColor.name}" class="radio checked-${themeColor.name}" checked />
+ <input type="radio" id="radio${themeColor.name}" class="radio theme-${themeColor.name}" checked />
<label for="radio${themeColor.name}">Example ${themeColor.name} radio</label>
</b-radiogroup>`)} />