[ANN] Zengarden. A Clojure library for generating CSS

213 views
Skip to first unread message

Timothy Washington

unread,
Apr 10, 2014, 11:07:47 AM4/10/14
to clo...@googlegroups.com
Zengarden is a riff on Joel Holdbrooks' excellent garden library. Zengarden is a simple tool for generating CSS in Clojure. The goal is to cover most of CSS3. The spirit of the library is to have declarative syntax, and be controllable from edn. Github and Clojars resources are in the expected locations. 

This is an alpha release, so there's a lot of TODOs, and stuff that I haven't thought of. I've just built it for my own use case(s). When that happens, you can i) input raw CSS ii) send me feature requests or iii) send me a pull request. These are some things you get out of the box. 

I'm in the process of doing these other things. Pass in raw CSS, in lieu of.

Please note that.
  • Zengarden makes no attempt to validate your CSS. it just knows how to handle a string pattern
  • Ensure to escape all quotations in a string 
  • CSS Object Model (ex: CSSImportRule, CSSMediaRule) is not implemented. I'll wait until the need arises. 

These are some scss features that look interesting. 
  • variables 
  • partials
  • mixins
  • operators  
  • inheritance 
But as we are in Clojure, I don't want to pull in sass idioms wholesale. So I think garden has the right idea in that respect. 
  • garden declarations 
  • garden units 
  • garden color  
  • garden arithmetic 

I'll wait for the need to arise, before wasting too much time or energy in any direction. Feedback is welcome. 


Tim Washington 


Dave Sann

unread,
Apr 10, 2014, 9:09:21 PM4/10/14
to clo...@googlegroups.com
what is different from what Joel already did?

I think Joel was asking for input to help develop garden further it would be great to see efforts go into one thing - unless you have really divergent ideas....

Dave

Timothy Washington

unread,
Apr 10, 2014, 10:16:02 PM4/10/14
to clo...@googlegroups.com
I actually did take Joel up on his offer. But my feature requests are on the back burner for the moment. 

I happen to be building a product, that needs what Zengarden provides. Mainly authoring gnarly things like @import, @media queries, pseudo classes, etc, declaratively, from edn. That was the main impetus for this tool. I tried, and couldn't get that working with garden. You have to drop down to a repl to generate @import and @media queries. 

So while I personally need these things, I'm also happy to fold those features, back into garden. I'd actually prefer that, so we can have all of these features in one place. 


Tim Washington 

Dave Sann

unread,
Apr 11, 2014, 3:04:24 AM4/11/14
to clo...@googlegroups.com
ok, I understand now. thx D
Reply all
Reply to author
Forward
0 new messages