content icon indicating copy to clipboard operation
content copied to clipboard

Clarify conceptual rules like `white-space-collapse` in `white-space` documentation.

Open liranmery opened this issue 1 year ago • 1 comments

MDN URL

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

What specific section or headline is this issue about?

The general description of white-space and how browsers handle its behavior.

What information was incorrect, unhelpful, or incomplete?

Browsers expose conceptual internal rules like white-space-collapse and text-wrap in DevTools, but these are not valid CSS properties. The MDN documentation does not clarify this, which could confuse developers into thinking these are real CSS properties.

What did you expect to see?

A note in the documentation clarifying that white-space-collapse and text-wrap are internal browser concepts exposed in developer tools but are not part of the CSS standard or usable in code.

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

This issue occurs in browser developer tools (e.g., Chrome DevTools). The white-space-collapse and text-wrap rules shown in DevTools can mislead developers because they are not valid CSS properties.

Do you have anything more you want to share?

Suggestion: Add a note to MDN's white-space page explaining that these rules are conceptual and should not be used directly in CSS.

Example note: "Note: white-space-collapse and text-wrap are internal representations shown in browser developer tools and are not valid CSS properties. Use white-space with predefined values like normal, nowrap, etc."

liranmery avatar Jan 08 '25 09:01 liranmery

These are not "conceptual properties". Everything you mentioned here is a real property with its MDN documentation. white-space is a shorthand for white-space-collapse and text-wrap-mode; text-wrap is a shorthand for text-wrap-mode and text-wrap-style.

Josh-Cena avatar Jan 08 '25 17:01 Josh-Cena