Book Image

Designing Next Generation Web Projects with CSS3

By : Sandro Paganotti
Book Image

Designing Next Generation Web Projects with CSS3

By: Sandro Paganotti

Overview of this book

CSS3 unveils new possibilities for frontend web developers: things that would require JavaScript, such as animation and form validation, or even third party plugins, such as 3D transformations, are now accessible using this technology."Designing Next Generation Web Projects with CSS3" contains ten web projects fully developed using cutting edge CSS3 techniques. It also covers time saving implementation tips and tricks as well as fallback, polyfills, and graceful degradation approaches.This book draws a path through CSS3; it starts with projects using well supported features across web browsers and then it moves to more sophisticated techniques such as multi polyfill implementation and creating a zooming user interface with SVG and CSS. React to HTML5 form validation, target CSS rules to specific devices, trigger animations and behavior in response to user interaction, gain confidence with helpful tools like SASS, learn how to deal with old browsers and more."Designing Next Generation Web Projects with CSS3" is a helpful collection of techniques and good practices designed to help the implementation of CSS3 properties and features.
Table of Contents (17 chapters)
Designing Next Generation Web Projects with CSS3
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Taking advantage of Modernizr


We have already had a glimpse of Modernizr in the last chapter, it's a library that does plenty of things, some of which are listed as follows:

  • It adds support for new HTML5 tags in older browsers.

  • It exposes some methods in JavaScript allowing us to test for a certain CSS3/HTML5 feature. For example, Modernizr.multiplebg returns true or false depending on the support of multiple backgrounds.

  • It adds some classes to the <html> element reflecting the support of certain CSS3/HTML5 features. For example, <html class="multiplebg"> or <html class="no-multiplebg"> depending on the support of multiple backgrounds.

We have already added this library to our project. However, if not properly tuned, Modernizr performs all the tests to detect the supported features even if we're not going to use them. To enhance the performance of the library, we can select which tests we want it to perform.

To do that, we have to click on the download page of Modernizr (http...