Skip to content

Conversation

@zfeher
Copy link

@zfeher zfeher commented Mar 12, 2025

Fixes #32

inset/margin/padding expects top-right-bottom-left ordering physical4Prop has top-left-bottom-right order.

As far as I understand validateRuleWithProps ensures that we always get 4 declarations so no need to check values length for less than 4 elements.

The declaration value shortening is fixed to work with top-right-bottom-left order so the shortening can proceed as:

# top right bottom left => top right/left bottom
10px 20px 30px 20px => 10px 20px 30px
# top right/left bottom => top/bottom right/left
10px 20px 10px => 10px 20px
# top/bottom right/left => all
10px 10px => 10px

@sssats
Copy link

sssats commented Oct 3, 2025

@romainmenke can you merge that PR?

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.

Autofix produces erroneous shorthands (second issue)

2 participants