Book Image

Learning less.js

Book Image

Learning less.js

Overview of this book

Table of Contents (22 chapters)
Learning Less.js
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Using CSS or JavaScript


If you've spent time using JavaScript (and more likely, jQuery), then you will know that we can use it to produce some complex animations. Achieving the same results in CSS might be a little bit of an eye-opener for some, but they may ask: which is better? If you thought CSS, then you'd be right…and wrong! Let me explain.

Conventional wisdom has always said that CSS is better—after all, JavaScript and jQuery use custom animation handlers that will repeat code between 30 and 60 times a second. This puts more pressure on a browser than a browser just running pure CSS.

However, lots of people have argued in favor of either; there are clear arguments for or against using either technology in a site. For example, in a post for the CSS-Tricks site, Jack Doyle (the creator of the professional animation library GSAP), puts forth a detailed case on why using CSS3 animations isn't always the right way forward; CSS3 still has a long way to go to match the likes of Flash.

The developer...