Is there a method in which I can change the opacity of a border which is being set to inherit it's color from currentColor
? i.e. inherit currentColor
in #inner2
and set it's opacity to 0.25
.
Searching for a pure css
solution please.
For example, something which resembles the following:
#outer{
color: rgba(255,0,0,1);
}
.inner{
display: block;
width: 100%;
height: 10px;
margin-bottom: 5px;
border: 2px solid currentColor;
}
#inner2{
/* This is where I want to inherit current color */
/* ... but still set it to 0.25 opacity */
border-color: rgba(255,0,0,0.25);
}
<div id='outer'>
<div id='inner1' class='inner'></div>
<div id='inner2' class='inner'></div>
</div>