Clojurians
# css

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

cky 17:37:14

I have a Sass->Garden conversion question. Sass supports doing something like body.firefox & { font-weight: normal; } to apply the given properties only if the current context is a descendent of body.firefox (so that you can toggle the firefox class in body to enable/disable those properties in a hurry): http://www.sass-lang.com/documentation/file.SASS_REFERENCE.html#parent-selector

cky 17:37:24

How would you formulate a similar concept in Garden?

niamu 18:44:16

@cky: That’s a really good question. I’ll have a look and see if I can work out how to do that.

niamu 19:14:47

@cky: So far the best I can do is the case where the parent element nests all of the children rules, much like their second case where they show an example with #main as the parent selector.

(css [:#main {:color “black”} [:a {:font-weight “bold"} [:&:hover {:color “red”}]]])

cky 19:18:35

:cry: Thanks for checking! Guess I'll stick with Sass until there's a way to do this.