fix(declaration-converters-mapping): fix border shorthands, improves border-width, and fixes border arbitrary values - #24
Open
guivr wants to merge 6 commits into
Open
fix(declaration-converters-mapping): fix border shorthands, improves border-width, and fixes border arbitrary values#24guivr wants to merge 6 commits into
guivr wants to merge 6 commits into
Conversation
Supports border shorthand when some of its values are missing (width, style, color)
Add a new test for border shorthand that doesn't has a border-width on the value
…hout unit Now it accepts 0 without unit fix Jackardios#26
…der shorthand Now arbitrary values for border shorthand works correctly. Previously, everything was using border-[] prefix, but that is only correct for border-color arbitrary values. fix Jackardios#25
Author
|
This now also fixes #25 But can be improved for sure |
…when 4 values are declared" Now if X and Y values are the same, even if border-width had 4 values declared, it uses X and Y instead of using 4 different classes (2 vs 4) fix Jackardios#25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supports border shorthand when some of its values are missing (width, style, color)
Description of change
The way
bordershorthand was being converted, it was always expecting a perfect value, in order, and nothing missing:width style color. But sometimesborderdoesn't come with width, or style, or color - and it's still valid CSS. Or it could be on a completely different order, likecolor width style.Example:
was converting to:
now converts to:
Fixes #26
It now also properly handles border-width arbitrary value. It used to convert
border-width: 4.5emtoborder-[4.5em]which is wrong (that is for border-color), now it converts toborder-w-[4.5em]and it's quite smart and convertsborder-width: 1px 2px;toborder-y border-x-2Fixes +1: #25