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

🐛 Resolve components inside set #25

Merged
merged 2 commits into from
Sep 27, 2023

Conversation

oxalorg
Copy link
Member

@oxalorg oxalorg commented Sep 18, 2023

Component don't get resolved correctly when they are present inside of a set.

Thanks @gabriel376 for catching the bug.

For components like this:

(o/defstyled child-1 :div
  :bg-red-100
  ([]
   [:p "hello"]))

(o/defstyled child-2 :div
  :bg-blue-100
  ([]
   [:p "world"]))

This does not work.

(o/defstyled parent :div
  [#{child-1 child-2} :bg-green-100]
  ([]
   [:<>
    [child-1]
    [child-2]]))

This PR fixes that:

(o/css parent)
;; => ".poke__parent .poke__child_2,.poke__parent .poke__child_1{--gi-bg-opacity:1;background-color:rgba(220,252,231,var(--gi-bg-opacity))}"

@plexus plexus merged commit 775e620 into main Sep 27, 2023
3 checks passed
@plexus plexus deleted the ox/resolve-components-as-selectors-inside-a-set branch September 27, 2023 15:42
@plexus
Copy link
Member

plexus commented Sep 27, 2023

Released in v1.12.107

[com.lambdaisland/ornament "1.12.107"]                 ;; deps.edn
{com.lambdaisland/ornament {:mvn/version "1.12.107"}}  ;; project.clj

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

Successfully merging this pull request may close these issues.

2 participants