Open xcthulhu opened 8 years ago
@xcthulhu Let me think about this one.
It's nice to have, but not critical... in SASS since they aren't embedded in a real programming language they can't just quick things like:
(-> {:size "12pt"} (into (for [p user-select] [p "none"]))
On the other hand, the behavior as it is doesn't produce valid CSS:
(garden.core/css ["*" {[:padding-left :padding-right] "4pt"}])
;; => "* {\n [:padding-left :padding-right]: 4pt;\n}"
So, I know I'm a lowly internet rando, but I would suggest picking one of these options:
My 2¢
@xcthulhu I do like this idea. @priyatam What do you think?
A PR is nice to have :).
In general, I would be interested in ideas focused on improving core CSS standards compatibility, versus utilities.
@priyatam I'm not sure I want a PR just yet. I think the main thing I was interested in is whether or not you'd use a feature like this?
I won't use it, but I agree with @xcthulhu that we should have better error reporting if something is obviously incorrect—which is a larger issue, I think.
I'd use the feature I suppose, to be honest it's not a big deal.
I would point out you can't do such things when you are in a {:style {...}}
in for instance; it's probably for the best that the syntax for garden and hiccup stay exactly the same at this level as per the principle of least astonishment.
otoh i'm seeing sass libraries starting to downplay their support for vendor prefixing in favour of https://github.com/postcss/autoprefixer so if that's the only use case for this it might be less urgent?
It would convenient if vectors of keywords could be automatically expanded.
Here's what I have in mind:
This corresponds to a feature in SASS: https://github.com/sass/sass/issues/109