Skip to content
This repository has been archived by the owner on Mar 11, 2022. It is now read-only.

Calc polyfill don't work in Media queries #23

Closed
catherinelamonde opened this issue Dec 6, 2015 · 3 comments
Closed

Calc polyfill don't work in Media queries #23

catherinelamonde opened this issue Dec 6, 2015 · 3 comments

Comments

@catherinelamonde
Copy link

Hello,
You said : «With some polyfills (like the ones included in Boy) Lost works perfect in IE8 as well.»
I just tested Lost with Boy in IE8 using Browserstack.

  • Media queries work well
  • Media queries on pseudo-classes with Selectivizr work well
  • Calc polyfill not in Media queries work well
    but...
  • Calc polyfill in Media queries do NOT work

In Calc polyfill documentation they say : «However the polyfill uses window.matchMedia to test for media queries. If you wish to add support for media queries for IE8 include a polyfill before the calc-polyfill.»
Yet I see that you already include matchMedia() polyfill in lt-ie-9.min.js.
Do you have the solution?
Here's my test : http://catherinelamonde.com/boy/

.element {
background-color: green;
width: calc(99.99% * 1/4 - (30px - 30px * 1/4)); // work
}
@media (min-width: 1100px) {
section:nth-of-type(1) {
color: black;
}
.element {
background-color: blue;
width: calc(99.99% * 1/4 - (30px - 30px * 1/4)); // do not work
}
}

@corysimmons
Copy link
Owner

Really busy now but in January I plan to do a complete overhaul with tons of testing to Boy.

@catherinelamonde
Copy link
Author

Thank you! Let me know when it's fixed. :)

@corysimmons
Copy link
Owner

Holy crap I actually wasn't terribly far off my prediction of when I'd do stuff.

Anyway, I just overhauled Boy. It uses https://github.com/corysimmons/ie-love which is a combination of polyfills.

I've actually been testing this exact thing all night and I just can't get calc-polyfill to respond to media queries in any way, shape, or form. I think what he's trying to imply is "calc-polyfill doesn't support responsiveness, but if you want to add it in, I've added a way to do it".

If you don't mind, could you raise this issue over there? I've pestered the crap out of that guy about how to use his polyfill. I'm sure he's getting sick of me. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants