tailwindcss
Advanced tools
Comparing version 3.3.4 to 3.3.5
@@ -125,2 +125,22 @@ "use strict"; | ||
]; | ||
let preventFormattingKeywords = [ | ||
"min-content", | ||
"max-content", | ||
"fit-content", | ||
// Env | ||
"safe-area-inset-top", | ||
"safe-area-inset-right", | ||
"safe-area-inset-bottom", | ||
"safe-area-inset-left", | ||
"titlebar-area-x", | ||
"titlebar-area-y", | ||
"titlebar-area-width", | ||
"titlebar-area-height", | ||
"keyboard-inset-top", | ||
"keyboard-inset-right", | ||
"keyboard-inset-bottom", | ||
"keyboard-inset-left", | ||
"keyboard-inset-width", | ||
"keyboard-inset-height" | ||
]; | ||
return value.replace(/(calc|min|max|clamp)\(.+\)/g, (match)=>{ | ||
@@ -162,2 +182,6 @@ let result = ""; | ||
]); | ||
} else if (preventFormattingKeywords.some((keyword)=>peek(keyword))) { | ||
let keyword = preventFormattingKeywords.find((keyword)=>peek(keyword)); | ||
result += keyword; | ||
i += keyword.length - 1; | ||
} else if (preventFormattingInFunctions.some((fn)=>peek(fn))) { | ||
@@ -164,0 +188,0 @@ result += consumeUntil([ |
{ | ||
"name": "tailwindcss", | ||
"version": "3.3.4", | ||
"version": "3.3.5", | ||
"description": "A utility-first CSS framework for rapidly building custom user interfaces.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
@@ -87,3 +87,26 @@ import { parseColor } from './color' | ||
let preventFormattingInFunctions = ['theme'] | ||
let preventFormattingKeywords = [ | ||
'min-content', | ||
'max-content', | ||
'fit-content', | ||
// Env | ||
'safe-area-inset-top', | ||
'safe-area-inset-right', | ||
'safe-area-inset-bottom', | ||
'safe-area-inset-left', | ||
'titlebar-area-x', | ||
'titlebar-area-y', | ||
'titlebar-area-width', | ||
'titlebar-area-height', | ||
'keyboard-inset-top', | ||
'keyboard-inset-right', | ||
'keyboard-inset-bottom', | ||
'keyboard-inset-left', | ||
'keyboard-inset-width', | ||
'keyboard-inset-height', | ||
] | ||
return value.replace(/(calc|min|max|clamp)\(.+\)/g, (match) => { | ||
@@ -130,2 +153,9 @@ let result = '' | ||
// Skip formatting of known keywords | ||
else if (preventFormattingKeywords.some((keyword) => peek(keyword))) { | ||
let keyword = preventFormattingKeywords.find((keyword) => peek(keyword)) | ||
result += keyword | ||
i += keyword.length - 1 | ||
} | ||
// Skip formatting inside known functions | ||
@@ -132,0 +162,0 @@ else if (preventFormattingInFunctions.some((fn) => peek(fn))) { |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5566928
34209