Skip to content

Support for CSS custom properties #129

Closed
elm/virtual-dom
#127
@johanalkstal

Description

@johanalkstal

CSS has Custom Properties which can be used both in a CSS file as well as an inline style.
A custom property has the following signature: --*.

This does not appear to be supported by Html.Attributes.style?

I'm using the following code,

applyTheme theme =
    style
        [ ( "--theme-primary-color", theme.primaryColor )
        , ( "--theme-secondary-color", theme.secondaryColor )
        ]

applied like div [ applyTheme theme ] [].

This produces no style attribute on the element. Other CSS properties do.

Would it be possible to add support for this?

https://www.w3.org/TR/css-variables/

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