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

Comments

2 participants
@barneycarroll
Copy link
Member

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

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link
Collaborator

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

This comment has been minimized.

Copy link
Member

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 referenced this issue Nov 22, 2018

Merged

Fix #2192 #2308

3 of 11 tasks complete

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