CSS

Tag: Page 1 of 1

The day is actually here: I wrote my first nested CSS – just plain ol’ CSS, no preprocessors – for a little project, and it works great in all browsers 🎉

Dynamic Scroll Offset Via Custom Properties

Maybe you have a large project where there is a sticky header on some pages and not others, or the sticky header changes size based on content. By default if you use an anchor link to jump down to a section of the page it will line up the target…

Local Themes using CSS Custom Properties

This is an idea inspired by Expressive Design Systems, with some additional help from A Strategy Guide to CSS Custom Properties and Theming With Variables: Globals and Locals. The design system I work with is largely used for more content-heavy marketing sites, which provides some interesting challenges that…

CUBE CSS

piccalil.li

From BEM to ITCSS to Tailwind I’ve seen varying methods of organizing CSS, but this is a pretty interesting read that takes some ideas from them all. I like Andy’s approach of giving some backstory about how he arrived at this and how it’s not necessarily a one-size-fits-all.