Skip to content

[css-cascade] Does 'revert-layer' roll back to preshints? #7087

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

Closed
Loirooriol opened this issue Feb 25, 2022 · 7 comments
Closed

[css-cascade] Does 'revert-layer' roll back to preshints? #7087

Loirooriol opened this issue Feb 25, 2022 · 7 comments
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-cascade-5

Comments

@Loirooriol
Copy link
Contributor

https://drafts.csswg.org/css-cascade-5/#preshint

All document language-based styling must be translated to corresponding CSS rules and enter the cascade as rules in either the UA-origin or a special-purpose author presentational hint origin between the regular user origin and the author origin. For the purpose of cascading this author presentational hint origin is treated as an independent origin, but for the purpose of the revert keyword it is considered part of the author origin.

What about the revert-layer keyword?

@fantasai
Copy link
Collaborator

It's not the revert keyword, so it's treated as an independent origin, and isn't reverted by revert-layer in an author style sheet.

IIRC this was intentional.

@Loirooriol
Copy link
Contributor Author

That section was entirely copied from L4 where there is no revert-layer, so it's not obvious that this was intentional. Maybe add a note? Also, is it possible to test this? Is there any normative preshint? HTML rendering only says "expected", not "must".

@Alohci
Copy link
Contributor

Alohci commented Mar 6, 2022

Using revert-layer to revert height and width of an image back to the HTML attribute values seems distinctly useful. Chrome and Firefox already do this nicely.

@Loirooriol
Copy link
Contributor Author

@Loirooriol
Copy link
Contributor Author

Actually, Chrome was not doing this well. Filed https://bugs.chromium.org/p/chromium/issues/detail?id=1306511

@tabatkins
Copy link
Member

@Loirooriol Added a clarification. Let us know if the wording works for you, or if you think something different would be better.

@Loirooriol Loirooriol added Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. and removed Commenter Response Pending labels Mar 30, 2022
@Loirooriol
Copy link
Contributor Author

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Closed Accepted as Editorial Commenter Satisfied Commenter has indicated satisfaction with the resolution / edits. css-cascade-5
Projects
None yet
Development

No branches or pull requests

4 participants