csscss-variablesreagenthiccup

What's the syntax for passing a CSS custom property in reagent?


How do I create this HTML in Reagent/hiccup?

<span style="--custom-property: value"></span>

Both Hiccup and Reagent fail to document how to pass CSS custom properties.


Solution

  • [:span {:style {"--custom-property" "value"}}]
    

    Reagent's docs: https://github.com/reagent-project/reagent/blob/master/doc/UsingHiccupToDescribeHTML.md#css-custom-properties-styntax