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

Comments

@barneycarroll
Copy link
Member

@barneycarroll barneycarroll commented Jul 19, 2018

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

@barneycarroll barneycarroll commented Aug 7, 2018

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

@isiahmeadows isiahmeadows added this to Under consideration in Feature requests/Suggestions via automation Oct 28, 2018
@isiahmeadows isiahmeadows moved this from Under consideration to In discussion in Feature requests/Suggestions Oct 28, 2018
@isiahmeadows
Copy link
Member

@isiahmeadows isiahmeadows commented Oct 28, 2018

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

@isiahmeadows isiahmeadows moved this from In discussion to Planned in Feature requests/Suggestions Oct 28, 2018
@barneycarroll
Copy link
Member Author

@barneycarroll barneycarroll commented Oct 28, 2018

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

barneycarroll added a commit that referenced this issue Nov 22, 2018
@barneycarroll barneycarroll mentioned this issue Nov 22, 2018
3 of 11 tasks
Feature requests/Suggestions automation moved this from Planned/In Progress to Completed/Declined Nov 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants