Giter VIP home page Giter VIP logo

Comments (5)

noprompt avatar noprompt commented on May 18, 2024

Good catch. I've been so focused on getting the compiler/code generation part off the ground I hadn't thought about how best to approach that. But I think it's something simple enough it could be added soon. In the mean time, the css macro will produce a string for you which could easily be dumped in a file.

I'll try to get this in to the beta version by the end of the week, if not it'll definitely be in 0.1.0 stable.

from garden.

erwagasore avatar erwagasore commented on May 18, 2024

I am trying to build a CSS Framework based on garden, at first I wanted to build my own css generation lib 'cause I wasn't satisfied buy neither gaka nor cssgen. Now that there is garden I don't need to create something else.

I am pretty new into clojure, I don't know good practices but I can contribute by dealing with small tasks if u r up to correct my mistakes along the way

from garden.

noprompt avatar noprompt commented on May 18, 2024

Sorry it's taken me a bit to get back to you on this issue. I've done a bit of thinking about it and my thoughts are this: having a save-css function, while nice, is out of the scope of this library. In the case of gaka it's really just a thin layer of sugar for calling css and saving the result to a file (which you still requires you to specify a path and isn't particularly unique behavior for any library). So unless there is a very strong use case beyond convenience, I'm going to avoid adding this to the library.

Since you're getting started with Clojure and I don't want to leave you out in the cold, you could try a variation on this:

(ns my-project.stylesheets)

(def stylesheets-dir "resources/public/stylesheets/")

(def screen
  (css 
    ; Rules
  ))

(defn- save-stylesheet
  [filename styles]
  (with-open [writer (clojure.java.io/writer (str stylesheets-dir filename)]
    (.write writer styles)))

(save-stylesheet "screen.css" screen-css)

This is pretty close to code I'm using right now to render and save my stylesheets to disk during development. If you're developing with an editor like Emacs or Vim that's able to communicate with nREPL, all it takes is loading the file to recompile the stylesheet(s). Of course, you may want to tweak this a bit if you want the stylesheets to be recompiled before deployment, etc.

I am trying to build a CSS Framework based on garden...

I'd love to see how that goes. Now that Garden has media query support it should be easier to make a really nice framework of some kind. Though it'd take an act of god, having something like Compass, Foundation, or Gumby(http://gumbyframework.com/) brought to the Garden world would be nothing short of awesome. There's a lot of awesome stuff to bring over like modular scale and grid systems.

Be sure to keep an eye on the library over the next few weeks though as I'm planning to have the library at 0.1.0-stable by or before June. Thanks again for the suggestion!

from garden.

noprompt avatar noprompt commented on May 18, 2024

@erwagasore So I'd like to apologize for my initial resistance to adding this feature to the library. It was added in d5da87d and will be available for use in 1.0.0.

Thanks again!

from garden.

erwagasore avatar erwagasore commented on May 18, 2024

I am glad you decided to add this feature.

Nice work man, keep it up.

Eugene R.

On Tue, Sep 17, 2013 at 10:16 AM, Joel Holdbrooks
[email protected]:

@erwagasore https://github.com/erwagasore So I'd like to apologize for
my initial resistance to adding this feature to the library. It was added
in d5da87d d5da87d9 and will
be available for use in 1.0.0.

Thanks again!


Reply to this email directly or view it on GitHubhttps://github.com//issues/1#issuecomment-24571040
.

from garden.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.