Skip to content

Commit

Permalink
Update dataTypes.js
Browse files Browse the repository at this point in the history
  • Loading branch information
marco-carvalho authored Oct 19, 2023
1 parent 680adb1 commit 852a7c1
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/util/dataTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,9 @@ let lengthUnits = [
'cqmax',
]
let lengthUnitsPattern = `(?:${lengthUnits.join('|')})`
let lengthRegExp = new RegExp(`^[+-]?[0-9]*\.?[0-9]+(?:[eE][+-]?[0-9]+)?${lengthUnitsPattern}$`);
let lengthRegExp = new RegExp(`^[+-]?[0-9]*\.?[0-9]+(?:[eE][+-]?[0-9]+)?${lengthUnitsPattern}$`)
export function length(value) {
return (
value === '0' ||
lengthRegExp.test(value) ||
isCSSFunction(value)
)
return value === '0' || lengthRegExp.test(value) || isCSSFunction(value)
}

let lineWidths = new Set(['thin', 'medium', 'thick'])
Expand Down

0 comments on commit 852a7c1

Please sign in to comment.