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

white-space option lists are redundant and incomplete #37649

Closed
page200 opened this issue Jan 14, 2025 · 6 comments
Closed

white-space option lists are redundant and incomplete #37649

page200 opened this issue Jan 14, 2025 · 6 comments
Labels
closed: wontfix Out of scope, too much effort, or working as intended Content:CSS Cascading Style Sheets docs

Comments

@page200
Copy link

page200 commented Jan 14, 2025

MDN URL

https://developer.mozilla.org/en-US/docs/Web/CSS/white-space

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

The page https://developer.mozilla.org/en-US/docs/Web/CSS/white-space contains too many lists of possible values and none of them are complete:

What did you expect to see?

Only one complete list

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

No response

Do you have anything more you want to share?

No response

MDN metadata

Page report details
@page200 page200 added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Jan 14, 2025
@github-actions github-actions bot added the Content:CSS Cascading Style Sheets docs label Jan 14, 2025
@Josh-Cena Josh-Cena marked this as a duplicate of #37664 Jan 16, 2025
@Josh-Cena
Copy link
Member

Josh-Cena commented Jan 16, 2025

After many iterations of the CSS Text module, we are left with many versions for the definition of white-space. The "Syntax" section is fully accurate and was last synchronized with the spec a week ago: #37494. The "Formal syntax" is outdated and does not reflect the latest spec; that is a webref issue, not an MDN issue. The latest formal syntax should be found in the spec: https://drafts.csswg.org/css-text-4/#white-space-property where only four keyword values are listed, and the rest of the values are defined as shorthand for <'white-space-collapse'> || <'text-wrap-mode'> || <'white-space-trim'>. nowrap is just a value for text-wrap-mode, break-spaces and collapse are just values for white-space-collapse. Therefore, we do have "one complete list", which the "Syntax" and "Values" sections agree: there are four special keywords, and then all other values you could pass are defined by other properties. The only thing that could be causing confusion is the "Formal syntax", but that's beyond our control.

@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2025
@Josh-Cena Josh-Cena added closed: wontfix Out of scope, too much effort, or working as intended and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Jan 16, 2025
@page200
Copy link
Author

page200 commented Jan 16, 2025

Therefore, we do have "one complete list", which the "Syntax" and "Values" sections agree

The code block at the top of the "Syntax" section doesn't hint at white-space: nowrap; nor white-space: break-spaces; in any way whatsoever.

The "Formal syntax" is outdated and does not reflect the latest spec

Please remove it after merging its unique options into one main list.

@Josh-Cena
Copy link
Member

The formal syntax will automatically fix itself after syncing with the latest CSS spec. It's not wrong because it's a strict subset of what you could do with the current white-space definition.

The code block at the top of the "Syntax" section doesn't hint at white-space: nowrap; nor white-space: break-spaces; in any way whatsoever.

Yes it does; it says "white-space-collapse and text-wrap-mode shorthand values", and gives you three examples of specifying a single value representing either a white-space-collapse or a text-wrap-mode, or specifying both values. There's nothing more special about the two values you listed here compared to the values we demonstrated, wrap and collapse.

@umbralOptimatum
Copy link

umbralOptimatum commented Jan 16, 2025

If the outdated "Formal syntax" section is an external issue, would it be possible to add a note saying so until it's updated?

Yes it does; it says "white-space-collapse and text-wrap-mode shorthand values", and gives you three examples of specifying a single value representing either a white-space-collapse or a text-wrap-mode, or specifying both values. There's nothing more special about the two values you listed here compared to the values we demonstrated, wrap and collapse.

I was also confused by this because the Values section says "two values representing shorthand for the white-space-collapse and text-wrap-mode properties". Since it explicitly excludes single values, I assumed nowrap as a value for white-space was different from the shorthand value. Sounds like that line is incorrect?

@Josh-Cena
Copy link
Member

Yes, welcoming changes to make the shorthand explanation clearer, such as "one or two values".

I'm hoping that the formal syntax would be updated soon though, and notes tend to go stale, so I would just leave it as-is.

@page200
Copy link
Author

page200 commented Jan 17, 2025

It's not wrong because it's a strict subset of what you could do with the current white-space definition.

A strict subset pretending to be the full set is wrong.

it says "white-space-collapse and text-wrap-mode shorthand values", and gives you three examples

It doesn't say that those are examples, it doesn't say that the list is incomplete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed: wontfix Out of scope, too much effort, or working as intended Content:CSS Cascading Style Sheets docs
Projects
None yet
Development

No branches or pull requests

3 participants