fix: Use only shorthand properties for margin and padding - #693
Conversation
Previously a block could end up with both a shorthand style (e.g. "margin") and individual per-side styles (e.g. "marginTop") set at the same time, which caused conflicting values. Spacing is now always written and read back as a single shorthand value.
Confidence Score: 5/5Safe to merge — the change is a focused, well-contained refactor of spacing write/read paths with correct backward-compat handling of legacy longhand data. Every mutation goes through No files require special attention. Reviews (2): Last reviewed commit: "fix: Don't split functional CSS values o..." | Re-trigger Greptile |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #693 +/- ##
========================================
Coverage 56.88% 56.88%
========================================
Files 35 35
Lines 4217 4217
========================================
Hits 2399 2399
Misses 1818 1818 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
expandBoxShorthand split shorthand values on any whitespace, which broke apart functional values with spaces inside them, e.g. calc(10px + 5%). Split only on whitespace outside parentheses so these values survive the legacy per-side to shorthand migration.
Summary
margin) and separate per-side ones (margin{Position}), which could conflict.Before:
Screen.Recording.2026-07-24.at.2.30.30.PM.mp4
After:
Screen.Recording.2026-07-24.at.2.58.17.PM.mp4
Fixes: #690