Is there a way to set the border-color in CSS to be the same as the text color?
For instance having a class which adds a bottom dotted border, but leavi
This:
border-bottom: 1px dotted currentColor;
From the spec:
currentColor The value of the ‘color’ property. The computed value of the ‘currentColor’ keyword is the computed value of the ‘color’ property. If the ‘currentColor’ keyword is set on the ‘color’ property itself, it is treated as ‘color: inherit’.
See here: http://www.w3.org/TR/css3-color/#currentcolor
(doesn't work in IE8 though)
Update: So, it seems that explicitly setting the color value is not necessary, since the default value already is the value of the color property.
So, this works just fine:
border-bottom: 1px solid;