half a star

newbie here: was trying to color my star icon (in this case, 20% of it as red color solid, rest will have default color) is that achivable?
No description
6 Replies
clevermissfox
clevermissfox•12mo ago
Linear-gradient!
slavemaster
slavemasterOP•12mo ago
can you guide me a bit more? im really new at this, been trying random things 😅
No description
clevermissfox
clevermissfox•12mo ago
Is the star an svg or are you using a font awesome icon or something ? You would need the color to also be transparent if you’re using background clip
slavemaster
slavemasterOP•12mo ago
font awesome icon
Tok124 (CSS Nerd)
Tok124 (CSS Nerd)•12mo ago
No description
slavemaster
slavemasterOP•12mo ago
style="{{ $i >= $average_rating && $i < 5 && $percentage > 0
? ('color:yellow; background: -webkit-linear-gradient(left, #e40808 $percentage%, #6E6C6E 44%); -webkit-background-clip: text; -webkit-text-fill-color: transparent;')
: '' }}"
style="{{ $i >= $average_rating && $i < 5 && $percentage > 0
? ('color:yellow; background: -webkit-linear-gradient(left, #e40808 $percentage%, #6E6C6E 44%); -webkit-background-clip: text; -webkit-text-fill-color: transparent;')
: '' }}"
my variable $percentage isnt working on the html style of some div (php blade btw) how can i access and use it?
Want results from more Discord servers?
Add your server