# Help with css universal value control

**URL:** <https://discourse.mozilla.org/t/help-with-css-universal-value-control/108816>\
**Category:** Learn\
**Tags:** sentence-collection, announcements\
**Created:** [December 13, 2022, 11:34pm UTC](https://discourse.mozilla.org/t/help-with-css-universal-value-control/108816 "2022-12-13T23:34:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sarai\_Atoche\_Pascual](https://avatars.discourse-cdn.com/v4/letter/s/b38774/32.png) [@Sarai\_Atoche\_Pascual](https://discourse.mozilla.org/u/Sarai_Atoche_Pascual)\
**Post date:** [December 13, 2022, 11:34pm UTC](https://discourse.mozilla.org/t/help-with-css-universal-value-control/108816/1 "2022-12-13T23:34:32Z")

</div>

Hello, I am Sarai and I have a doubt about the inheritance control, about the five special universal property values to control the inheritance, this is how I understood it:

1. inherit: this value is used so that the element inherits the value of the property that its parent has assigned.

2. initial: this value will take the initial value of the property.

3. revert: this value has two behaviors and these depend on that if it is inherited of its father, then it will take its style, and if it is not inherited it will take the style of the style sheet of the navigator, right?

4. unset: this value also has two behaviors which depends that if it is inherited in a natural way it will take the value of its parent, and if it is not inherited it will behave as initial.

then can you explain me why the class 3 that has as value UNSET this of green color? if it is not inherited in a natural way, thank you for your time and I would appreciate if you could explain to me

page:

> **[Handling conflicts - Learn web development | MDN](https://developer.mozilla.org/en-US/docs/Learn_web_development/Core/Styling_basics/Handling_conflicts)**
>
> The aim of this lesson is to develop your understanding of some of the most fundamental concepts of CSS — the cascade, specificity, and inheritance — which control how CSS is applied to HTML and how conflicts between style declarations are resolved.

code:  
[https://codepen.io/pascual\_atoche/pen/oNyrovL](https://codepen.io/pascual_atoche/pen/oNyrovL)

---

<div class="post-metadata">

**Author:** ![mikoMK](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/mikomk/32/50456_2.png) [@mikoMK](https://discourse.mozilla.org/u/mikoMK)\
**Post date:** [December 18, 2022, 6:37pm UTC](https://discourse.mozilla.org/t/help-with-css-universal-value-control/108816/2 "2022-12-18T18:37:00Z")

</div>

Hi @Sarai_Atoche_Pascual

> [@Sarai\_Atoche\_Pascual](#):
>
> inherited in a natural way

I’m not sure what exactly you mean by this statement. To clarify: If a property is “inherited” or not is defined in the specification. You can look that up on the property’s MDN article in the “Formal definition” section. For example `color` is inherited ([color - CSS: Cascading Style Sheets | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/color#formal_definition)) but `display` is not ([display - CSS: Cascading Style Sheets | MDN](https://developer.mozilla.org/en-US/docs/Web/CSS/display#formal_definition)).

`unset` will behave like `inherit` if the property is defined as “inherited” in the specification. Otherwise it will behave like `initial`.  
You’re explanation about `revert` should be the other way round. It will set the property to the value the user-agent (browser) defines. If the user-agent doesn’t define the value it will be the same as `unset`. It behaves like you never defined anything about the property in your CSS file.

> then can you explain me why the class 3 that has as value UNSET this of green color?

Since `color` is an inherited property (by specification) it will behave like `inherit` when using `unset`. Therefore `green` is inherited from the body.  
In your example we also see the difference between `unset` and `revert`. Because the browser sets the color of links to blue, the `revert` property will use the browser’s value.

I hope that clears things up. 🙂

Michael
