Skip to content

Commit

Permalink
Merge pull request #1624 from Polymer/style-url
Browse files Browse the repository at this point in the history
Fixes url's in style mixins.
  • Loading branch information
kevinpschaaf committed May 26, 2015
2 parents b0fa30a + 69db79f commit 4678a0b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/lib/style-properties.html
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
pp[1] = pp[1].trim();
pp[1] = this.valueForProperty(pp[1], props) || pp[1];
}
p = pp.join(': ');
p = pp.join(':');
}
parts[i] = (p && p.lastIndexOf(';') === p.length - 1) ?
// strip trailing ;
Expand Down
8 changes: 8 additions & 0 deletions test/unit/styling-cross-scope-apply.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

--mixin2: {
border: 3px solid seagreen;
background: url(http://www.google.com/icon.png);
};
}

Expand Down Expand Up @@ -177,6 +178,13 @@
assertComputed(styled.$.mixin4, '2px', 'margin-top');
});

test('mixins apply with url values', function() {
var url = 'http://www.google.com/icon.png';
var e = styled.$.child;
assert.include(e._styleProperties['--mixin2'], url);
assert.include(e._customStyle.textContent, url);
});

test('variable mixins inherit and override', function() {
var e = styled.$.child;
assertComputed(e.$.mixin1, '1px');
Expand Down

0 comments on commit 4678a0b

Please sign in to comment.