-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
multiple values px / generator #38
Comments
How about : (defn padding
[t r b l]
{:padding [[(px t) (px r) (px b) (px l)]]}) Or you could probably make it unit agnostic. |
So the value of |
Well I guess the reason is there need to be some syntax to differentiate between the various CSS form you can find. See more details here. In the {:-moz-linear-gradient ["top" ["#a90329" (percent 0)] ...]} |
@ccfontes Yes, it does look strange but that was the best idea I had when coming up with a way to represent the difference between comma and space separated lists. If you want you can write a function or macro to clean that up. (defmacro defproperty [name]
`(defn ~name [& params#]
{'~name [params#]}))
(defproperty padding)
(padding [0 1] [2 3])
;; => {padding [([0 1] [2 3])]} Edit: Paste fail |
Nah.. it's awesome! |
Thanks! |
How do I write a generator like:
or a property with multiple
px
values like::padding "5px 0px 5px 50px"
any way more idiomatic than this?
The text was updated successfully, but these errors were encountered: