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.


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


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.


Table 12.1 Nesting ...

Get Clojure Recipes now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.