File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed
packages/tailwindcss/src/utils Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -329,20 +329,18 @@ export function isPositiveInteger(value: any) {
329329 return Number . isInteger ( num ) && num >= 0 && String ( num ) === String ( value )
330330}
331331
332- /**
333- * Returns true if the value is either a positive whole number or a multiple of 0.25.
334- */
335332export function isValidSpacingMultiplier ( value : any ) {
336333 return isMultipleOf ( value , 0.25 )
337334}
338335
339- /**
340- * Returns true if the value is either a positive whole number or a multiple of 0.25.
341- */
342336export function isValidOpacityValue ( value : any ) {
343337 return isMultipleOf ( value , 0.25 )
344338}
345339
340+ /**
341+ * Ensures a number (or numeric string) is a multiple of another number, and
342+ * that it has no unnecessary leading or trailing zeros.
343+ */
346344function isMultipleOf ( value : string | number , divisor : number ) {
347345 let num = Number ( value )
348346 return num >= 0 && num % divisor === 0 && String ( num ) === String ( value )
You can’t perform that action at this time.
0 commit comments