Skip to content

[css-properties-values-api] Interaction with setProperty is unfortunate. #880

@emilio

Description

@emilio

The reasoning for that is intentional apparently:

#778 (comment)

But I think it's still weird that:

let div = document.createElement("div");
div.style.setProperty("--foo", "bar");

Behaves differently to:

let div = document.createElement("div");
div.setAttribute("style", "--foo: bar");

Is this behavior up-for-discussion? I think it is really unfortunate.

cc @andruud @tabatkins

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions