CoverT 23: Default Border Color

codeInteractive Code Example

I used to think that the default color for borders was black, but now I know better…

The actual default border color is currentColor, basically whatever the element’s color value is (inherited or otherwise).

Code

<div class="box">
  Default border color is currentColor
</div>
.box {
  height: 160px;
  width: 160px;
  padding: 20px;
  color: blue;
  border: 5px solid;
}

Results

Default border color is currentColor