Skip to content

Commit

Permalink
Revert "Fix parsing of minimized css output"
Browse files Browse the repository at this point in the history
  • Loading branch information
dfreedm committed Dec 5, 2015
1 parent 090e9d6 commit d3145e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/lib/css-parse.html
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
_rx: {
comments: /\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,
port: /@import[^;]*;/gim,
customProp: /(?:^[^;\-\s}]+)?--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
customProp: /(?:^|[\s;])--[^;{]*?:[^{};]*?(?:[;\n]|$)/gim,
mixinProp: /(?:^|[\s;])?--[^;{]*?:[^{;]*?{[^}]*?}(?:[;\n]|$)?/gim,
mixinApply: /@apply[\s]*\([^)]*?\)[\s]*(?:[;\n]|$)?/gim,
varApply: /[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,
Expand Down
14 changes: 1 addition & 13 deletions test/unit/custom-style.html
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,6 @@
--variable-property-after-property: 3px;
--variable-property-after-assignment: 4px;
--variable-property-before-assignment: 5px;
--variable-into-first-variable: 9px;
--variable-into-second-variable: 10px;
--variable-into-third-variable: 11px;
}
</style>
<child-variable-with-var id="child"></child-variable-with-var>
Expand All @@ -254,8 +251,7 @@
--variable-between-properties: 6px;
background-color: var(--variable-property-before-property); padding-top: var(--variable-property-after-property);
--variable-assignment-before-property: 7px; padding-bottom: var(--variable-property-after-assignment);
padding-left: var(--variable-property-before-assignment);--variable-assignment-after-property: 8px;
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);
padding-left: var(--variable-property-before-assignment);--variable-assignment-after-property: 8px
}
</style>
<child-of-child-with-var id="child"></child-of-child-with-var>
Expand All @@ -270,9 +266,6 @@
padding-right: var(--variable-between-properties);
margin-left: var(--variable-assignment-before-property);
margin-right: var(--variable-assignment-after-property);
bottom: var(--variable-from-other-variable);
left: var(--variable-from-another-variable);
right: var(--variable-from-last-variable);
}
</style>
Text
Expand Down Expand Up @@ -475,16 +468,11 @@
assertComputed(el, '7px', 'margin-left');
assertComputed(el, '8px', 'margin-right');
assertComputed(el, 'rgb(255, 255, 0)', 'background-color');
assertComputed(el, '9px', 'bottom');
assertComputed(el, '10px', 'left');
assertComputed(el, '11px', 'right');
assertComputed(el, '12px', 'top');

// Because FireFox and Chrome parse font-family differently...
var computed = getComputedStyle(el);
assert.equal(computed['font-family'].replace(/['"]+/g, ''), 'Varela font');
});

test('BEM-like CSS selectors under media queries', function() {
assertComputed(document.querySelector('.foo--bar'), '3px');
});
Expand Down
10 changes: 5 additions & 5 deletions test/unit/styling-cross-scope-var.html
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}

#gc4 {
--grand-child-scope-var:
--grand-child-scope-var:
var(--gc4-scope);
}
</style>
Expand Down Expand Up @@ -286,7 +286,7 @@
});
</script>
</dom-module>

<dom-module id="x-scope">
<style>
:host {
Expand Down Expand Up @@ -439,14 +439,14 @@
}
</style>
<template>

</template>
<script>
HTMLImports.whenReady(function() {
Polymer({
is: 'x-inside'
});
});
});
</script>
</dom-module>

Expand Down Expand Up @@ -679,7 +679,7 @@
// test('var values can be overridden by subsequent concrete properties', function() {
// assertComputed(styled.$.overridesConcrete, '4px');
// });

});

</script>
Expand Down

0 comments on commit d3145e8

Please sign in to comment.