currentColor in CSS

currentColor in CSS

Anil Verma's photo
Anil Verma
Β·Jun 11, 2021Β·

Subscribe to my newsletter and never miss my upcoming articles

Play this article

currentColor acts like a variable for the current value of the color property on the element.


<div>Hello from currentColor</div>


div {    color: blue;    
  border: 5px solid currentColor;    
 box-shadow: 0 0 5px solid currentColor; }

Happy Coding… πŸ‘πŸ‘

Share this