[csswg-drafts] [css-color-4] Clarify used value of currentColor (#10352)

matthiasclasen has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-color-4] Clarify used value of currentColor ==
In css-color-4, we learn

1. "currentColor computes to itself"
2. "inside the color property, the used value of current color is its inherited value"

In css-cascade-5, we learn

3. "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.


Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10352 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Saturday, 18 May 2024 23:32:18 UTC