Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Garden vector of selectors missing extra #3

Open
JohanCodinha opened this issue Oct 12, 2021 · 3 comments
Open

Garden vector of selectors missing extra #3

JohanCodinha opened this issue Oct 12, 2021 · 3 comments

Comments

@JohanCodinha
Copy link

(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

@plexus
Copy link
Member

plexus commented Oct 13, 2021

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.

@JohanCodinha
Copy link
Author

Thanks.
Just to clarify [:p :span {:color :blue}] is supposed to target both :p and :span and not a :span nestead in a :p

@plexus
Copy link
Member

plexus commented Oct 13, 2021

Thanks for clarifying, that does make me think we should address this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants