Close! In the CSS icon textbox, enter the following:fa fa-thumbs-up
That'll let you use the Font Awesome thumbs up icon. Keep in mind, you can use the same format for other Font Awesome icons too likefa fa-rocket
.
Is this still correct for the latest version or did something change?
It just seems to display the text
View attachment 256572
how did you get that to work? looks great.Thought it was worth posting this here. This addon with the Font Awesome Duotone icons looks great. Far better than the old sprite stylesheets we were using
View attachment 257169
how did you get that to work? looks great.
/* Like */
.sv-rating-type-icon1{
--fa-primary-color: #2e4164;
--fa-secondary-color: #f4c430;
--fa-secondary-opacity: 1.0;
--fa-primary-opacity: 1.0;
}
/* Agree */
.sv-rating-type-icon2{
--fa-primary-color: #ffffff;
--fa-secondary-color: #548d58;
--fa-secondary-opacity: 1.0;
--fa-primary-opacity: 1.0;
}
Cheers, I've added something based on this post to the FAQp.s. @Xon if it's useful at all, feel free to put any of the above in the FAQ.
neat. how did you settle on the colors? just random ones you liked or did you pick a style set from somewhere in particular? admittedly it seems pretty complicated to setup if you're not that handy with code. @Xon could something like this be "built-in" like a separate option to choose from?Font Awesom 5 have "duotone" icons, e.g. https://fontawesome.com/v5.15/icons/acorn?style=duotone
https://fontawesome.com/v5.15/how-to-use/on-the-web/styling/duotone-icons describes how to style them and Xon's addon gives the class for each icon separately.
My extra.less then just looks like this
Code:/* Like */ .sv-rating-type-icon1{ --fa-primary-color: #2e4164; --fa-secondary-color: #f4c430; --fa-secondary-opacity: 1.0; --fa-primary-opacity: 1.0; } /* Agree */ .sv-rating-type-icon2{ --fa-primary-color: #ffffff; --fa-secondary-color: #548d58; --fa-secondary-opacity: 1.0; --fa-primary-opacity: 1.0; }
To keep it tidy I actually put all the CSS in it's own template (rating_colors.less) and use includes to include that in extra.less but same idea.
p.s. @Xon if it's useful at all, feel free to put any of the above in the FAQ.
neat. how did you settle on the colors? just random ones you liked or did you pick a style set from somewhere in particular? admittedly it seems pretty complicated to setup if you're not that handy with code. @Xon could something like this be "built-in" like a separate option to choose from?
Might be a month or two before I have the time to dig into making a UI for this sort of thing. Honestly picking colors is the hard part@Xon could something like this be "built-in" like a separate option to choose from?
more a thought for the future than anything else. for those of us less inclined to code.Might be a month or two before I have the time to dig into making a UI for this sort of thing. Honestly picking colors is the hard part
well you did goodWe basically experimented a bit and iterated on feedback. The base colours are pretty much from our style with a few highlight colours.
We use essential cookies to make this site work, and optional cookies to enhance your experience.