Skip to content

inject-global accepts functions? #73

Open
@teotenn

Description

@teotenn

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions