2021-07-14
2123
#css
Chidume Nnamdi
58900
Jul 14, 2021 ⋅ 7 min read

CSS inheritance: inherit, initial, unset, and revert

Chidume Nnamdi I'm a software engineer with over six years of experience. I've worked with different stacks, including WAMP, MERN, and MEAN. My language of choice is JavaScript; frameworks are Angular and Node.js.

Recent posts:

Radix Ui Adoption Guide Overview Examples And Alternatives

Radix UI adoption guide: Overview, examples, and alternatives

Radix UI is quickly rising in popularity and has become an excellent go-to solution for building modern design systems and websites.

Nefe Emadamerho-Atori
Apr 25, 2024 ⋅ 11 min read
Understanding The Css Revert Layer Keyword, Part Of Css Cascade Layers

Understanding the CSS revert-layer keyword

In this article, we’ll explore CSS cascade layers — and, specifically, the revert-layer keyword — to help you refine your styling strategy.

Chimezie Innocent
Apr 24, 2024 ⋅ 6 min read
Exploring Nushell, A Rust Powered, Cross Platform Shell

Exploring Nushell, a Rust-powered, cross-platform shell

Nushell is a modern, performant, extensible shell built with Rust. Explore its pros, cons, and how to install and get started with it.

Oduah Chigozie
Apr 23, 2024 ⋅ 6 min read
Exploring Zed, A Newly Open Source Code Editor Written In Rust

Exploring Zed, an open source code editor written in Rust

The Zed code editor sets itself apart with its lightning-fast performance and cutting-edge collaborative features.

Nefe Emadamerho-Atori
Apr 22, 2024 ⋅ 7 min read
View all posts

2 Replies to "CSS inheritance: inherit, initial, unset, and revert"

  1. “We have div#div1ChildChild inside div#div1Child. Now, we have color: blue set on div1Child. div1Child will not inherit the color: red from div1; it will use its color: blue. This is called specificity. div#div1ChildChild will inherit the color blue from div#div1Child because it is its parent.”

    Is not blue color but green 🙂

    1. Hi Piotr,

      Thanks for pointing this out and for reading the LogRocket blog. We’ve fixed the typo in the code.

Leave a Reply