O'Reilly logo

Clojure Recipes by Julian Gamble

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

12. Reading the SASS DSL and Generating CSS with Clojure Zippers

There is a fantastic DSL for generating CSS called SASS. In general the SASS DSL is only available for Ruby programmers. In this chapter we’ll take some steps towards our own SASS DSL in Clojure.

Assumptions

In this chapter we assume that you are aware of CSS as it is used for laying out HTML pages in the browser.

Benefits

The benefit of this chapter is a richer understanding of how zippers can be used in parsing a DSL. In the future you can use this to build your own DSL.

Outline—Features of SASS

Tables 12.1 and 12.2 provide an example of what SASS can do.

Image

Table 12.1 Nesting ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required