Skip to content

Commit

Permalink
perf(icons): fix pixelize for radio checkbox and list
Browse files Browse the repository at this point in the history
ref #205
  • Loading branch information
jjspace committed Dec 20, 2018
1 parent e78e07d commit ff74f17
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
9 changes: 5 additions & 4 deletions scss/elements/checkboxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,22 +62,23 @@
position: absolute;
top: -3px;
left: -28px;
font-size: 2px;
content: "";
}

// prettier-ignore
& + span::before { /* stylelint-disable-line no-descending-specificity */
@include pixelize($checkbox, $colors, 2px);
@include pixelize($checkbox, $colors);
}
// prettier-ignore
&:focus + span::before { /* stylelint-disable-line no-descending-specificity */
@include pixelize($checkbox-focus, $colors, 2px);
@include pixelize($checkbox-focus, $colors);
}

&:checked + span::before {
@include pixelize($checkbox-checked, $colors, 2px);
@include pixelize($checkbox-checked, $colors);
}
&:checked:focus + span::before {
@include pixelize($checkbox-checked-focus, $colors, 2px);
@include pixelize($checkbox-checked-focus, $colors);
}
}
6 changes: 4 additions & 2 deletions scss/elements/lists.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,19 @@
position: absolute;
top: calc(50% - 8px);
left: -22px;
font-size: 2px;
content: "";

@include pixelize($disc, $colors, 2px);
@include pixelize($disc, $colors);
}

&.is-circle li::before {
position: absolute;
top: calc(50% - 8px);
left: -22px;
font-size: 2px;
content: "";

@include pixelize($circle, $colors, 2px);
@include pixelize($circle, $colors);
}
}
5 changes: 3 additions & 2 deletions scss/elements/radios.scss
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,10 @@
position: absolute;
top: -2px;
left: -20px;
font-size: 2px;
content: "";

@include pixelize($radio, $colors, 2px);
@include pixelize($radio, $colors);
}

&:checked:hover,
Expand All @@ -48,6 +49,6 @@
}

&:checked:focus + span::before {
@include pixelize($radio-checked-focus, $colors, 2px);
@include pixelize($radio-checked-focus, $colors);
}
}
2 changes: 0 additions & 2 deletions scss/icons/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@
top: -1em;
left: -1em;
display: block;
width: 1em;
height: 1em;
content: "";
background: transparent;
}
Expand Down

0 comments on commit ff74f17

Please sign in to comment.