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

No mention of important difference between revert-layer and revert #34064

Closed
benface opened this issue Jun 11, 2024 · 2 comments · Fixed by #34085
Closed

No mention of important difference between revert-layer and revert #34064

benface opened this issue Jun 11, 2024 · 2 comments · Fixed by #34085
Assignees
Labels
Content:CSS Cascading Style Sheets docs

Comments

@benface
Copy link
Contributor

benface commented Jun 11, 2024

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/revert-layer

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

There is an important distinction between revert-layer and revert that this page does not mention (in fact, it even says that revert-layer works exactly like revert outside of cascade layers, but it's not true): revert-layer preserves presentational hints (see w3c/csswg-drafts#7087) while revert doesn't. This article taught me this.

What did you expect to see?

In the Revert-layer vs. revert section, the following:

However, if the revert-layer keyword is set on a property outside a layer, the value of the property will roll back to the default value established by the user agent's stylesheet (or by user styles, if any exist). So in this scenario, the revert-layer keyword behaves like the revert keyword.

should read more like this:

However, if the revert-layer keyword is set on a property outside a layer, the value of the property will roll back to any value set by presentational hints (e.g. the width or height attributes in HTML), defaulting to the value established by the user agent's stylesheet (or by user styles, if any exist). So in this scenario, the revert-layer keyword behaves very similarly to the revert keyword, with the exception that revert considers presentational hints to be part of the author origin, so it reverts them too.

Do you have any supporting links, references, or citations?

Do you have anything more you want to share?

Thank you!

MDN metadata

Page report details
@benface benface added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 11, 2024
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Jun 11, 2024
@Josh-Cena
Copy link
Member

Could you report the data error to https://github.com/mdn/browser-compat-data instead? We are keeping the other part here.

@benface
Copy link
Contributor Author

benface commented Jun 12, 2024

Ah, thanks @Josh-Cena, but looks like it's already been reported. I will edit my first post to focus on the other issue.

@benface benface changed the title Incorrect browser support for revert-layer + no mention of important difference with layer No mention of important difference between revert-layer and revert Jun 12, 2024
@estelle estelle self-assigned this Jun 12, 2024
@estelle estelle removed the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jun 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:CSS Cascading Style Sheets docs
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants