-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support arbitrary values for flex-basis, flex-grow, flex-shrink…
…, grid-auto-rows, grid-auto-columns (#180)
- Loading branch information
1 parent
6dabb14
commit d3106cd
Showing
15 changed files
with
223 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
export const numberWithUnitRE = /^(-?[0-9.]+)(px|pt|pc|%|r?em|ex|ch|ic|(?:[sld]?v|cq)(?:[whib]|min|max)|in|cm|mm|rpx)?$/i; | ||
export const numberWithUnitRE = /^(-?[0-9.]+)(fr|px|pt|pc|%|r?em|ex|ch|ic|(?:[sld]?v|cq)(?:[whib]|min|max)|in|cm|mm|rpx)?$/i; | ||
export const numberRE = /^(-?[0-9.]+)$/i; | ||
export const unitOnlyRE = /^(px)$/i; |
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`flex shrink/grow with arbitrary values 1`] = ` | ||
"/* layer: default */ | ||
.shrink, | ||
.shrink-\\\\[1\\\\]{flex-shrink:1;} | ||
.shrink-\\\\[0\\\\]{flex-shrink:0;} | ||
.shrink-\\\\[2\\\\]{flex-shrink:2;} | ||
.shrink-\\\\[3\\\\]{flex-shrink:3;} | ||
.shrink-\\\\[4\\\\]{flex-shrink:4;} | ||
.shrink-\\\\[5\\\\]{flex-shrink:5;} | ||
.grow, | ||
.grow-\\\\[1\\\\]{flex-grow:1;} | ||
.grow-\\\\[0\\\\]{flex-grow:0;} | ||
.grow-\\\\[2\\\\]{flex-grow:2;} | ||
.grow-\\\\[3\\\\]{flex-grow:3;} | ||
.grow-\\\\[4\\\\]{flex-grow:4;} | ||
.grow-\\\\[5\\\\]{flex-grow:5;}" | ||
`; | ||
|
||
exports[`flex-basis 1`] = ` | ||
"/* layer: default */ | ||
.basis-1{flex-basis:0.1rem;} | ||
.basis-1\\\\/2{flex-basis:50%;} | ||
.basis-1\\\\/4{flex-basis:25%;} | ||
.basis-1\\\\/5{flex-basis:20%;} | ||
.basis-16{flex-basis:1.6rem;} | ||
.basis-2{flex-basis:0.2rem;} | ||
.basis-2\\\\/5{flex-basis:40%;} | ||
.basis-32{flex-basis:3.2rem;} | ||
.basis-4{flex-basis:0.4rem;} | ||
.basis-48{flex-basis:4.8rem;} | ||
.basis-64{flex-basis:6.4rem;} | ||
.basis-8{flex-basis:0.8rem;}" | ||
`; | ||
|
||
exports[`flex-basis with arbitrary values 1`] = ` | ||
"/* layer: default */ | ||
.basis-\\\\[15\\\\]{flex-basis:1.5rem;} | ||
.basis-\\\\[15\\\\%\\\\]{flex-basis:15%;} | ||
.basis-\\\\[15px\\\\]{flex-basis:15px;} | ||
.basis-\\\\[15rem\\\\]{flex-basis:15rem;}" | ||
`; |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html | ||
|
||
exports[`testing content-empty 1`] = ` | ||
"/* layer: default */ | ||
.before\\\\:content-empty::before{content:\\"\\";} | ||
@media (min-width: 480px){ | ||
.sm\\\\:grid{display:grid;} | ||
}" | ||
`; | ||
|
||
exports[`testing content-none 1`] = ` | ||
"/* layer: default */ | ||
.before\\\\:content-none::before{content:none;} | ||
@media (min-width: 480px){ | ||
.sm\\\\:grid{display:grid;} | ||
}" | ||
`; | ||
|
||
exports[`testing empty string as arbitrary value 1`] = ` | ||
"/* layer: default */ | ||
.before\\\\:content-\\\\[\\\\\\"\\\\\\"\\\\]::before{content:\\"\\";} | ||
@media (min-width: 480px){ | ||
.sm\\\\:grid{display:grid;} | ||
}" | ||
`; |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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