@zelgadis87/utils-core 4.13.9 → 4.13.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@zelgadis87/utils-core",
4
- "version": "4.13.9",
4
+ "version": "4.13.10",
5
5
  "author": "Zelgadis87",
6
6
  "license": "ISC",
7
7
  "private": false,
package/src/utils/css.ts CHANGED
@@ -24,7 +24,11 @@ export function cssDeclarationRulesDictionaryToCss( syleDeclarationRulesForSelec
24
24
  export function cssSelectorDeclarationRulesDictionaryToCss( styleDeclarationRules: TCssDeclarationRulesDictionary | TCssSelectorDeclarationRulesDictionary, indent = 0 ): string[] {
25
25
  return Object.entries( styleDeclarationRules ).map( ( [ key, value ]: [ string, string | TCssSelectorDeclarationRulesDictionary ] ) => {
26
26
  if ( typeof value === 'string' ) {
27
- return repeat( tabulation, indent ) + pascalCaseToKebabCase( key ) + colon + space + value + semiColon;
27
+ if ( key.startsWith( '--' ) ) {
28
+ return repeat( tabulation, indent ) + key + colon + space + value + semiColon;
29
+ } else {
30
+ return repeat( tabulation, indent ) + pascalCaseToKebabCase( key ) + colon + space + value + semiColon;
31
+ }
28
32
  } else {
29
33
  return repeat( tabulation, indent ) + key + space + openBracket + newLine + cssSelectorDeclarationRulesDictionaryToCss( value, indent + 1 ).join( newLine ) + newLine + repeat( tabulation, indent ) + closeBracket;
30
34
  }