Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon-He95 committed Oct 30, 2023
1 parent 2714fea commit 73f2852
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions packages/preset-mini/src/_utils/mappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,5 @@ export const globalKeywords = [
'revert-layer',
'unset',
]

export const cssMathFnRE = /(?:calc|clamp|min|max)\s*\(.*\)/
4 changes: 1 addition & 3 deletions packages/preset-mini/src/_utils/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { toArray } from '@unocss/core'
import { colorOpacityToString, colorToString, getStringComponents, parseCssColor } from '@unocss/rule-utils'
import type { Theme } from '../theme'
import { h } from './handlers'
import { directionMap, globalKeywords } from './mappings'
import { cssMathFnRE, directionMap, globalKeywords } from './mappings'
import { numberWithUnitRE } from './handlers/regex'

export const CONTROL_MINI_NO_NEGATIVE = '$$mini-no-negative'
Expand Down Expand Up @@ -242,8 +242,6 @@ export function makeGlobalStaticRules(prefix: string, property?: string): Static
return globalKeywords.map(keyword => [`${prefix}-${keyword}`, { [property ?? prefix]: keyword }])
}

export const cssMathFnRE = /(?:calc|clamp|min|max)\s*\(.*\)/

export function isCSSMathFn(value: string) {
return cssMathFnRE.test(value)
}
Expand Down

0 comments on commit 73f2852

Please sign in to comment.