Closed
Description
What should we do when revert-layer
is used in the style attribute?
For example, <div style="color: red; color: revert-layer">
. I can think of two options:
- Treat style attribute as if in its own layer (though importance is handled differently), so we revert
color
to the highest author layer - Style attribute is not in any layer, so
color: revert-layer
is an invalid declaration, andcolor: red
wins the cascade
I prefer option 1 because it is simpler to implement (no parse-time special-casing). And other than an obscure way to cancel other declarations in the style attribute, I'm not sure if there is any real use case of putting revert-layer
in the style attribute, so I prefer keeping things simple.