Skip to content

Wrong arbitrary values for border shorthand #25

@guivr

Description

@guivr

Current Behavior

a {
  border-width: 1px 0;
}

Converts to:

a {
  @apply border-[1px_0];
}

Expected Behavior

It should convert to:

a {
  @apply border-y;
}

Things get more complicated if you do

a {
  border-width: 1px 0 3px;
}

then it should be

a {
 @apply border-t border-b-[3px];
}

It's currently using border-[] for arbitrary values but that's for border-color, not for border-width.

In the case above, where border-bottom-width has an arbitrary value of 3px, it should convert to border-b-[3px]

There are many other edge cases on that, like border-width: 1px 2px; which would be border-y border-x-2. Amazing if everything can be converted nicely, but if not, then it should remain unconverted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions