Elusive Style
Molly’s has a ‘I wish I had…’ post and it reminded me of once wishing I had something like ‘invert’ just like the CSS values ‘auto’ and ‘inherit’.
When I change a background colour I’d like not to have go and change the text colour as well. Usually it’s better to tweak the colour to get the best result but in some cases it doesn’t require such fine tuning.
.element {
invert: color-hue, background-lum, border-color;
}
To invert the text colour's hue and the background lightness, 'color' by default could invert based on opposite colour (red->cyan, blue->yellow, etc...). Maybe even a color-paint value, which uses the paint colour wheel instead (red->green, blue->orange, etc...)