mirror of
https://github.com/Polymer/polymer.git
synced 2025-02-25 18:55:30 -06:00
Merge branch 'nazar-pc-fix-for-bem-modifiers'
This commit is contained in:
commit
bb8429d584
@ -137,7 +137,7 @@ Polymer.CssParse = (function() {
|
||||
},
|
||||
|
||||
_hasMixinRules: function(rules) {
|
||||
return (rules[0].selector.indexOf(this.VAR_START) >= 0);
|
||||
return rules[0].selector.indexOf(this.VAR_START) === 0;
|
||||
},
|
||||
|
||||
removeCustomProps: function(cssText) {
|
||||
|
@ -166,7 +166,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
p || '';
|
||||
}
|
||||
}
|
||||
return parts.join(';');
|
||||
return parts.filter(function(v) {return v;}).join(';');
|
||||
},
|
||||
|
||||
applyProperties: function(rule, props) {
|
||||
|
@ -117,6 +117,18 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
border: 20px solid blue;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
.foo--bar {
|
||||
border-top : 3px solid red;
|
||||
}
|
||||
</style>
|
||||
<style is="custom-style">
|
||||
@media (min-width: 1px) {
|
||||
.foo--bar {
|
||||
border-top : 20px solid blue;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="italic">italic</div>
|
||||
@ -143,6 +155,7 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
|
||||
<div class="foo"></div>
|
||||
|
||||
<div class="foo--bar style-scope"></div>
|
||||
|
||||
<dom-module id="x-baz">
|
||||
<style>
|
||||
@ -461,6 +474,9 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN
|
||||
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');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user