Skip to content

Commit f570d2c

Browse files
committed
feat: add pixel art cursor
Add two png files for the cursor, one to represent the default cursor and the other one to be a pointer cursor. Add the default one for the html tag. And a `inherited` property for label tag. The pointer one is being added on the button, radio, checkbox and a tags.
1 parent f6b0fb3 commit f570d2c

10 files changed

+37
-8
lines changed

assets/cursor-click.png

261 Bytes
Loading

assets/cursor.png

335 Bytes
Loading

css/nes.css

+16-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/nes.css.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

css/nes.min.css

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scss/base/generic.scss

+13
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,26 @@ samp {
99
font-family: $font-family;
1010
}
1111

12+
html {
13+
cursor: $cursor-url, auto;
14+
}
15+
1216
body {
1317
font-size: $font-size;
1418
color: $base-color;
1519
background-color: $background-color;
1620
-webkit-font-smoothing: none;
1721
}
1822

23+
label {
24+
cursor: inherit;
25+
}
26+
27+
a,
28+
button {
29+
cursor: $cursor-click-url, pointer;
30+
}
31+
1932
button,
2033
[type="button"],
2134
[type="reset"],

scss/base/variables.scss

+3
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ $font-size: 16px !default;
44

55
$base-color: $color-black;
66
$background-color: $color-white;
7+
8+
$cursor-url: url(../assets/cursor.png);
9+
$cursor-click-url: url(../assets/cursor-click.png);

scss/elements/buttons.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
margin: $border-size;
2525
text-align: center;
2626
vertical-align: middle;
27-
cursor: pointer;
27+
cursor: $cursor-click-url, pointer;
2828
user-select: none;
2929

3030
@include btn-style($base-color, #fff, #e7e7e7, #adafbc);

scss/elements/checkboxes.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
& + span {
5656
position: relative;
57-
cursor: pointer;
57+
cursor: $cursor-click-url, pointer;
5858
}
5959

6060
& + span::before,

scss/elements/radios.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828

2929
& + span {
3030
position: relative;
31-
cursor: pointer;
31+
cursor: $cursor-click-url, pointer;
3232
}
3333

3434
&:checked + span::before {

0 commit comments

Comments
 (0)