Skip to content

Update syntax for white-space#37494

Merged
estelle merged 5 commits intomdn:mainfrom
skyclouds2001:white-space-shorthand
Jan 6, 2025
Merged

Update syntax for white-space#37494
estelle merged 5 commits intomdn:mainfrom
skyclouds2001:white-space-shorthand

Conversation

@skyclouds2001
Copy link
Copy Markdown
Contributor

@skyclouds2001 skyclouds2001 commented Jan 4, 2025

Description

the spec has updated the syntax for white-space property, it is no longer a shorthand property for text-wrap property, but a shorthand property for text-wrap-mode property
this happens in w3c/csswg-drafts@3a1eb85, as text-wrap property also become a shorthand property for text-wrap-mode property and text-wrap-style property, see also w3c/csswg-drafts#9102

nowrap value and break-spaces value has been removed from spec, since they've defined in the white-space-collapse and text-wrap-mode longhand properties
this happens in w3c/csswg-drafts@dfb236b (w3c/csswg-drafts#9227) and w3c/csswg-drafts@4717dbc

also fix the typo in syntax section in text-wrap-mode

Motivation

Additional details

https://drafts.csswg.org/css-text-4/#propdef-white-space for spec

Related issues and pull requests

mdn/browser-compat-data#25572 for bcd change
mdn/data#878 for data change
mdn/interactive-examples#2884 for interactive example change

@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/s [PR only] 6-50 LoC changed labels Jan 4, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jan 4, 2025

Preview URLs

Flaws (192)

URL: /en-US/docs/Web/CSS/text-wrap
Title: text-wrap
Flaw count: 48

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/CSS_basics
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/What_is_CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/Getting_started
    • and 43 more flaws omitted

URL: /en-US/docs/Web/CSS/white-space-collapse
Title: white-space-collapse
Flaw count: 48

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/CSS_basics
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/What_is_CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/Getting_started
    • and 43 more flaws omitted

URL: /en-US/docs/Web/CSS/text-wrap-mode
Title: text-wrap-mode
Flaw count: 48

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/CSS_basics
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/What_is_CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/Getting_started
    • and 43 more flaws omitted

URL: /en-US/docs/Web/CSS/white-space
Title: white-space
Flaw count: 48

  • macros:
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/Getting_started_with_the_web/CSS_basics
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/What_is_CSS
    • Wrong xref macro used (consider changing which macro you use). Error processing path /en-US/docs/Learn/CSS/First_steps/Getting_started
    • and 43 more flaws omitted
External URLs (2)

URL: /en-US/docs/Web/CSS/text-wrap
Title: text-wrap

(comment last updated: 2025-01-06 04:02:59)

@skyclouds2001 skyclouds2001 marked this pull request as ready for review January 4, 2025 09:27
@skyclouds2001 skyclouds2001 requested a review from a team as a code owner January 4, 2025 09:27
@skyclouds2001 skyclouds2001 requested review from estelle and removed request for a team January 4, 2025 09:27
@skyclouds2001 skyclouds2001 changed the title white-space no longer a shorthand for text-wrap white-space become a shorthand for text-wrap-mode Jan 4, 2025
@skyclouds2001 skyclouds2001 changed the title white-space become a shorthand for text-wrap-mode Update syntax for white-space Jan 4, 2025
@github-actions github-actions Bot added size/m [PR only] 51-500 LoC changed and removed size/s [PR only] 6-50 LoC changed labels Jan 4, 2025
Comment thread files/en-us/web/css/white-space/index.md Outdated
Copy link
Copy Markdown
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.

Thanks! 🎉

Comment thread files/en-us/web/css/white-space/index.md Outdated
@estelle estelle merged commit 4809e82 into mdn:main Jan 6, 2025
@skyclouds2001 skyclouds2001 deleted the white-space-shorthand branch January 6, 2025 14:25
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/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants