<p>This text is red.</p>
<div class="foo">
<p>This text is also red.</p>
</div>
<div class="bar">
<p>This text is green (default inherited value).</p>
</div>`unset` CSS keyword / notebook
`unset` CSS keyword
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
.foo {
color: blue;
}
.bar {
color: green;
}
p {
color: red;
}
.bar p {
color: unset;
}<p>This text has a red border.</p>
<div>
<p>This text has a red border.</p>
</div>
<div class="bar">
<p>This text has a black border (initial default, not inherited).</p>
</div>div {
border: 1px solid green;
}
p {
border: 1px solid red;
}
.bar p {
border-color: unset;
}