close
Skip to content

fix: don't round decimal unitless values for properties that accept them#5673

Merged
kof merged 1 commit intomainfrom
fix/line-height-decimal-rounding
Apr 2, 2026
Merged

fix: don't round decimal unitless values for properties that accept them#5673
kof merged 1 commit intomainfrom
fix/line-height-decimal-rounding

Conversation

@kof
Copy link
Copy Markdown
Member

@kof kof commented Apr 2, 2026

Decimals like line-height: 1.5 were being rounded to integers because the rounding logic in parseIntermediateOrInvalidValue applied to all unit: "number" values unconditionally. Now it only rounds when parseCssValue confirms the decimal is actually invalid for the property (e.g. z-index, column-count require integers; line-height does not).

Decimals like `line-height: 1.5` were being rounded to integers because
the rounding logic in parseIntermediateOrInvalidValue applied to all
`unit: "number"` values unconditionally. Now it only rounds when
parseCssValue confirms the decimal is actually invalid for the property
(e.g. z-index, column-count require integers; line-height does not).
@kof kof temporarily deployed to development April 2, 2026 21:20 — with Image GitHub Actions Inactive
@kof kof merged commit 80150b7 into main Apr 2, 2026
18 of 20 checks passed
@kof kof deleted the fix/line-height-decimal-rounding branch April 2, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant