Skip to content

Commit

Permalink
feat: add pixel art cursor
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
evaporei committed Dec 7, 2018
1 parent f6b0fb3 commit f570d2c
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 8 deletions.
Binary file added assets/cursor-click.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/cursor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 16 additions & 3 deletions css/nes.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion css/nes.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion css/nes.min.css

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions scss/base/generic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,26 @@ samp {
font-family: $font-family;
}

html {
cursor: $cursor-url, auto;
}

body {
font-size: $font-size;
color: $base-color;
background-color: $background-color;
-webkit-font-smoothing: none;
}

label {
cursor: inherit;
}

a,
button {
cursor: $cursor-click-url, pointer;
}

button,
[type="button"],
[type="reset"],
Expand Down
3 changes: 3 additions & 0 deletions scss/base/variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@ $font-size: 16px !default;

$base-color: $color-black;
$background-color: $color-white;

$cursor-url: url(../assets/cursor.png);
$cursor-click-url: url(../assets/cursor-click.png);
2 changes: 1 addition & 1 deletion scss/elements/buttons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
margin: $border-size;
text-align: center;
vertical-align: middle;
cursor: pointer;
cursor: $cursor-click-url, pointer;
user-select: none;

@include btn-style($base-color, #fff, #e7e7e7, #adafbc);
Expand Down
2 changes: 1 addition & 1 deletion scss/elements/checkboxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@

& + span {
position: relative;
cursor: pointer;
cursor: $cursor-click-url, pointer;
}

& + span::before,
Expand Down
2 changes: 1 addition & 1 deletion scss/elements/radios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

& + span {
position: relative;
cursor: pointer;
cursor: $cursor-click-url, pointer;
}

&:checked + span::before {
Expand Down

0 comments on commit f570d2c

Please sign in to comment.