Adapt.js - Adaptive CSS Testsite

 
 
 
 

 
 

Configuration

For all possible optionsRead more

Adapt.js, accepts a few parameters: path is where your stylesheets reside, dynamic is a boolean (true or false) that says whether to watch the window for its resize event, also triggered by tablet or phone tilt. Widths and optional CSS files are specified in range. The defaults are shown in the adjacent code example. You can also specify an optional callback function, that will pass range index and width.


Open Source

Just like the 960 Grid System itself, Adapt.js is licensed under GPL and MIT. That means it is free, as in speech. If you want to use it in a product that is already licensed under the GPL, you can. Or, if you want to use it in a commercial product, you can choose the MIT license instead. No strings attached.

The code is available via GitHub.


Fallback

In the case of JavaScript being purposefully disabled or unavailable, stylesheet defaults can be served via <noscript>, which is perfectly valid in the <head> for HTML5. Taking a mobile first approach, I specified the mobile.css file, assuming devices without JS capabilities are likely to be less capable “feature” phones.

“It Depends”

As with any field in which technological methods are open for debate, there is the danger of religious fanaticism, where we each rally behind a respective technique and defend it vehemently. I would advise you to consider your audience, weigh the options, and find an approach that makes sense for that particular context.

Background

This whole browser resizing craze was started by none other than the inestimable Ethan Marcotte, when he wrote his seminal article for A List Apart, entitled Responsive Web Design. Since then, some have criticized @media queries as fool’s gold. Also worth reading are One Web and Toffee-Nosed, further defining responsiveness.


Licensed under GPL and MIT.

Powered by Adapt.js + 960.gs.   |   Repository at GitHub.

Custom grids via SprySoft.