Adapt.js (Adaptive CSS)
Adapt.js serves CSS based on screen width.
It is a lightweight JavaScript file that determines which CSS file to load before the browser renders a page. If the browser tilts or resizes, Adapt.js simply checks its width, and serves only the CSS that is needed, when it is needed. .
Cost / License
- Free
- Open Source
Platforms
- Mac
- Windows
- Linux
- Online
- BSD
- JavaScript
Features
Tags
- Web Development
- adaptive-css
- Javascript Libraries
Adapt.js (Adaptive CSS) News & Activities
Recent activities
Adapt.js (Adaptive CSS) information
What is Adapt.js (Adaptive CSS)?
Adapt.js serves CSS based on screen width.
It is a lightweight JavaScript file that determines which CSS file to load before the browser renders a page. If the browser tilts or resizes, Adapt.js simply checks its width, and serves only the CSS that is needed, when it is needed.
A potential drawback of Adapt.js is the possibility of a brief flash of unstyled content as a new stylesheet is being fetched (think of it as “Ajax” for CSS). I have done my best to mitigate this by keeping CSS files small (3 KB). It is worth noting this is a proposed, not prescribed, approach to a problem with multiple solutions.