-
Notifications
You must be signed in to change notification settings - Fork 746
Closed
Labels
Description
In css-color-4, we learn
- "currentColor computes to itself"
- "inside the color property, the used value of current color is its inherited value"
In css-cascade-5, we learn
- "the inherited value of a property is the computed value of the parent"
So if I have
<div style="color: currentColor">
<div style="color: curentColor">
...
Then the styles of both divs have a computed color property of currentColor
by 1.
Now, if I want to find out what color to use for the second div, I consult 2. to learn that
the I need to use the inherited value of the color property, which, by 3., is the computed
value of the color property on the parent element. And we've already seen that that is currentColor
.
How do I draw with currentColor
?
I believe that browsers don't implement 3. properly and inherit the used value of the color property instead.
The question gets more entertaining when currentColor is inside expressions with color-mix or other color functions.