Skip to content

Commit

Permalink
fix(rating): partial rating needs webkit prefix
Browse files Browse the repository at this point in the history
The autoprefixer was not creating the vendor specific attributes for the rating module anymore, making partial ratings not visually work in chrome/webkit based browsers.
  • Loading branch information
lubber-de committed Jul 24, 2021
1 parent c65b85c commit 6ceeeb8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 12 deletions.
30 changes: 18 additions & 12 deletions src/definitions/modules/rating.less
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,20 @@
color: @activeColor;
}

/* Partially Active Icon */
.ui.rating .icon.partial.active {
background: linear-gradient(to right, @activeColor 0% var(--full), @inactiveColor var(--full) 100%);
background-clip: text;
color: transparent;
}
& when (@variationRatingPartial) {
/* Partially Active Icon */
.ui.rating .icon.partial.active {
background: linear-gradient(to right, @activeColor 0% var(--full), @inactiveColor var(--full) 100%);
}

/* central override for colors */
.ui.ui.rating .icon.partial.active {
-webkit-background-clip: text;
background-clip: text;
color: transparent;
text-shadow: none;
}
}
/* Selected Icon */
.ui.rating .icon.selected,
.ui.rating .icon.selected.active,
Expand Down Expand Up @@ -116,12 +123,11 @@ each(@colors, {
-webkit-text-stroke: unset;
background-clip: unset;
}
.ui.@{color}.rating .icon.partial.active {
background: linear-gradient(to right, @l 0% var(--full), @inactiveColor var(--full) 100%);
text-shadow: none;
-webkit-text-stroke: @c 0.78px;
background-clip: text;
color: transparent;
& when (@variationRatingPartial) {
.ui.@{color}.rating .icon.partial.active {
background: linear-gradient(to right, @l 0% var(--full), @inactiveColor var(--full) 100%);
-webkit-text-stroke: @c 0.78px;
}
}
})

Expand Down
1 change: 1 addition & 0 deletions src/themes/default/globals/variation.variables
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,7 @@

/* Rating */
@variationRatingDisabled: true;
@variationRatingPartial: true;
@variationRatingSizes: @variationAllSizes;

/* Search */
Expand Down

0 comments on commit 6ceeeb8

Please sign in to comment.