[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]

/q/ - Q&A Central

Help, troubleshooting & advice for practitioners
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1793342107509.jpg (114.53 KB, 1024x1024, img_1793342015236_wfik6g6r.jpg)ImgOps Exif Google Yandex

25c67 No.2458

im tired of writing media queries for every single little card component. its such a headache when u move a widget from a sidebar to the main content area and everything breaks. instead of checking the viewport size i just use @container now. it makes the component actually self-contained so you can drop it anywhere without worrying about the screen width.
.card-container {container-type: inline-size;}@container (min-width: 400px) {.card { display: flex; }}

much cleaner than massive huge media query blocks at the bottom of the stylesheet. its basically a lifesaver for design systems ✅


[Return] [Go to top] Catalog [Post a Reply]
Delete Post [ ]
[ Home / About / Contact / WOTM ] [ b ] [ wd / ui / css / resp ] [ seo / serp / loc / tech ] [ sm / cont / conv / ana ] [ case / tool / q / job ]