html - CSS: Get border color from element itself -
how color of element via css? wanted have same border color color of text itself.
example html:
<span class="status-name" style="color:#ff0000">max</span> css:
.status-name { font-weight: bold; border-bottom: 1px solid ???; } the bottom border should have color #ff0000 now. tried inherit, auto or attr(data-color) (in combination data-color="#ff0000" attribute) makes rule invalid browsers.
please note need solve problem if possible via css because there thousands elements on page such classes , it's accessed mobile phones. know setting css via style not state of art there hundreds of different color values , it's not reasonable create each color own css class, isn't it?
by default borders inherit color propertie of box set no color on css declaration:
border-bottom: 1px solid;
Comments
Post a Comment