by rosslh · 2y ago · 0 comments
> not being able to center text no matter how much frontend experience we have
Not being able to center things is a bit of a meme, but flexbox was introduced back in 2009 and has been supported by major browsers for quite a long time. Centering text and elements is now extremely easy.
> css could benefit from knowing about the dimensions of container elements
You're in luck! Container queries were added to CSS fairly recently:
https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_contain...
I agree with GP that CSS should be scrapped.
Obviously this is a very contrived example but it can also express itself in subtler ways.
https://www.joshwcomeau.com/css/container-queries-introducti...