Skip to content

Class names are not escaped #589

@ktosiek

Description

@ktosiek

Passing a class name that contains "/" (or any character that is special in CSS) works in an unexpected way. This two classes won't match, even tough they are specified with the exact same string:

[ global
    [ Css.Global.class "my/class" [ color red ] ]
, div [ class "my/class" ] [ text "I should be red" ]
]

It seems that names passed into Css.Global.class are handled as raw CSS fragments, not actual class names.

Is there any way this could be fixed? I understand it would be a bit backwards-incompatible, as people might already escape the names (or even pass complex selectors to class).

I've prepared an Ellie with a working example. The counter should be centered, and should not have a dashed border: https://ellie-app.com/nFkBH6KXwLqa1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions