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

inject-global accepts functions? #73

Open
teotenn opened this issue Aug 21, 2024 · 0 comments
Open

inject-global accepts functions? #73

teotenn opened this issue Aug 21, 2024 · 0 comments

Comments

@teotenn
Copy link

teotenn commented Aug 21, 2024

Is there a possibility to apply a function to generate the hash map with styles into inject-global?

For example

(defn head-css [s w]
  {:font-family (css-fonts :header)
   :font-size (str s "rem")
   :font-weight (* w 100)})

(inject-global
 {
  :h1 (head-css 2 9)
  :h2 (head-css 1.8 8)
 })

Does not work. Or am I missing some other function/macro that can help me modify styles with a similar approach?

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

1 participant