ornament
ornament copied to clipboard
Garden vector of selectors missing extra
(o/defstyled Test :div {:color :red} [:p :span {:color :blue}])
expand to this css string => .ns__Test{color:red}.ns__Test p{color:blue}
expected is => .ns__Test{color:red}.ns__Test p span{color:blue}
Here's the Garden rule doc
Thanks for the report. This is indeed a difference with Garden that we should document. We recommend using [:p [:span {:color :blue}]]
since that makes the nesting explicit.
I'll leave the issue open because we may still decide to support this down the road, but it leads to ambiguity, we'd need to guess if the second keyword is a CSS selector or a Girouette class.
It does raise a good point though that we should at error or at least warn when using a Girouette class that is not recognized, instead of quietly not emitting anything.
Thanks. Just to clarify [:p :span {:color :blue}] is supposed to target both :p and :span and not a :span nestead in a :p
Thanks for clarifying, that does make me think we should address this.
For "or" selectors we have for some time supported sets.
[#{:p :span} {:color "blue"}]