I'm pretty sure that my last bank holiday was ruined by Internet Explorer 8, and now that our clients have dropped that from their supported version list, its younger brother has stepped up to the plate to try to ruin this bank holiday for me.
A stylesheet which works fine on Firefox, Safari, and Chrome (and even works tolerably on IE8, incidentally), inexplicably fails to apply a huge number of styles on IE9. This is a delightful thing to find out essentially 1 working day before a planned release. We can of course go into some life lessons learnt, but they might come out a bit on the grim side (i.e. never trust anyone else to check anything, you will always have to fix everything yourself). So nuts to that. This is about technical lessons learned.
Here are some things I've found so far:
A stylesheet which works fine on Firefox, Safari, and Chrome (and even works tolerably on IE8, incidentally), inexplicably fails to apply a huge number of styles on IE9. This is a delightful thing to find out essentially 1 working day before a planned release. We can of course go into some life lessons learnt, but they might come out a bit on the grim side (i.e. never trust anyone else to check anything, you will always have to fix everything yourself). So nuts to that. This is about technical lessons learned.
Here are some things I've found so far:
- This project has some pretty terrible CSS, a product of stuff being layered on top of other stuff forever. Code decays, and CSS decays particularly fast, it seems. When you look at the code in a CSS3 Validator, the validator does not look kindly on it (115 errors, 341 warnings).
- Select2 has some pretty terrible CSS. Almost half of the errors come from the Select2 stylesheet.
- Opacity (filter: alpha) for IE <= 8 is not valid CSS3. If you're not supporting IE8, get rid of those filter rules.
- IE <= 9 has limits on how many CSS selectors you can have in a page. It's 4096. That might seem like a lot, but it's apparently the sort of thing complex projects can violate, especially if they use @extend and other sorts of thing. You can work out how many css selectors are on your page by loading it and then pasting in a bit of JS to the console. https://gist.github.com/krisbulman/0f5e27bba375b151515d - which suggests that this site has 2466 rules and 5451 selectors - meaning that IE will ignore the last 1355 styles!
- Something about SASS @extend seems to cause IE9 to choke on some files.
Hopefully while I'm on holiday our team abroad will hunt down the problem and solve it in one fell swoop. But if not, I may have to learn some more things.
Comments
Post a Comment