This post goal is to answer these two questions:
=> What’s the difference?
=> Why do you pick one instead of the other?
1. The difference
Yes, there are two different things, thus comparing them may not be the best post I could write on Saturday morning. However, my motivation came from the fact that I couldn’t explain clearly when Jeff Kreeftmeijer asked me the same question last week(I am really bad with explaining). So yea, I am gonna write the difference real clear here. When I say “real clear”, I mean real easy to understand with no fancy words involved.
So in plain words, Modernizr detects cool features from the awesome HTML5 & CSS3 specifications. It tells you whether a browser has those features natively implemented or not. That’s it.
It doesn’t fix anything – but it gives you the ability to unuglify the ugliness of old browsers.
While CSS3PIE makes “Internet Explorer 6-8 capable of rendering several of the most useful CSS3 decoration features”. Yep, a fancy line to describe “hacking”.
2. So, which one I should use?
Uhm… It’s up to your client really. I think most web developers will definitely go for Modernizr, since we are allergic to hacking (right?). However let’s make this post a bit entertaining – by creating two hypothetical clients.
Client A = Awesomeness = MODERNIZR!!
- - Clean code is important
- - Focus on the effectiveness
- - I want something that is ready for the future
- - Don’t sweat the small stuff, the site doesn’t have to look the same everywhere; Just make sure it looks decent & works perfect
- - No, I won’t die if the border radius or box shadow don’t show up on old browsers
Client B = Bawls = CSS3PIE
- - I don’t do no coding. Just make it work.
- - Effectiveness of the site? well – the border radius will show up right?
- - Future? what future?! just give me that goddamnboxshadow!
- - I want the site to look exactly the same EVERYWHERE. Just put extra lines of code, use tons of images and divs, kill baby cats – whatever!
In conclusion,
Personally, I would suggest everyone to stop hacking and start accepting that you cannot make a layout looks the same everywhere. Developers understand this issue, however the most important task is to educate and convince the client to invest their money to something that is long term. Yes, I am talking about transforming client B to A. Good luck with that.
FYI: This doesn’t mean that I dislike &/or against CSS3PIE at all. I really thank them for their service. I would rather use CSS3PIE than having to slice tons of images or kill baby cats. So yea…CSS3PIE, you’re AWESOME!