[ Web Proxy ]
URL:
Viewing: https://developer.mozilla.org/ko/docs/Web/CSS/Reference/Values/revert [Back]  [Original]

revert - CSS: Cascading Style Sheets | MDN

This page was translated from English by the community. Learn more and join the MDN Web Docs community.

View in English Always switch to English

revert

Baseline Widely available

This feature is well established and works across many devices and browser versions. Its been available across browsers since 2020 7.

revert style origin . user agent default . css all .

  • css revert . user agent default .
  • , revert user agent default .
  • user agent default , unset .

revert unset . user agent .

Revert . ( rule .). color: green all: revert black . , section p red red .

: Revert . revert specificity .

: revert initial , initial value css . user-agent default value ..

, display initial value inline . <div> display user agent block , <table> table .

In this article

Revert vs unset

revert unset .

, font-weight . revert unset . Unset text default normal . Revert user-agent font-weight bold .

css
h3 {
  font-weight: normal;
  color: blue;
}
html
<h3 >
  This will still have font-weight: normal, but color: black
</h3>
<p>Just some text</p>
<h3 >
  This should have its original font-weight (bold) and color: black
</h3>
<p>Just some text</p>

Revert all

revert default . font-weight color .

css
h3 {
  font-weight: normal;
  color: blue;
  border-bottom: 1px solid grey;
}
html
<h3>This will have custom styles</h3>
<p>Just some text</p>
<h3 >This should be reverted to browser/user defaults</h3>
<p>Just some text</p>

Revert

revert . paragraph red section darkgreen .

css
section {
  color: darkgreen;
}
p {
  color: red;
}
section.with-revert {
  color: revert;
}
html
<section>
  <h3>   h3  </h3>
  <p>paragraph  </p>
      .
</section>
<section class="with-revert">
  <h3>revert    h3 </h3>
  <p> paragraph  </p>
     revert  
</section>

section paragraph .

Specification
CSS Cascading and Inheritance Level 4
# default


Web Proxy Viewer  |  New URL  |  Original Page