==================
* Fixed issue [#866](https://github.com/jakubpawlowicz/clean-css/issues/866) - edge case in `inline` option.
+* Fixed issue [#867](https://github.com/jakubpawlowicz/clean-css/issues/867) - skip optimizing variable values.
[4.0.0 / 2017-01-23](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.24...v4.0.0)
==================
var QUOTED_PATTERN = /^('.*'|".*")$/;
var QUOTED_BUT_SAFE_PATTERN = /^['"][a-zA-Z][a-zA-Z\d\-_]+['"]$/;
var URL_PREFIX_PATTERN = /^url\(/i;
+var VARIABLE_NAME_PATTERN = /^--\S+$/;
function isNegative(value) {
return value && value[1][0] == '-' && parseFloat(value[1]) < 0;
continue;
}
+ if (VARIABLE_NAME_PATTERN.test(name)) {
+ continue;
+ }
+
for (var j = 0, m = property.value.length; j < m; j++) {
type = property.value[j][0];
value = property.value[j][1];
]
}, { level: 1 })
)
+ .addBatch(
+ optimizerContext('quotes', {
+ 'font-family': [
+ '.block{font-family:"Arial"}',
+ '.block{font-family:Arial}'
+ ],
+ 'variable': [
+ '.block{--font-family:"Arial"}',
+ '.block{--font-family:"Arial"}'
+ ]
+ }, { level: 1 })
+ )
.addBatch(
optimizerContext('@charset cleanup off', {
'stays where it is': [