Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow CSS vars to be specified via style attribute #2192

Closed
barneycarroll opened this issue Jul 19, 2018 · 3 comments
Closed

Allow CSS vars to be specified via style attribute #2192

barneycarroll opened this issue Jul 19, 2018 · 3 comments
Labels
Type: Enhancement For any feature request or suggestion that isn't a bug fix

Comments

@barneycarroll
Copy link
Member

Steps to Reproduce

In this example

Expected Behavior

The first line of buttons should appear the same as the second.

Current Behavior

The first line of buttons do not have the CSS variable declarations applied, because CSS variables must be declared via setProperty

Possible Solution

Use the explicit style.getPropertyValue & style.setProperty APIs instead of treating style as a POJO to be assigned to

@barneycarroll
Copy link
Member Author

Was worried about the potential perf considerations of this but it turns out React implemented this a year ago and it improved perf

@dead-claudia dead-claudia added the Type: Enhancement For any feature request or suggestion that isn't a bug fix label Oct 28, 2018
@dead-claudia
Copy link
Member

@barneycarroll If that's the case, then let's do this.

@barneycarroll
Copy link
Member Author

Wilco, I'll get on it in a tick. This will make interoperability with framework agnostic CSS-in-JS patterns far more powerful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Enhancement For any feature request or suggestion that isn't a bug fix
Projects
Status: Completed/Declined
Development

No branches or pull requests

2 participants