Re:Mobile-First CSS: Is It Time for a Rethink?
by V__ on Sunday June 19, 2022 @05:30PM
(#31803706)
I can't wait for container queries to finally get browser support. I just want to write self-contained css which is reusable and not dependent on a framework, a preprocessor, or a methodology like bem. One file for my components, one file for the responsive layout, and one for fonts and variables.
[ Parent
| on HN ]
Re:Mobile-First CSS: Is It Time for a Rethink?
by rikroots on Monday June 20, 2022 @08:08AM
(#31809314)
For what it's worth (and not related to CSS), I added functionality to my canvas library to make canvas elements aware of their container's shape and size, so the graphical elements can dynamically rearrange/resize as required[1]. This extends to DOM elements in the library's stack environment[2]. Of course the library is Javascript, so not useful for JS-disabled browsers.
Re:Mobile-First CSS: Is It Time for a Rethink?
by clairity on Sunday June 19, 2022 @09:43PM
(#31805398)
i've played with container queries recently (via safari tech preview and ungoogled chromium), and they're not quite the panacea they could be. you still often need extraneous container divs to achieve some of the layouts/responsiveness you may want (this was true of grid and flexbox too, unfortunately). it's not the end of the world, but it doesn't lessen the mental burden as much as you might think.