@symbo.ls/scratch
Advanced tools
Comparing version 0.3.8 to 0.3.9
@@ -5,3 +5,3 @@ { | ||
"author": "Symbols", | ||
"version": "0.3.8", | ||
"version": "0.3.9", | ||
"files": [ | ||
@@ -8,0 +8,0 @@ "src" |
@@ -26,3 +26,3 @@ 'use strict' | ||
export const mapSpacing = (val, property = 'padding', props) => { | ||
export const mapSpacing = (val, property = 'padding', props, unit) => { | ||
const prefix = '--spacing-' | ||
@@ -42,3 +42,4 @@ | ||
val: stack[i], | ||
prefix | ||
prefix, | ||
unit | ||
}) | ||
@@ -45,0 +46,0 @@ |
@@ -327,7 +327,7 @@ 'use strict' | ||
export const fallBack = ({ type, prop, val = 'A', prefix = '--font-size-' }) => { | ||
export const fallBack = ({ type, prop, val = 'A', prefix = '--font-size-', unit = UNIT.default }) => { | ||
if (typeof val !== 'string') console.warn(prop, val, 'is not a string') | ||
if (val === '-' || val === '') return ({ }) | ||
if (val === 'auto') return ({ [prop]: val }) | ||
if (val === 'auto' || val === 'fit-content' || val === 'min-content' || val === 'max-content') return ({ [prop]: val }) | ||
@@ -348,3 +348,3 @@ // const startsWithLetterRegex = /^[a-zA-Z]/i | ||
return ({ | ||
[prop]: isNegative + value.val + UNIT.default, | ||
[prop]: isNegative + value.val + value.unit, | ||
[prop]: isNegative + value.scaling + 'em' | ||
@@ -351,0 +351,0 @@ }) |
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
26802
832