✨ Now with maintenance! ✨
Keith Clark was eaten alive by sabre-tooth rattlesnakes or something. Who knows?
Good on him for originally inventing this though. 🍻
Why completely turn your back on it? I'm not saying give it special attention (unless you're making a website for the most populated country in the world), but why not toss some polyfills in conditional comments and at least give the poor bastards who are stuck on IE6-IE8 something to look at.
It requires almost 0 effort on your part and can make your website viewable to a lot of people.
Selectivizr is a polyfill that makes IE6-8 work with most CSS3 selectors (like :nth-child
).
bower install --save selectivizr2
To use the library, you'll need to include the latest jQuery 1.x.x.
Then add the following conditional comment after your stylesheets and jQuery:
<!--[if lt IE 9]>
<script src="selectivizr2.js"></script>
<![endif]-->
<!doctype html>
<html>
<head>
<title>Selectivizr Test</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div>Hello World</div>
<script src="https://code.jquery.com/jquery-1.12.3.min.js"></script>
<!--[if lt IE 9]>
<script src="selectivizr2.js"></script>
<![endif]-->
</body>
</html>
div:nth-of-type(1) {
background: blue;
}
That's it. That's how polyfills typically work. Load the .js and bam!
The only people downloading this file will be people below IE9. This means we're not punishing people using modern browsers.
- Use a Virtual Machine
- Learn how to install and setup VMs with VirtualBox. It's cross-platform and there are probably lots of YouTube videos on it so grab a ☕ and enjoy.
- Microsoft offers Windows images specifically so you can try out old browsers.
- IEVMS is the incredibly easy way to get/maintain these VMs.
- BrowserStack is expensive and slow, but if you can't figure out the other techniques you can use it. I highly suggest you figure out how to use VMs though. It's a skill worth learning.
I'm not even sure how to test in IE6 anymore, but... seriously?
bower install selectivizr
installs Selectivizr 1.0.2. 1.0.2 sucks and doesn't work with a bunch of other tools like the wonderful calc-polyfill.- https://github.com/keithclark/selectivizr is unmaintained.
- https://github.com/Mediamoose/selectivizr has issues closed and is broken on Bower.
- https://github.com/shinnn/lt-ie-9 is unmaintained and does more than just Selectivizr anyway.
bower install selectivizr-latest
was what this project was until I decided to actually maintain it.
TBH, I'm not an amazing JS developer yet, so I really have no idea wtf is going on. I'm happy to merge stuff as long as it seems legit but I'm probably not going to spend a ton of time working on this codebase.