1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-29 16:59:58 +02:00

refactor(icons): use default color

ref #60
This commit is contained in:
Joshua Rouzer
2018-12-09 17:29:53 -05:00
parent 04d2296432
commit 55a6e3ac00
6 changed files with 21 additions and 12 deletions

View File

@@ -1,6 +1,9 @@
@mixin pixelize($matrix, $colors, $size) {
@mixin pixelize($matrix, $colors, $size, $default-color: null) {
$ret: "";
$moz: "";
@if ($default-color == null) {
$default-color: nth($colors, 1);
}
@for $i from 1 through length($matrix) {
$row: nth($matrix, $i);
@@ -15,14 +18,20 @@
}
$color: nth($colors, $dot);
$ret: $ret + ($j * $size) + " " + ($i * $size) + " " + $color;
$moz: $moz + ($j * $size)+" "+ ($i * $size)+" 0 0.020em " + $color;
@if $color == $default-color {
$ret: $ret + ($j * $size) + " " + ($i * $size);
$moz: $moz + ($j * $size) + " " + ($i * $size) + " 0 0.020em";
} @else {
$ret: $ret + ($j * $size) + " " + ($i * $size) + " " + $color;
$moz: $moz + ($j * $size) + " " + ($i * $size) + " 0 0.020em " + $color;
}
}
}
}
width: $size;
height: $size;
color: $default-color;
box-shadow: unquote($ret);
@-moz-document url-prefix() {
-webkit-box-shadow: unquote($moz);