When comparing Garden (Clojure) vs CSS-On-Diet, the Slant community recommends Garden (Clojure) for most people. In the question“What are the best CSS preprocessors/postprocessors?” Garden (Clojure) is ranked 9th while CSS-On-Diet is ranked 15th. The most important reason people chose Garden (Clojure) is:
With Garden, you have access to all the core features of a powerful programming language to build your scripts, including functions, variables, namespaces, and data manipulation like map merging or concatenation.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Style webpages with a full programming language
With Garden, you have access to all the core features of a powerful programming language to build your scripts, including functions, variables, namespaces, and data manipulation like map merging or concatenation.
Pro Full-stack Clojure with ClojureScript for front-end + Clojure for backend
Garden finishes the full Clojure stack experience — you can have the entire codebase in a single language with ClojureScript on the front-end, Clojure on the backend, and Garden for CSS.
Pro Hot loading
Using the core Garden auto loader or the excellent Garden Gnome plugin, watch your style changes take effect in the browser as soon as you save the code — no reload required.
Pro Styles as data-nesting are obvious
Clojure is a data-oriented programming language with strong emphasis on simple, clear inline data structures. Garden models styles using these same structures, making the cascade visually obvious.
Pro Clean syntax
Other options listed include various pain-points like use of @ symbols or too much cruft; because Garden is just Clojure, and Clojure is a very well-designed language aimed to emphasize simplicity and positive developer experience (without semantic whitespace problems), you have the full benefit of a well-designed and general-purpose syntax.
Pro CSS-engine accessible from front-end
Because Garden is also Clojurescript friendly, this means that you can dynamically effect styles based on app state.
Pro Fast to read and write CSS
Works like Emmet, shorting CSS keywords, but it's not limited only to writing. Also modifying and reading COD(CSS-On-Diet) files is faster.
Pro Easy to learn and use
Doesn't require programming skill to work with variables, mixins, media breakpoints
Cons
Con Harder to apply shared styles
Because you are working in Clojure, you can't just paste in raw css style snippets shared elsewhere.
Con It's difficult adjusting to different keywords
The keywords are shortened to 3 letters. For example, "background-color" becomes "bac" and "max-width" becomes "maw". These keywords are far less intuitive than their original form and make the CSS much less readable for those who don't know CSS-On-Diet.
Con Extremely limited adoption
CSS-On-Diet has just 7 stars on Github and a very small adoption rate. For an open source project this usually means less bugs reported, lesser documentation and few third-party learning resources.
