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

Add info about presentation attributes to css cascade #33482

Merged
merged 6 commits into from
May 24, 2024

Conversation

BeksOmega
Copy link
Contributor

@BeksOmega BeksOmega commented May 7, 2024

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 #33402

@github-actions github-actions bot added Content:CSS Cascading Style Sheets docs size/m 51-500 LoC changed labels May 7, 2024
files/en-us/web/css/cascade/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/cascade/index.md Outdated Show resolved Hide resolved
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@BeksOmega BeksOmega marked this pull request as ready for review May 7, 2024 22:40
@BeksOmega BeksOmega requested a review from a team as a code owner May 7, 2024 22:40
@BeksOmega BeksOmega requested review from estelle and removed request for a team May 7, 2024 22:40
Copy link
Contributor

github-actions bot commented May 9, 2024

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)

@estelle
Copy link
Member

estelle commented May 9, 2024

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.

@github-actions github-actions bot added size/s 6-50 LoC changed and removed size/m 51-500 LoC changed labels May 10, 2024
@BeksOmega
Copy link
Contributor Author

Shuffled stuff around! Happy to make more changes if there's a better way to communicate this =)

Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better. I made some words order suggestions. if you're ok with them, feel free to commit. if you have better suggestions, those are absolutely welcome. Thank you!

files/en-us/web/css/cascade/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/cascade/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/cascade/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/cascade/index.md Outdated Show resolved Hide resolved
files/en-us/web/css/cascade/index.md Outdated Show resolved Hide resolved
@estelle
Copy link
Member

estelle commented May 24, 2024

@BeksOmega Have you had a chance to look at the suggestions?

Co-authored-by: Estelle Weyl <estelle@openwebdocs.org>
@BeksOmega
Copy link
Contributor Author

@BeksOmega Have you had a chance to look at the suggestions?

Sorry about the delay! Committed your suggestions unchanged =)

Copy link
Member

@estelle estelle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Mostly, congratulations on your first merged MDN content PR.
Welcome to the team!

@estelle estelle merged commit c03d01a into mdn:main May 24, 2024
8 checks passed
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 size/s 6-50 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SVG presentation properties not included in CSS cascade information
2 participants