Skip to content

Commit

Permalink
fix(component/starsinput): fix the display of stars in s, l & xl vari…
Browse files Browse the repository at this point in the history
…ations (#1291)
  • Loading branch information
tiloyi committed Dec 14, 2022
1 parent b85410d commit 1bc5d9c
Showing 1 changed file with 40 additions and 18 deletions.
58 changes: 40 additions & 18 deletions packages/styles/components/_c.stars-input.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@
@if ($size != "m") {
@include set-stars-container($props);


$bg-variation-size: map-deep-get($stars-sizes, $size, "width"); // fix for ie11
$bg-variation-size: map-deep-get(
$stars-sizes,
$size,
"width"
); // fix for ie11
$icon-empty: map-deep-get($stars-sizes, $size, "icon-empty");
$icon-full: map-deep-get($stars-sizes, $size, "icon-full");

Expand All @@ -100,23 +103,42 @@
}
}

&__radio {
&:checked,
&:focus {
& ~ #{$parent}__label {
background-image: url(
inline-icons(
$icon-empty,
$color-star-full
));
}
& + #{$parent}__label {
background-image: url(
inline-icons(
$icon-full,
$color-star-full
));
}
}

:checked ~ &__label,
:focus ~ &__label {
background-image: url(inline-icons($icon-empty, $color-star-full));
}

:checked + &__label,
:focus + &__label {
background-image: url(inline-icons($icon-full, $color-star-full));
}

&__radio:hover ~ &__label {
background-image: url(inline-icons($icon-empty, $color-star-full));
}

&__radio:hover + &__label {
background-image: url(inline-icons($icon-full, $color-star-full));
&:hover {
& ~ #{$parent}__label {
background-image: url(
inline-icons(
$icon-empty,
$color-star-full
));
}

& + #{$parent}__label {
background-image: url(
inline-icons(
$icon-full,
$color-star-full
));
}
}
}
}
}
Expand Down

0 comments on commit 1bc5d9c

Please sign in to comment.