Comparing version 0.1.3 to 0.1.4
export declare function isVar(value: string): boolean; | ||
export declare function isPrivateVar(value: string): boolean; | ||
export declare function isSelector(value: string): boolean; | ||
@@ -3,0 +4,0 @@ export declare function isGlobalSelector(value: string): boolean; |
export function isVar(value) { | ||
return value.startsWith("--"); | ||
} | ||
export function isPrivateVar(value) { | ||
return value.startsWith("__"); | ||
} | ||
export function isSelector(value) { | ||
@@ -5,0 +8,0 @@ return /[^a-z-]/i.test(value) && !isVar(value); |
{ | ||
"name": "@suid/css", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "CSS render in JS.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -1,2 +0,2 @@ | ||
import { isGlobalSelector, isKeyframes, isMediaQuery, isSelector, isVar, } from "./assert"; | ||
import { isGlobalSelector, isKeyframes, isMediaQuery, isSelector, isVar, isPrivateVar, } from "./assert"; | ||
import snakeCase from "@suid/utils/snakeCase"; | ||
@@ -17,3 +17,6 @@ function renderSelector(propKey, propValue, selectors = [], options = {}) { | ||
const propValue = css[propKey]; | ||
if (isGlobalSelector(propKey)) { | ||
if (isPrivateVar(propKey)) { | ||
continue; | ||
} | ||
else if (isGlobalSelector(propKey)) { | ||
for (const selector in propValue) { | ||
@@ -20,0 +23,0 @@ rules.push(...renderSelector(selector, propValue[selector], [], options)); |
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
14430
27
317