mirror of
https://github.com/nostalgic-css/NES.css.git
synced 2025-09-01 18:13:32 +02:00
Merge branch 'develop' into feat/use-data-uris-for-cursors
This commit is contained in:
@@ -14,11 +14,19 @@ stories.add('input.radio', () => `
|
|||||||
<input type="radio" class="nes-radio" name="answer" />
|
<input type="radio" class="nes-radio" name="answer" />
|
||||||
<span>No</span>
|
<span>No</span>
|
||||||
</label>`)
|
</label>`)
|
||||||
.add('input.checkbox', () => `
|
.add('input.checkbox', () => {
|
||||||
<label>
|
const selectedClass = radios('class', {
|
||||||
<input type="checkbox" class="nes-checkbox" checked />
|
default: '',
|
||||||
|
'is-dark': 'is-dark',
|
||||||
|
}, '');
|
||||||
|
|
||||||
|
return (
|
||||||
|
`<label>
|
||||||
|
<input type="checkbox" class="nes-checkbox ${selectedClass}" checked />
|
||||||
<span>Enable</span>
|
<span>Enable</span>
|
||||||
</label>`)
|
</label>`
|
||||||
|
);
|
||||||
|
})
|
||||||
.add('input', () => {
|
.add('input', () => {
|
||||||
const selectedClass = radios('class', {
|
const selectedClass = radios('class', {
|
||||||
default: '',
|
default: '',
|
||||||
|
@@ -46,6 +46,7 @@
|
|||||||
(2,2,2,2,2,2,2,2,0,0)
|
(2,2,2,2,2,2,2,2,0,0)
|
||||||
);
|
);
|
||||||
$colors: ($base-color, map-get($default-colors, "shadow"));
|
$colors: ($base-color, map-get($default-colors, "shadow"));
|
||||||
|
$colors-checkbox-dark: ($color-white, map-get($default-colors, "shadow"));
|
||||||
|
|
||||||
margin-left: 28px;
|
margin-left: 28px;
|
||||||
-webkit-appearance: none;
|
-webkit-appearance: none;
|
||||||
@@ -80,4 +81,24 @@
|
|||||||
&:checked:focus + span::before {
|
&:checked:focus + span::before {
|
||||||
@include pixelize(2px, $checkbox-checked-focus, $colors);
|
@include pixelize(2px, $checkbox-checked-focus, $colors);
|
||||||
}
|
}
|
||||||
|
&.is-dark {
|
||||||
|
+ span {
|
||||||
|
color: $color-white;
|
||||||
|
}
|
||||||
|
// prettier-ignore
|
||||||
|
+ span::before { /* stylelint-disable-line no-descending-specificity */
|
||||||
|
color: $color-white;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:checked + span::before {
|
||||||
|
@include pixelize(2px, $checkbox-checked-focus, $colors-checkbox-dark);
|
||||||
|
|
||||||
|
color: $color-white;
|
||||||
|
}
|
||||||
|
&:checked:focus + span::before {
|
||||||
|
@include pixelize(2px, $checkbox-checked-focus, $colors-checkbox-dark);
|
||||||
|
|
||||||
|
color: $color-white;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user