louisremi / background-size-polyfill

Adds support for background-size "cover" and "contain" to IE8
http://louisremi.github.com/background-size-polyfill/
MIT License
1.26k stars 359 forks source link

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

Open meventi-stephan opened 10 years ago

meventi-stephan commented 10 years ago

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);
}
jefferyto commented 10 years ago

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

vitorbal commented 10 years ago

any news on this one? :)

mstorus commented 10 years ago

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