Search notes:

CSS: all

all resets all properties of an element except unicode-bidi, direction and custom properties.
The value of all can be set to
initial Apply the element's default CSS values.
inherit Apply the element's inherited values.
unset Change to inherited values for properties that inherit by default, to default (initial) values otherwise
revert
revert-layer

Example

<!DOCTYPE html>
<html>
<head>
  <meta content="text/html;charset=utf-8" http-equiv="Content-Type">
  <title>CSS test: all</title>

  <style>

     div         { border:           1px solid black;
                   width:            300px;
                   margin-bottom:    5px;
                 }

     div.warning { background-color: yellow;
                   color:            red;
                   font-weight:      bold;
                 }

     div.ok      { background-color: Chartreuse;
                   color:            DarkGreen;
                   font-weight:      bold;
                 }

     div.normal  { all:              initial;}

  </style>

</head>
<body>

   <div                >Some text</div>
   <div class='warning'>Take care!</div>
   <div class='ok'     >All is good.</div>
   <div class='normal' >Normal text</div>
   <div                >More text</div>

</body>
</html>
Github repository about-css, path: /properties/all.html

See also

CSS properties

Index