@jsxstyle/core
Advanced tools
Comparing version 0.0.0-canary-20241220083809 to 0.0.0-canary-20241221205438
@@ -28,3 +28,3 @@ import { dangerousStyleValue } from './dangerousStyleValue.js'; | ||
if (propValue) { | ||
cssBody += delimiter + `${customPropName}: ${propValue}`; | ||
cssBody += `${delimiter}${customPropName}:${propValue}`; | ||
delimiter = ';'; | ||
@@ -36,3 +36,3 @@ } | ||
if (colorScheme) { | ||
cssBody = `color-scheme: ${colorScheme}${delimiter}${cssBody}`; | ||
cssBody = `color-scheme:${colorScheme}${delimiter}${cssBody}`; | ||
} | ||
@@ -45,9 +45,9 @@ const overrideClassName = overrideClassNamePrefix + variantName; | ||
if (variantName === 'default') { | ||
styles.unshift(`${selector} { ${cssBody} }`); | ||
styles.unshift(`${selector}{${cssBody}}`); | ||
} | ||
// `:not(.\\9)` bumps specificity, +1 class for each `.\\9` | ||
styles.push(`${selector}:not(.\\9).${overrideClassName} { ${cssBody} }`); | ||
styles.push(`${selector}:not(.\\9).${overrideClassName}{${cssBody}}`); | ||
if (variant.mediaQuery) { | ||
variantObj.mediaQuery = `@media ${variant.mediaQuery}`; | ||
styles.push(`@media ${variant.mediaQuery} { ${selector}:not(.\\9) { ${cssBody} } }`); | ||
styles.push(`@media ${variant.mediaQuery}{${selector}:not(.\\9){${cssBody}}}`); | ||
} | ||
@@ -54,0 +54,0 @@ } |
@@ -47,3 +47,3 @@ import { dangerousStyleValue } from './dangerousStyleValue.js'; | ||
groupStyles += | ||
(groupStyles === '' ? ' ' : '; ') + | ||
(groupStyles === '' ? '' : ';') + | ||
hyphenateStyleName(propName) + | ||
@@ -63,3 +63,3 @@ ':' + | ||
} | ||
animationValue += k + ' {' + groupStyles + ' } '; | ||
animationValue += k + '{' + groupStyles + '}'; | ||
} | ||
@@ -75,3 +75,3 @@ if (animationValue === '') { | ||
specificity++; | ||
insertRuleCallback?.(`@keyframes ${animationKey} { ${animationValue}}`, '@' + animationKey); | ||
insertRuleCallback?.(`@keyframes ${animationKey}{${animationValue}}`, '@' + animationKey); | ||
} | ||
@@ -99,12 +99,12 @@ else { | ||
const selector = ampersandString?.replace(/&/g, classNameSelector) || classNameSelector; | ||
const styleRule = ((queryString ? queryString + ' { ' : '') || | ||
(mediaQuery ? '@media ' + mediaQuery + ' { ' : '') || | ||
const styleRule = ((queryString ? queryString + '{' : '') || | ||
(mediaQuery ? '@media ' + mediaQuery + '{' : '') || | ||
'') + | ||
selector + | ||
' { ' + | ||
'{' + | ||
hyphenatedPropName + | ||
':' + | ||
styleValue + | ||
' }' + | ||
(queryString || mediaQuery ? ' }' : ''); | ||
'}' + | ||
(queryString || mediaQuery ? '}' : ''); | ||
classNames += (classNames === '' ? '' : ' ') + className; | ||
@@ -111,0 +111,0 @@ insertRuleCallback?.(styleRule, className); |
{ | ||
"name": "@jsxstyle/core", | ||
"version": "0.0.0-canary-20241220083809", | ||
"version": "0.0.0-canary-20241221205438", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "files": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
92176