JS Party: JavaScript, CSS, Web Development cover image

A very !important lesson

JS Party: JavaScript, CSS, Web Development

00:00

JavaScript - How to Control the Order of the Cascade Layers

The order of the cascade layers is the order in which they're declared. You can do an import directly into a cascade layer, but the best way to control your cascade layer order is to do a cascade layer declaration before everything and just say this is the order that I want. The neat thing is you can actually put the cascade declarations within a media query and say, I want this on mobile, I want on a narrow screen,. I want this one to be more important than on a on a wide screen. Once you set the cascade order, it's immutable. You can't change. There's no trick to changing the order of theascade layers.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app