1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-22 05:42:55 +02:00

Merge branch 'develop' into add-psone-controller-icon

This commit is contained in:
Igor Guastalla
2019-02-07 12:19:15 -02:00
committed by GitHub
6 changed files with 3866 additions and 3599 deletions

View File

@@ -10,8 +10,7 @@ module.exports = {
}, },
{ {
test: /\.(jpe?g|png|gif|woff|woff2|eot|ttf|svg)(\?[a-z0-9=.]+)?$/, test: /\.(jpe?g|png|gif|woff|woff2|eot|ttf|svg)(\?[a-z0-9=.]+)?$/,
loader: 'file-loader', loader: 'url-loader',
// loader: 'url-loader?limit=100000',
}, },
], ],
}, },

View File

@@ -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: '',

7416
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -61,7 +61,6 @@
"eslint": "^5.9.0", "eslint": "^5.9.0",
"eslint-config-airbnb-base": "^13.1.0", "eslint-config-airbnb-base": "^13.1.0",
"eslint-plugin-import": "^2.14.0", "eslint-plugin-import": "^2.14.0",
"file-loader": "^2.0.0",
"git-rev-sync": "^1.12.0", "git-rev-sync": "^1.12.0",
"husky": "^1.0.0", "husky": "^1.0.0",
"lint-staged": "^7.3.0", "lint-staged": "^7.3.0",
@@ -78,7 +77,8 @@
"stylelint-config-recess-order": "^2.0.0", "stylelint-config-recess-order": "^2.0.0",
"stylelint-config-standard": "^18.2.0", "stylelint-config-standard": "^18.2.0",
"stylelint-prettier": "^1.0.5", "stylelint-prettier": "^1.0.5",
"stylelint-scss": "^3.3.1" "stylelint-scss": "^3.3.1",
"url-loader": "^1.1.2"
}, },
"browserslist": [ "browserslist": [
"> 1%" "> 1%"

View File

@@ -5,8 +5,9 @@ $font-size: 16px !default;
$base-color: $color-black; $base-color: $color-black;
$background-color: $color-white; $background-color: $color-white;
$cursor-url: url(https://unpkg.com/nes.css/assets/cursor.png); $cursor-url: url(../assets/cursor.png);
$cursor-click-url: url(https://unpkg.com/nes.css/assets/cursor-click.png); $cursor-click-url: url(../assets/cursor-click.png);
$border-size: 4px; $border-size: 4px;
$default-colors: ( $default-colors: (

View File

@@ -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;
}
}
} }