Hello,
I write a css solution too. ![]()
It will hide the default check icon and add the custom icon to a ::before pseudo.
-
Create a new theme component.
-
Upload the icon to the Uploads section and add the SCSS var name:
review-approved-icon
-
Click Edit CSS/HTML button and paste the following code to Common / CSS section.
Use this if you want to use var(--success) to add color to the custom icon
.reviewable {
.status span.approved {
position: relative;
&:before {
content: url($review-approved-icon);
width: 13px;
height: 13px;
top: 0px;
position: absolute;
// var(--success) light scheme color #090 (custom icon color)
// you can calculate new light color filter here: https://codepen.io/sosuke/pen/Pjoqqp
filter: invert(35%) sepia(92%) saturate(1240%) hue-rotate(91deg) brightness(89%) contrast(104%);
@media (prefers-color-scheme: dark) {
// var(--success) dark scheme color #1ca551 (custom icon color)
// you can calculate new dark color filter here: https://codepen.io/sosuke/pen/Pjoqqp
filter: invert(52%) sepia(26%) saturate(1605%) hue-rotate(93deg) brightness(91%) contrast(78%);
}
}
.d-icon {
visibility: hidden;
}
}
}
Use this if your icon has color what you want to use
.reviewable {
.status span.approved {
position: relative;
&:before {
content: url($review-approved-icon);
width: 13px;
height: 13px;
top: 0px;
position: absolute;
}
.d-icon {
visibility: hidden;
}
}
}
Use this if you want to use different icon on light and dark color scheme
If you choose this then you have to upload two different icon with different colors.
SCSS var name: review-approved-icon-light and review-approved-icon-dark
.reviewable {
.status span.approved {
position: relative;
&:before {
content: url($review-approved-icon-light);
@media (prefers-color-scheme: dark) {
content: url($review-approved-icon-dark);
}
width: 13px;
height: 13px;
top: 0px;
position: absolute;
}
.d-icon {
visibility: hidden;
}
}
}



