Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-cascade] Do we need a keyword similar to `revert`, but for cascade layers? #5793

Open
mirisuzanne opened this issue Dec 14, 2020 · 2 comments

Comments

@mirisuzanne
Copy link
Contributor

@mirisuzanne mirisuzanne commented Dec 14, 2020

Cascade Level 4 added the revert keyword for rolling back values to their definition in the previous origin.

In the draft Cascade 5 specification we provide cascade layers, which are conceptually similar to origins – but controlled by authors. It might be helpful to provide a similar syntax for rolling back to the value defined in previous layers.

@fantasai
Copy link
Collaborator

@fantasai fantasai commented Jan 8, 2021

We should make sure that the preshint rules are given their own layer so that this works to unwind author rules without affecting preshint mapping. See #5836.

@mirisuzanne
Copy link
Contributor Author

@mirisuzanne mirisuzanne commented Jan 11, 2021

In another conversation, @fantasai suggested revert-layer as the keyword – and that makes sense to me as an initial proposal.

This would roll back the cascaded value of a declaration to the previous layer with a value specified, as if no current-layer rules were specified for this property on this element.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants