« * K @chriscoyier.net

Chris Coyier @chriscoyier.net

2026-11-24 13:29 UTC

I was pleased to find a technique for calculating when to shrink a Sidebar of Icons without magic numbers. --limit: calc( /* figure out size of nav item */ * sibling-count()); --sidebar-h: 100cqb; @​container nav-item style(--sidebar-h < --limit) { .label { /* accessibly hide */ } }

Quoting @frontendmasters.com: The Compacting Sidebar Blues You've got a sidebar nav for a web app with icons and text. What happens where vertical space is constrained? Remove the text? But when and how?

23 likes, 0 reposts, 2 replies

3 Next post4 More from @chriscoyier.netBackBluesky home
☆ Save to home · 0 Home · Find · Games · Chat · AI · Setup