Using CSS Cascade Layers to Manage Custom Styles in a Tailwind Project

If a utility class only does one thing, chances are you don’t want it to be overridden by any styles coming from elsewhere. One approach is to use !important to be 100% certain the style will be applied, regardless of …


Using CSS Cascade Layers to Manage Custom Styles in a Tailwind Project originally published on CSS-Tricks, which is part of the DigitalOcean family. You should get the newsletter.

https://css-tricks.com/using-css-cascade-layers-to-manage-custom-styles-in-a-tailwind-project/

Created 3y | Aug 24, 2022, 2:20:37 PM


Login to add comment

Other posts in this group

Poking at the CSS if() Function a Little More: Conditional Color Theming

The CSS if() function enables us to use values conditionally, which we can already do with queries and other functions, so I’m sure you’re wondering: What exactly does if()

Jun 25, 2025, 3:50:12 PM | CSS tricks
Lightly Poking at the CSS if() Function in Chrome 137

The CSS if() function was recently implemented in Chrome 137, making it the first instance where we have it supported by a mainstream browser. Let's poke at it a bit at a very high lev

Jun 24, 2025, 4:40:14 PM | CSS tricks
A Better API for the Intersection and Mutation Observers

Zell discusses refactoring the Resize, Mutation, and Intersection Observer APIs for easier usage, demonstrating how to implement callback and event listener patterns, while highlighting available o

Jun 23, 2025, 5:30:19 PM | CSS tricks
Color Everything in CSS

An introduction to "Color spaces", "Color models", "Color gamuts," and basically all of the "Color somethings" in CSS.


Jun 20, 2025, 3:20:14 PM | CSS tricks
CSS Color Functions

CSS has a number of functions that can be used to set, translate, and manipulate colors. Learn what they are and how they are used with a bunch of examples to get you started.


Jun 19, 2025, 4:10:13 PM | CSS tricks
How to Keep Up With New CSS Features

How do you stay informed of new CSS features when the language evolves quickly and information is spread all around the web? Sacha Greif has some tips from his work running an annual survey focused

Jun 17, 2025, 3:20:16 PM | CSS tricks
A Better API for the Resize Observer

ResizeObserver, MutationObserver, and IntersectionObserver enhance performance over their predecessors. Zell discusses their API similarities, usage steps, refactoring strategies, and advantages wi

Jun 16, 2025, 1:50:11 PM | CSS tricks