Skip to content

Commit d3145e8

Browse files
committed
Revert "Fix parsing of minimized css output"
1 parent 090e9d6 commit d3145e8

3 files changed

Lines changed: 7 additions & 19 deletions

File tree

‎src/lib/css-parse.html‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
_rx: {
172172
comments: /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,
173173
port: /@import[^;]*;/gim,
174-
customProp: /(?:^[^;\-\s}]+)?--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
174+
customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
175175
mixinProp: /(?:^|[\s;])?--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,
176176
mixinApply: /@apply[\s]*\([^)]*?\)[\s]*(?:[;\n]|$)?/gim,
177177
varApply: /[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,

‎test/unit/custom-style.html‎

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -235,9 +235,6 @@
235235
--variable-property-after-property: 3px;
236236
--variable-property-after-assignment: 4px;
237237
--variable-property-before-assignment: 5px;
238-
--variable-into-first-variable: 9px;
239-
--variable-into-second-variable: 10px;
240-
--variable-into-third-variable: 11px;
241238
}
242239
</style>
243240
<child-variable-with-var id="child"></child-variable-with-var>
@@ -254,8 +251,7 @@
254251
--variable-between-properties: 6px;
255252
background-color: var(--variable-property-before-property); padding-top: var(--variable-property-after-property);
256253
--variable-assignment-before-property: 7px; padding-bottom: var(--variable-property-after-assignment);
257-
padding-left: var(--variable-property-before-assignment);--variable-assignment-after-property: 8px;
258-
top: 12px;--variable-from-other-variable: var(--variable-into-first-variable);--variable-from-another-variable: var(--variable-into-second-variable); --variable-from-last-variable: var(--variable-into-third-variable);
254+
padding-left: var(--variable-property-before-assignment);--variable-assignment-after-property: 8px
259255
}
260256
</style>
261257
<child-of-child-with-var id="child"></child-of-child-with-var>
@@ -270,9 +266,6 @@
270266
padding-right: var(--variable-between-properties);
271267
margin-left: var(--variable-assignment-before-property);
272268
margin-right: var(--variable-assignment-after-property);
273-
bottom: var(--variable-from-other-variable);
274-
left: var(--variable-from-another-variable);
275-
right: var(--variable-from-last-variable);
276269
}
277270
</style>
278271
Text
@@ -475,16 +468,11 @@
475468
assertComputed(el, '7px', 'margin-left');
476469
assertComputed(el, '8px', 'margin-right');
477470
assertComputed(el, 'rgb(255, 255, 0)', 'background-color');
478-
assertComputed(el, '9px', 'bottom');
479-
assertComputed(el, '10px', 'left');
480-
assertComputed(el, '11px', 'right');
481-
assertComputed(el, '12px', 'top');
482471

483472
// Because FireFox and Chrome parse font-family differently...
484473
var computed = getComputedStyle(el);
485474
assert.equal(computed['font-family'].replace(/['"]+/g, ''), 'Varela font');
486475
});
487-
488476
test('BEM-like CSS selectors under media queries', function() {
489477
assertComputed(document.querySelector('.foo--bar'), '3px');
490478
});

‎test/unit/styling-cross-scope-var.html‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
}
9595

9696
#gc4 {
97-
--grand-child-scope-var:
97+
--grand-child-scope-var:
9898
var(--gc4-scope);
9999
}
100100
</style>
@@ -286,7 +286,7 @@
286286
});
287287
</script>
288288
</dom-module>
289-
289+
290290
<dom-module id="x-scope">
291291
<style>
292292
:host {
@@ -439,14 +439,14 @@
439439
}
440440
</style>
441441
<template>
442-
442+
443443
</template>
444444
<script>
445445
HTMLImports.whenReady(function() {
446446
Polymer({
447447
is: 'x-inside'
448448
});
449-
});
449+
});
450450
</script>
451451
</dom-module>
452452

@@ -679,7 +679,7 @@
679679
// test('var values can be overridden by subsequent concrete properties', function() {
680680
// assertComputed(styled.$.overridesConcrete, '4px');
681681
// });
682-
682+
683683
});
684684

685685
</script>

0 commit comments

Comments
 (0)