Fork me on GitHub
#css
<
2016-06-02
>
cky14:06: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

cky14:06:24

How would you formulate a similar concept in Garden?

niamu15:06:16

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

niamu16:06: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”}]]])

cky16:06:35

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