Skip to content

Commit

Permalink
fix: correct min/max-w/h arbitrary values
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgezreik authored and hymhub committed Jun 13, 2023
1 parent 2257912 commit 03e8733
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions npm/CssToTailwindTranslator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1330,19 +1330,19 @@ const propertyMap: Map<string, Record<string, string> | ((val: string) => string
],
[
'max-height',
val => (isUnit(val) ? ({ "0px": "max-h-0", "100%": "max-h-full", "100vh": "max-h-screen" }[val] ?? `[${val}]`) : '')
val => (isUnit(val) ? ({ "0px": "max-h-0", "100%": "max-h-full", "100vh": "max-h-screen" }[val] ?? `max-h-[${val}]`) : '')
],
[
'max-width',
val => (isUnit(val) ? ({ "none": "max-w-none", "100%": "max-w-full", "min-content": "max-w-min", "max-content": "max-w-max" }[val] ?? `[${val}]`) : '')
val => (isUnit(val) ? ({ "none": "max-w-none", "100%": "max-w-full", "min-content": "max-w-min", "max-content": "max-w-max" }[val] ?? `max-w-[${val}]`) : '')
],
[
'min-height',
val => (isUnit(val) ? ({ "0px": "min-h-0", "100%": "min-h-full", "100vh": "min-h-screen" }[val] ?? `[${val}]`) : '')
val => (isUnit(val) ? ({ "0px": "min-h-0", "100%": "min-h-full", "100vh": "min-h-screen" }[val] ?? `min-h-[${val}]`) : '')
],
[
'min-width',
val => (isUnit(val) ? ({ "0px": "min-w-0", "100%": "min-w-full", "min-content": "min-w-min", "max-content": "min-w-max" }[val] ?? `[${val}]`) : '')
val => (isUnit(val) ? ({ "0px": "min-w-0", "100%": "min-w-full", "min-content": "min-w-min", "max-content": "min-w-max" }[val] ?? `min-w-[${val}]`) : '')
],
[
'mix-blend-mode',
Expand Down

0 comments on commit 03e8733

Please sign in to comment.