Short tip: if you want to have items bordered in the same color as the text (i.e. a badge), use currentColor
to set the border-color
, instead of typing the color name or value twice. This comes in handy when long custom property names are used and removes a source of error…
.badge {
border: 1px solid currentColor;
border-radius: 3px;
color: rebeccapurple;
display: inline-block;
padding: 3px 5px;
}
This is a badge