Skip to content

[cssom] "Serialize a CSS declaration" does not properly serialize property names with special characters #12792

@luizgfranca

Description

@luizgfranca

On https://drafts.csswg.org/cssom/#serialize-a-css-declaration the property name string is appended directly onto the final string, but this behavior would break the redefinition of the same style with e.style = e.style.cssText when there are custom properties with special characters.

This is demonstrated by the WPT test: https://wpt.fyi/results/css/cssom/variable-names.html, from which the current specified behavior seems to disagree.

Should we maybe apply the algorithm from https://www.w3.org/TR/cssom-1/#serialize-an-identifier to the property name?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions