Skip to content

Do not add units to css custom properties #9963

@TrySound

Description

@TrySound

Do you want to request a feature or report a bug?

bug

What is the current behavior?

<div style={{ '--value': 5 }}></div>

becomes

<div style="--value: 5px;"></div>

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar (template: https://jsfiddle.net/84v837e9/).

https://codepen.io/TrySound/pen/MojVOp

What is the expected behavior?

Leave values same as they are passed.

Which versions of React, and which browser / OS are affected by this issue? Did this work in previous versions of React?

React 15.6.0

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