Add info about presentation attributes to css cascade
Description
Adds information about presentational attributes to the CSS Cascade docs. Updated throughout the "Author styles" section.
Motivation
Presentational attributes seem very similar to inline styles, but they have a very different precedence. This keeps people from thinking they're the same and running into unexpected behaviors.
Additional details
Manually tested that this information is correct, since the CSS spec doesn't specify how presentational attributes interact with CSS layers.
Related issues and pull requests
Fixes https://github.com/mdn/content/issues/33402
Preview URLs
Flaws (1)
URL: /en-US/docs/Web/CSS/Cascade
Title: Introducing the CSS Cascade
Flaw count: 1
- macros:
/en-US/docs/Web/CSS/align does not exist
(comment last updated: 2024-05-24 22:06:43)
Thank you for filing the issue and submitting a PR to resolve it.
HTML presentational attributes are HTML, not part of CSS and therefore not part of the CSS cascade. This also means there isn't a mention as to the impact of CSS layers on presentational attributes, and we don't need to mention something that doesn't exist. Also, the ## Author styles: inline styles, layers, and precedence section is about author styles, not author HTML.
I do agree that a note about presentational attributes makes sense.
Please feel free to add a note in the "Which CSS entities participate in the cascade section. As this area starts with "Only CSS property/value pair declarations participate in the cascade." this is the best place to add this.
Shuffled stuff around! Happy to make more changes if there's a better way to communicate this =)
@BeksOmega Have you had a chance to look at the suggestions?
@BeksOmega Have you had a chance to look at the suggestions?
Sorry about the delay! Committed your suggestions unchanged =)