Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

10. Pro HTML5 Application Hacks with Nod... > Hack 89. Set Up Expressive, Dynamic,...

Hack 89. Set Up Expressive, Dynamic, Robust CSS with Stylus

Stylus makes CSS for your Express application easier to write and maintain.

As mentioned earlier, Stylus is a dynamic metalanguage that compiles to CSS.

The feature set for Stylus is exhaustive, so we will have to pick and choose the best for the scope of the following hacks. This is not Grandma’s CSS; Stylus provides a slew of support to the laborious task of writing CSS selectors. Again, a metalanguage like Stylus will always be optional, but the benefits will be apparent once you dive in.

First, let’s add the Stylus module to our current application. In this hack we will simply include Stylus and compile a .styl file to .css.

var express = require

  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free 10-Day Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint