Issue with "revert": Add a code example to point out that revert doesn't prevent inheritence (similar to unset) out and maybe mention it in the unset section again
Closed this issue · 1 comments
MDN URL: https://developer.mozilla.org/en-US/docs/Web/CSS/revert
What information was incorrect, unhelpful, or incomplete?
It's hard to tell from the page as written what happens when you revert an inherited property like color.
For example:
If used by a site's own styles (the author origin), revert rolls back the property's cascaded value to the user's custom style, if one exists; otherwise, it rolls the style back to the user agent's default style.
This reads to me as if it will go back to the user agent's default style but if the property was inherited it will go back to the inherited value.
What did you expect to see?
unset
is very explicit about how it works with inherited properties and I think revert should be as well in the section mentioned above as well as maybe with a section dedicated to explaining that gotcha behavior.
Even the section on revert
vs unset
could mention that the impact on inherited values is the same. (Right now it mentions only the difference with different types of style sheets)
Did you test this? If so, how?
Tested it by using dev tools in chrome to edit some styles on a random page.
MDN Content page report details
- Folder:
en-us/web/css/revert
- MDN URL: https://developer.mozilla.org/en-US/docs/Web/CSS/revert
- GitHub URL: https://github.com/mdn/content/blob/main/files/en-us/web/css/revert/index.md
- Last commit: 303a6c3
- Document last modified: 2022-02-18T09:30:25.000Z