Search
Open Props (and Custom Properties as a System)
6.12.2021
Perhaps the most basic and obvious use of CSS custom properties is design tokens. Colors, fonts, spacings, timings, and other atomic bits of design that you can pull from as you design a site. If you pretty much only pull …
Efficient Infinite Utility Helpers Using Inline CSS Custom Properties and calc()
6.8.2021
I recently wrote a very basic Sass loop that outputs several padding and margin utility classes. Nothing fancy, really, just a Sass map with 11 spacing values, looped over to create classes for both padding and margin on each side. …
The post Efficient Infinite Utility Helpers Using Inline...
If we’re gonna criticize utility-class frameworks, let’s be fair about it
22.6.2021
I’m not here to raise a shield protecting CSS utility frameworks. I don’t even particularly like the approach, myself, and nothing is above fair criticism. But fair is a key word there. I can’t tell you how many times I’ve …
The post If we’re gonna criticize...
A Utility Class for Covering Elements
26.12.2020
Big ol’ same to Michelle Barker here:
Here’s something I find myself needing to do again and again in CSS: completely covering one element with another. It’s the same CSS every time: the first element (the one that needs to be covered) has position: relative applied to it....
Bootstrap 5
7.7.2020
It’s always notable when the world biggest CSS framework goes up a major version (it’s in alpha now).
It has dropped jQuery and IE, started using some CSS custom properties, gone fully customized with form elements, started to embrace utility classes, and includes a massive icon...
Building a Scalable CSS Architecture With BEM and Utility Classes
21.4.2020
Maintaining a large-scale CSS project is hard. Over the years, we’ve witnessed different approaches aimed at easing the process of writing scalable CSS. In the end, we all try to meet the following two goals:
Efficiency: we want to reduce the time spent thinking about how things should...
Contextual Utility Classes for Color with Custom Properties
14.8.2019
In CSS, we have the ability to access currentColor which is tremendously useful. Sadly, we do not have access to anything like currentBackgroundColor, and the color-mod() function is still a ways away.
With that said, I am sure I am not alone when I say I'd like to style some links based on...
A Better Approach for Using Purgecss with Tailwind
15.5.2019
Greg Kohn looks at how to use Purgecss — a tool that helps remove unused styles — and Tailwind — a utility-based CSS framework — and why we might want to pair these tools together:
Tailwind, by intention, is aiming to equip you with an arsenal of utility classes...