83
rated 0 times
[
88]
[
5]
/ answers: 1 / hits: 22953
/ 12 Years ago, thu, october 11, 2012, 12:00:00
respond.js or css3-mediaqueries.js ?
The official documentation, especially that of css3-mediaqueries.js, is sparse. Reading on SO, forums and blogs I have summarized these pros and cons.
respond.js
Pros:
- More reliable (? recommended by Modernizr , Twitter Bootstrap 3 and H5BP )
- Lighter (4kb) and faster
- Interpret mediaquery in any context (
<link>
, inline CSS, @import-ed CSS)
Cons:
- Doesn't update on window resize
- Supports only
min-width
andmax-width
- Doesn't support
em
units (huge weak point!)
css3-mediaqueries.js
Pros:
- Reacts in real time (on resize too!)
- Supports
em
units (really? anyone tested it?)
Cons:
- Heavier (15kb) and slower
- Interpret only inline CSS with a explicitly declared media-type
- Lacks detailed documentation and the project seems abandoned
Does anyone have points to add to the list, or personal experiences to share, or a particular preference for one or the other script? If so, why?
More From » css