@5t3ph can't find the example (think it was from @Una's presentation at CSS Day) - but I liked the button that could switch from icon only, text only, or both using container queries
@5t3ph I like how container queries allow you to design components liquidly to take the shape of the container they're in. Have the same content be a hero when in a hero sized container or a sidebar item when in that. The use is really broad!
@5t3ph@zachleat I did a calendar component in the fake CQ with JS days that would change formats (calendar view vs list view) based on how much room there was.
@5t3ph 1. Charts in the main section that resize when the viewport resizes OR the sidebar is collapsed
2. Breadcrumbs that elide when they can’t fit in a row
@5t3ph I'm working with our UX designer to update heading sizes per page templates -- the full-width landing page content area can have larger headings, which look TOO big on pages with sidebars. Containers queries are helping more than media queries combined with page template classes, those were getting buggy. I deleted SO MANY lines of code.
@5t3ph on https://nicolas-hoizey.photo the first gallery thumbnail gets larger if there is enough space. No need anymore to know if there’s a sidebar or not, thanks to container queries.
@5t3ph I created a dashboard where the user could change column count and the can put the tiles anywhere they want. And change the size. Container queries helped a lot here.
@5t3ph General layout. I use it in place of media queries now, because i abhor doing one thing in multiple ways. Container queries are the right tool for the job.
@5t3ph I'm giving a talk about this in two weeks at the NY CSS Meetup! I'm using style container queries to toggle component state based on layout, and small/large main nav per language for i18n.
@5t3ph Page layout: left nav sidebar, optional right sidebar, content taking remaining space. As the browser width gets narrower a breakpoint puts the right sidebar below the content. So the width of the content area isn't easily predictable from browser width. All the things in the content (which vary widely) are arranged based on the content size.
@5t3ph started looking at it for my new (it's taking ages Stu, c'mon) site header - because of the 'page' grid it feels like it makes more sense to change the layout of the header depending on the available width not the browser width.
I may get it finished soon (one day (hah! who knows)).
Add comment