* Fixed issue [#693](https://github.com/jakubpawlowicz/clean-css/issues/693) - restructuring edge case.
* Fixed issue [#711](https://github.com/jakubpawlowicz/clean-css/issues/711) - border fuzzy matching.
+* Fixed issue [#714](https://github.com/jakubpawlowicz/clean-css/issues/714) - stringifying property level at rules.
[3.4.8 / 2015-11-13](https://github.com/jakubpawlowicz/clean-css/compare/v3.4.7...v3.4.8)
==================
var token = tokens[position];
var isVariableDeclaration = token[0][0].indexOf('--') === 0;
- if (isVariableDeclaration && Array.isArray(token[1][0][0])) {
+ if (isVariableDeclaration && atRulesOrProperties(token[1])) {
store('{', context);
body(token[1], context);
store('};', context);
}
}
+function atRulesOrProperties(values) {
+ for (var i = 0, l = values.length; i < l; i++) {
+ if (values[i][0] == AT_RULE || Array.isArray(values[i][0]))
+ return true;
+ }
+
+ return false;
+}
+
function all(tokens, context) {
var joinCharacter = context.keepBreaks ? lineBreak : '';
var store = context.store;
'multiple @apply with whitespace': [
'a{' + lineBreak + '@apply(--rule1);' + lineBreak + ' @apply(--rule2);' + lineBreak + 'color:red;display:block}',
'a{@apply(--rule1);@apply(--rule2);color:red;display:block}'
+ ],
+ '@apply another rule within :root context 123': [
+ ':root{--layout:{display:flex};--layout-horizontal:{@apply(--layout)};}',
+ ':root{--layout:{display:flex};--layout-horizontal:{@apply(--layout)};}'
]
})
)