1
0
mirror of https://github.com/nostalgic-css/NES.css.git synced 2025-08-22 13:52:48 +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

@@ -40,14 +40,14 @@
} }
&.heart::before { &.heart::before {
@include pixelize($icon-heart, $icon-heart-colors, $px); @include pixelize($icon-heart, $icon-heart-colors, $px, nth($icon-heart-colors, 3));
} }
&.heart.is-empty::before { &.heart.is-empty::before {
@include pixelize($icon-heart-empty, $icon-heart-empty-colors, $px); @include pixelize($icon-heart-empty, $icon-heart-empty-colors, $px);
} }
&.star::before { &.star::before {
@include pixelize($icon-star, $icon-star-colors, $px); @include pixelize($icon-star, $icon-star-colors, $px, nth($icon-star-colors, 3));
} }
&.star.is-empty::before { &.star.is-empty::before {
@include pixelize($icon-star-empty, $icon-star-empty-colors, $px); @include pixelize($icon-star-empty, $icon-star-empty-colors, $px);
@@ -78,15 +78,15 @@
} }
&.facebook::before { &.facebook::before {
@include pixelize($icon-facebook, $icon-facebook-colors, $px); @include pixelize($icon-facebook, $icon-facebook-colors, $px, nth($icon-facebook-colors, 2));
} }
&.github::before { &.github::before {
@include pixelize($icon-github, $icon-github-colors, $px); @include pixelize($icon-github, $icon-github-colors, $px, nth($icon-github-colors, 2));
} }
&.youtube::before { &.youtube::before {
@include pixelize($icon-youtube, $icon-youtube-colors, $px); @include pixelize($icon-youtube, $icon-youtube-colors, $px, nth($icon-youtube-colors, 2));
} }
&.close::before { &.close::before {

View File

@@ -34,6 +34,6 @@
content: ""; content: "";
background: transparent; background: transparent;
@include pixelize($bcrikko, $bcrikko-colors, $px); @include pixelize($bcrikko, $bcrikko-colors, $px, nth($bcrikko-colors, 2));
} }
} }

View File

@@ -28,6 +28,6 @@
content: ""; content: "";
background: transparent; background: transparent;
@include pixelize($logo, $logo-colors, $px); @include pixelize($logo, $logo-colors, $px, nth($logo-colors, 2));
} }
} }

View File

@@ -28,6 +28,6 @@
content: ""; content: "";
background: transparent; background: transparent;
@include pixelize($logo, $logo-colors, $px); @include pixelize($logo, $logo-colors, $px, nth($logo-colors, 2));
} }
} }

View File

@@ -28,6 +28,6 @@
content: ""; content: "";
background: transparent; background: transparent;
@include pixelize($logo, $logo-colors, $px); @include pixelize($logo, $logo-colors, $px, nth($logo-colors, 2));
} }
} }

View File

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