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

[css-rythm-1] [editorial] remove redundant px dimension from line-height-step initial value #11148

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

keithamus
Copy link
Member

The line-height-step property in css-rythm-1 defines its initial value as 0px. AIUI - it being a zero value means the px is redundant.

It seems to be more common to use 0 rather than 0px. In fact here are all the places that have an initial of 0:

  • css-box (margin*, padding*)
  • css-scroll-snap (scroll-margin*)
  • css-inline (baseline-shift)
  • css-shapes (shape-margin, shape-padding)
  • css-text (text-indent, line-padding, hyphenate-limit-zone)
  • css-text-decor (text-decoration-trim)
  • css-ui (outline-offset)
  • css-borders (border-*-radius & border-radius)
  • css-logical (okay maybe an unfair comparison as it's mostly logical equivalents of box/borders)

And here are the places that have an initial of 0px:

  • css-rythm (line-height-step - that's this one)
  • css-tables (border-spacing - this initial value is 0px 0px)
  • css-animation (animation-delay - 0s)
  • css-animation (transition-delay, transition-duration - both 0s)
  • css-overflow (overflow-clip-margin* - all 0px)
  • css-backgrounds (background-position* - all 0%)

If this PR gets merged I'll follow up with one correcting css-overflow and perhaps the others 😉

@cdoublev
Copy link
Collaborator

cdoublev commented Nov 4, 2024

If I am not mistaken, only zero <length> outside math functions can be unitless (and zero <angle> in some places explicitly allowing it), which seems to be a legacy thing (akin to <quirky-length>) so leaning towards 0px seems more appropriate imo, as this evidently leads people to make wrong assumptions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants