Skip to content

Commit

Permalink
feat(preset-mini): add container query units (#1076)
Browse files Browse the repository at this point in the history
  • Loading branch information
chu121su12 committed Jun 8, 2022
1 parent 46df44c commit f3370d6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/preset-mini/src/utils/handlers/handlers.ts
Expand Up @@ -22,7 +22,7 @@ const cssProps = [
'border-radius',
]

const numberWithUnitRE = /^(-?[0-9.]+)(px|pt|pc|rem|em|%|vh|vw|in|cm|mm|ex|ch|vmin|vmax|rpx)?$/i
const numberWithUnitRE = /^(-?[0-9.]+)(px|pt|pc|rem|em|%|vh|vw|in|cm|mm|ex|ch|vmin|vmax|cqw|cqh|cqi|cqb|cqmin|cqmax|rpx)?$/i
const numberRE = /^(-?[0-9.]+)$/i
const unitOnlyRE = /^(px)$/i

Expand Down
1 change: 1 addition & 0 deletions test/__snapshots__/preset-mini.test.ts.snap
Expand Up @@ -551,6 +551,7 @@ div:hover .group-\\\\[div\\\\:hover\\\\]-\\\\[combinator\\\\:test-4\\\\]{combina
.w-\\\\[calc\\\\(calc\\\\(100px\\\\*10\\\\)-4rem\\\\)\\\\]{width:calc(calc(100px * 10) - 4rem);}
.w-1{width:0.25rem;}
.w-1\\\\/4{width:25%;}
.w-1cqw{width:1cqw;}
.w-21{width:5.25rem;}
.w-auto{width:auto;}
.w-lg{width:32rem;}
Expand Down
1 change: 1 addition & 0 deletions test/assets/preset-mini-targets.ts
Expand Up @@ -398,6 +398,7 @@ export const presetMiniTargets: string[] = [
'w-21',
'w-1/4',
'w-lg',
'w-1cqw',
'h-screen-sm',
'h-screen-lg',
'max-h-[1px]',
Expand Down

0 comments on commit f3370d6

Please sign in to comment.