nazar-pc
nazar-pc

Reputation: 326

Custom elements and :before :after

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

Answers (1)

ebidel
ebidel

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

Related Questions