@asamuzakjp/css-color
Advanced tools
Comparing version 2.6.0 to 2.6.1
@@ -54,3 +54,3 @@ { | ||
}, | ||
"version": "2.6.0" | ||
"version": "2.6.1" | ||
} |
@@ -129,3 +129,3 @@ /** | ||
const { format, dimension } = opt; | ||
if (value && isString(value)) { | ||
if (isString(value)) { | ||
if (REG_FUNC_VAR.test(value)) { | ||
@@ -132,0 +132,0 @@ if (format === VAL_SPEC) { |
@@ -12,3 +12,3 @@ /** | ||
/* constants */ | ||
import { FUNC_CALC_ESC, FUNC_VAR, FUNC_VAR_ESC } from './constant.js'; | ||
import { FUNC_CALC_ESC, FUNC_VAR, FUNC_VAR_ESC, VAL_SPEC } from './constant.js'; | ||
const { | ||
@@ -170,4 +170,5 @@ CloseParen: CLOSE_PAREN, Comment: COMMENT, EOF, Ident: IDENT, | ||
export function cssVar(value, opt = {}) { | ||
if (value && isString(value)) { | ||
if (!REG_FUNC_VAR.test(value)) { | ||
const { customProperty, format } = opt; | ||
if (isString(value)) { | ||
if (!REG_FUNC_VAR.test(value) || format === VAL_SPEC) { | ||
return value; | ||
@@ -179,3 +180,2 @@ } | ||
} | ||
const { customProperty } = opt; | ||
let cacheKey; | ||
@@ -182,0 +182,0 @@ if (typeof customProperty?.callback !== 'function') { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
1338235