Niklas Ek
nikek.se
Niklas Ek
@nikek.se
web dev
That did it! Putting the values in custom props (@property --100cqi { syntax: <length>; ... }) made it possible to use the container units in atan2() and give me the right angle dynamically. This is fantastic, thank you! 🚀
September 23, 2024 at 8:18 PM
Thanks for the response Adam! I do use container-type: size, to get both dimensions. The cq units work for setting other props of the child, but not in atan2(). One possible reason is that calculating the ratio means dividing and CSS generally cannot divide by values with units, could that be it?
September 23, 2024 at 10:30 AM