4 ms·
container queries have a very obvious chicken and egg problem if used a certain way: If this container is less than 30px wide, make its content 60px wide. Other
by asddubs 2y ago
container queries have a very obvious chicken and egg problem if used a certain way: If this container is less than 30px wide, make its content 60px wide. Otherwise make it 20px wide. Now that container exists in a quantum state of being both 30 and 60px wide. I actually haven't looked into container queries to see how they ended up dealing with this yet.
Obviously this is a very contrived example but it can also express itself in subtler ways.
- mixmastamyk 2y agoComeau has a piece on that. Another property to constrain it is the solution. https://www.joshwcomeau.com/css/container-queries-introduction/ https://www.joshwcomeau.com/css/container-queries-introducti...