Fist of all, the CSS border property is a shorthand property for setting individual border property values โโfor one or more of: border-width , border-style , border-color .
The initial border-style value is none . This means that if you change border-width and border-color , you will not see the border, unless you change this property to something other than none or hidden .
The initial value of border-width is medium , but the specification does not exactly determine its corresponding width. For example, my Safari browser currently displays medium as 3px wide;
The initial value of border-color is currentColor , this keyword is the computed value of the element's color property. This allows you to make color properties inherited by properties or properties of child elements that do not inherit by default.
However, always keep in mind that if your default values โโseem different, itโs possible that some properties are calculated from some other declarations, i.e. user agent declarations, regular user declarations, regular author declarations, important declarations or important announcements for the user. If different properties are applied to the same element, more specific selectors will override the others, and when several ads have the same weight, origin and specificity, the latter wins in the original order. Declarations in imported style sheets are counted before any declarations in the style sheet itself.
TL ;? DR
The default is border: medium none currentColor; but this is true unless another selector or declaration is used.
Claudio Floreani
source share