A "Wheel of Fortune" component just popped up in my feed. I always spin, but never win! Anyway, this type of component is often built with <canv...
For further actions, you may consider blocking this person and/or reporting abuse
The height calculation is actually not correct. You need to consider the polygon shape around the circle to find the correct height (the circumscribed polygon)
It's equal to
height: calc(2*50cqi*tan(180deg/var(--_items)));
that you can simplify by setting the ratioaspect-ratio: 1/calc(2*tan(180deg/var(--_items)));
to avoid using the width value twice.With this you won't have issue when you apply the clip-path
AH, perfect — thank you! You truly are the master of CSS Shapes. I've added an update, and will use your input for the follow-up article with spinning.
Has anyone solved the return value of the winning field? For example index for li tag. I have something, but the results are +- one position.
I think it’s resolved ( Link on Codepen.io ).
Cool!
Please share — I need to think about it too!
wholesome wheel! :)
Beautiful project!
Thank you!
Always here for an interesting CSS project. Kudos.
Thanks!
I suppose this would be easier done in pure Javasript using CSS only where It's appropriate (e.g. the animation). Is it really worth the effort doing anything in CSS?
I don't think that'd be easier in javascript. Whenever you have something visual, the right tool for that is CSS. When it's easier in pure JS, this usually mean that you lack knowledge with CSS.
Oh, have fun to rebuild the [solarsystem][dev.to/cookiemonsterdev/solar-syst...] with pure CSS. There are good reasons the S in
CSS comes from "style", not from graphics...