Reputation: 326
In latest Chromium 37 I didn't succeed in using :before
and :after
on custom elements. Everything works in other browsers with Polymer Platform polyfill, but in Chromium with native support it doesn't.
Styling like this:
my-element:before {
background : #000;
content : '';
display : block;
height : 10px;
width : 10px;
}
What did I missed here?
Upvotes: 1
Views: 330
Reputation: 24109
Your example works for me in Chrome 38: http://jsbin.com/lanatuhojowu/1/edit
Note: :host::before
and :host::after
not working is a bug in Chrome 37 (crbug.com/393509). This should hopefully make it out in the next version of Chrome (38), and is definitely in Chrome 39.
Upvotes: 3