React: Do not add units to css custom properties

Created on 14 Jun 2017  ·  6Comments  ·  Source: facebook/react

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

Bug

Most helpful comment

Would you like to send a fix? We still have some time before cutting 15.6.1.

All 6 comments

Would you like to send a fix? We still have some time before cutting 15.6.1.

Sure.

We're looking to cut it at most tomorrow so please let us know if you can't finish it today, and we'll try to fix it.

I'm working on it right now. Will fix today.

Thanks!

Should be fixed in 15.6.1. Please verify.

Was this page helpful?
0 / 5 - 0 ratings