[csswg-drafts] [css-color-4] backgroundColor

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

== [css-color-4] backgroundColor ==
Just as we have `currentColor`, having `backgroundColor` (or 
`background-color`) would be useful when you're doing effects that 
depend on the background color, but you don't know what it is (for 
example when the background color changes in various parts of the 
document).

Here's an example which could be solved by having that keyword:

http://jsbin.com/detezeb/edit?css,output

The definition, which would parallel that of `currentColor` would be 
something like:

> The keyword ''currentbackground'' takes its value from the value of 
the 'background-color' property on the same element. This happens at 
used-value time, which means that if the value is inherited, it’s 
inherited as ''currentbackground'', not as the value of the color 
property, so descendants will use their own color property to resolve 
it.
> 
> If ''currentbackground' is used as the value of the background-color
 property, it instead takes its value from the value of the 
background-color property on the parent element, or ''transparent'' if
 there is no parent element..

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

Received on Monday, 1 August 2016 08:40:34 UTC