Re: [csswg-drafts] [css-values] Proposal: a way to revert a property to use presentational hints if any (#13213)

> Which unimportant layer does revert-layer(unimportant) revert? Probably the nearest one, but what if the user wants to revert the outer one?

It can't be the outer one, because layers can get wrapped on import - so a file doesn't know what outer layers might exist. Real bad to accidentally revert layers you don't know about. 

It seems to me the main use-cases are:

- I want to revert the current layer (`revert-layer`)
- I know the name of a nearby layer I want to revert _to_, or revert _past_
- I want to revert all the way to presentational hints
- I want to revert to browser defaults (`revert`)

Both the `<integer>` option and 'referencing the same name higher up the stack' are kinda specific use-cases that authors could work around with a more intentional name scheme. Maybe we don't need them at all. But if we do, `revert-layer(to? <name> <integer>)` could handle reverting a given number of layers with the same name? But I'm not sure that kind of complexity is needed?

-- 
GitHub Notification of comment by mirisuzanne
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/13213#issuecomment-3849997102 using your GitHub account


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

Received on Wednesday, 4 February 2026 22:09:34 UTC