2 ms·
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
by V__ 4y ago
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.
- clairity 4y agoi'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.
- rikroots 4y agoFor 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. [1] - https://scrawl-v8.rikweb.org.uk/demo/canvas-034.html https://scrawl-v8.rikweb.org.uk/demo/canvas-034.html [2] - https://scrawl-v8.rikweb.org.uk/demo/dom-016.html https://scrawl-v8.rikweb.org.uk/demo/dom-016.html