Comments (5)
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.
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.
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.
@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.
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)
- defcssfn don't behave as documented HOT 2
- Incorrect CSS emitted for inner media queries HOT 6
- Link broken for Tutorial and example in Wiki HOT 6
- how to supply the value to grid-template-area? in css it is multiple strings... HOT 3
- Changelog since 1.3.6 HOT 1
- Property order is different in output CSS, renders incorrectly in browser HOT 7
- `as-hex` taking into account Alpha value
- No `fr` unit
- Question about defining multiple style maps HOT 6
- Add support for container queries HOT 3
- Incorrect CSS emitted for "&" parent selector
- defcssfn is not defined in cljs or cljc
- `ClassNotFoundException` thrown when running tests on Java 11
- Warning about `garden.color/abs` shadowing `clojure.core` output when using Clojure 1.11.0 HOT 1
- `::marker` pseudo element isn't supported HOT 2
- Release request, to prevent repeated shadowed-var warnings in the REPL HOT 13
- Incorrect handling of selectors HOT 1
- Incorrect css generation HOT 1
- content: " " produces wrong output HOT 5
- Feature request: Support for cascade layers HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from garden.