jss-plugin-rule-value-function
Advanced tools
Comparing version 10.9.1-alpha.1 to 10.9.1-alpha.2
@@ -144,7 +144,3 @@ function warning(condition, message) { | ||
var toCssValue = function toCssValue(value, ignoreImportant) { | ||
if (ignoreImportant === void 0) { | ||
ignoreImportant = false; | ||
} | ||
var toCssValue = function toCssValue(value) { | ||
if (!Array.isArray(value)) return value; | ||
@@ -162,3 +158,3 @@ var cssValue = ''; // Support space separated values via `[['5px', '10px']]`. | ||
if (!ignoreImportant && value[value.length - 1] === '!important') { | ||
if (value[value.length - 1] === '!important') { | ||
cssValue += ' !important'; | ||
@@ -1688,8 +1684,3 @@ } | ||
if (Array.isArray(value)) { | ||
cssValue = toCssValue(value, true); | ||
if (value[value.length - 1] === '!important') { | ||
cssRule.style.setProperty(prop, cssValue, 'important'); | ||
return true; | ||
} | ||
cssValue = toCssValue(value); | ||
} // Support CSSTOM. | ||
@@ -1701,3 +1692,5 @@ | ||
} else { | ||
cssRule.style.setProperty(prop, cssValue); | ||
var indexOfImportantFlag = cssValue ? cssValue.indexOf('!important') : -1; | ||
var cssValueWithoutImportantFlag = indexOfImportantFlag > -1 ? cssValue.substr(0, indexOfImportantFlag - 1) : cssValue; | ||
cssRule.style.setProperty(prop, cssValueWithoutImportantFlag, indexOfImportantFlag > -1 ? 'important' : ''); | ||
} | ||
@@ -2115,3 +2108,3 @@ } catch (err) { | ||
this.id = instanceCounter++; | ||
this.version = "10.9.1-alpha.1"; | ||
this.version = "10.9.1-alpha.2"; | ||
this.plugins = new PluginsRegistry(); | ||
@@ -2118,0 +2111,0 @@ this.options = { |
{ | ||
"name": "jss-plugin-rule-value-function", | ||
"description": "JSS plugin for function value and rule syntax", | ||
"version": "10.9.1-alpha.1", | ||
"version": "10.9.1-alpha.2", | ||
"license": "MIT", | ||
@@ -47,6 +47,6 @@ "homepage": "https://cssinjs.org/", | ||
"@babel/runtime": "^7.3.1", | ||
"jss": "10.9.1-alpha.1", | ||
"jss": "10.9.1-alpha.2", | ||
"tiny-warning": "^1.0.2" | ||
}, | ||
"gitHead": "6386739e1015ecd6f85a7e9c7a0c89d65ad153b9" | ||
"gitHead": "69517944d6b00246858af9d95a796580533fcaa5" | ||
} |
@@ -11,3 +11,3 @@ # jss-plugin-rule-value-function | ||
See our website [jss-plugin-rule-value-function](https://cssinjs.org/jss-plugin-rule-value-function?v=v10.9.1-alpha.1) for more information. | ||
See our website [jss-plugin-rule-value-function](https://cssinjs.org/jss-plugin-rule-value-function?v=v10.9.1-alpha.2) for more information. | ||
@@ -14,0 +14,0 @@ ## Install |
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
79586
2143
+ Addedjss@10.9.1-alpha.2(transitive)
- Removedjss@10.9.1-alpha.1(transitive)
Updatedjss@10.9.1-alpha.2