JS Party: JavaScript, CSS, Web Development cover image

A very !important lesson

JS Party: JavaScript, CSS, Web Development

CHAPTER

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.

00:00
Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner