sass-to-css-variables
Advanced tools
Comparing version
@@ -24,8 +24,5 @@ const Q = require('q'); | ||
if(value.startsWith('$')) { | ||
value = 'var(--' + value.replace('$', '') + ')'; | ||
if(value.includes(';')) { | ||
value = value.replace(';', ''); | ||
value = value + ';'; | ||
} | ||
if(value.includes('$')) { | ||
let oldVariable = value.substring(value.indexOf('$')).replace(/;|,| |\)/g, ''); | ||
value = value.replace(oldVariable, 'var(--' + oldVariable.replace('$', '') + ')'); | ||
} | ||
@@ -32,0 +29,0 @@ |
{ | ||
"name": "sass-to-css-variables", | ||
"version": "0.0.2", | ||
"version": "1.0.0", | ||
"description": "Convert stylesheets from $ variables to use CSS variables", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
16449
1.34%109
7.92%0
-100%