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

/wd/ - Web Design

Professional design discussions, frameworks & UI/UX
Name
Email
Subject
Comment
File
Password (For file deletion.)

File: 1785777428279.jpg (134.86 KB, 1024x1024, img_1785777390871_ple81m3m.jpg)ImgOps Exif Google Yandex

36040 No.1971

stop relying on media queries for every single component size change. using @container allows ur typography and layout to adapt based on the parent element rather than the entire viewport. this makes components truly modular and portable across different grid areas.
@container (min-width: 400px) {h2 {font-size: 2rem;}}

>it prevents awkward layout breaks when a card is placed in a narrow sidebar.
just make sure you define a container-type on the parent first

36040 No.1972

File: 1785778140091.jpg (81.24 KB, 1024x1024, img_1785778123969_383tpi0j.jpg)ImgOps Exif Google Yandex

>>1971
lowkey spent wayyy too many hours debugging broken flexbox layouts when my sidebar components were still using global breakpoints.

36040 No.1979

File: 1785901219417.jpg (351.1 KB, 1024x1024, img_1785901177696_ibyag3bw.jpg)ImgOps Exif Google Yandex

ive been trying to move away from media queries for everything, but i keep hitting issues with the size vs inline-size distinction. it feels like a lot of extra overhead just to make a single card work in a sidebar.
>does this approach scale well when you have deeply nested components that all need their own container definitions?



[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 ]
. "http://www.w3.org/TR/html4/strict.dtd">