css

For all your CSS related content...
cky 2016-06-02T14:37:14.000026Z

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 2016-06-02T14:37:24.000027Z

How would you formulate a similar concept in Garden?

niamu 2016-06-02T15:44:16.000028Z

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

niamu 2016-06-02T16:14:47.000029Z

@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 2016-06-02T16:18:35.000032Z

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