There are dozens of HTML5 and CSS 3 boilerplate code samples floating around the web — HTML5 Boilerplate is one popular example. But most of those projects start with a desktop-specific stylesheet, then add @media queries and styles for progressively smaller screens.
That’s backwards in our opinion. After all, the smaller the screen is, typically the simpler the stylesheet is, so why not start with the smallest screen and work your way up? That’s the thinking behind the new 320 and Up CSS 3 boilerplate from developer Andy Clarke.
Technically, 320 and Up is an extension of the HTML5 Boilerplate project, but it works just fine on its own as well.
No boilerplate is ever going to cover every use case, but 320 and Up does a nice job of hitting the sweet spot between too much and too little. Thanks to neatly divided CSS files it’s easy to take what you want from 320 and Up and leave the rest behind (though there is also an option for a single stylesheet if you prefer).
Fortunately for most websites that isn’t likely to be the case and 320 and Up makes a great starting point from which to build a site that looks good on any screen. 320 and Up is licensed under the Creative Commons MIT license. Grab a copy today.