background-size-polyfill icon indicating copy to clipboard operation
background-size-polyfill copied to clipboard

Background-size-polyfill doesn't work with pseudo elements :after and :before

Open meventi-stephan opened this issue 11 years ago • 3 comments

Background-size-polyfill doesn't work with pseudo elements :after and :before.

Here's an example:

div.test:after {
        background-image: url(test.jpg);
        background-repeat: no-repeat;
        background-position: center center;
    -webkit-background-size: contain;
        -moz-background-size: contain;
    -o-background-size: contain;
    background-size: contain;
    -ms-behavior: url(backgroundsize.min.htc);
    behavior: url(backgroundsize.min.htc);
}

meventi-stephan avatar Apr 18 '14 06:04 meventi-stephan

This would require some refactoring, as the polyfill currently sets styles on elements directly (which doesn't work for pseudo-elements).

jefferyto avatar May 14 '14 10:05 jefferyto

any news on this one? :)

vitorbal avatar Jul 29 '14 15:07 vitorbal

I'm also interested to hear if there's an update about this

mstorus avatar Aug 28 '14 00:08 mstorus