Skip to content

fix(css): clarify unitless zero for angle values#44147

Merged
hamishwillee merged 2 commits into
mdn:mainfrom
danyalahmed1995:fix/44143-angle-unitless-zero
May 17, 2026
Merged

fix(css): clarify unitless zero for angle values#44147
hamishwillee merged 2 commits into
mdn:mainfrom
danyalahmed1995:fix/44143-angle-unitless-zero

Conversation

@danyalahmed1995
Copy link
Copy Markdown
Contributor

Summary

Fixes #44143.

Updates the CSS <angle> value documentation to clarify that a unitless 0 is not generally valid for angle values.

The previous wording said:

The angle unit is optional after the number 0.

That was too broad. Some legacy angle contexts may allow a unitless zero, but <angle> values should generally include an angle unit such as 0deg, 0grad, 0rad, or 0turn.

This PR also updates the null angle example so it no longer lists bare 0 as equivalent to angle values.

Changes

  • Clarified the <angle> syntax note for zero angles.
  • Removed bare 0 from the null angle equivalence example.

Validation

  • npm run filecheck -- files/en-us/web/css/reference/values/angle/index.md
  • npx markdownlint-cli2 files/en-us/web/css/reference/values/angle/index.md
  • npx prettier -c files/en-us/web/css/reference/values/angle/index.md
  • npx cspell --no-progress --gitignore --config .vscode/cspell.json files/en-us/web/css/reference/values/angle/index.md
  • git diff --check

@danyalahmed1995 danyalahmed1995 requested a review from a team as a code owner May 17, 2026 20:56
@danyalahmed1995 danyalahmed1995 requested review from hamishwillee and removed request for a team May 17, 2026 20:56
@github-actions github-actions Bot added Content:CSS Cascading Style Sheets docs size/xs [PR only] 0-5 LoC changed labels May 17, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 17, 2026

Preview URLs (1 page)

(comment last updated: 2026-05-17 23:17:47)

Comment thread files/en-us/web/css/reference/values/angle/index.md Outdated
@github-actions github-actions Bot added size/s [PR only] 6-50 LoC changed and removed size/xs [PR only] 0-5 LoC changed labels May 17, 2026
Copy link
Copy Markdown
Collaborator

@hamishwillee hamishwillee left a comment

Choose a reason for hiding this comment

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

Thanks very much @danyalahmed1995 - confirmed via spec https://drafts.csswg.org/css-values/#angles

@hamishwillee hamishwillee merged commit 06d31d3 into mdn:main May 17, 2026
9 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 [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Unitless 0 is not a valid angle

3 participants