Why is the stars selecting back wards?
Why is the stars selecting back wards?
https://codepen.io/T031C/pen/yLqOEQZ
10 Replies
because of this
Is there a way to fix it?
what do you mean by fix it ?
Turning it around
it does what you tell it to do
you could use flexbox i guess
Oh
by which Mannix means setting
display: flex
on the parent containing the stars, along with flex-direction: row-reverse;
Ah thanks now I understand more
@toxic_dev there's an answer on SO you might be able to adapt: https://stackoverflow.com/a/27993987
Stack Overflow
Is there a "previous sibling" selector?
The plus sign selector (+) is for selecting the next adjacent sibling.
Is there an equivalent for the previous sibling?
the main issue is going to be making sure that the entirety of
.stars
is covered by .star-label
s, and there's no gaps between
the principle works though, and doesn't require you to mess with the display order, which could theoretically be an accessibility problem