Skip to content

Allow custom var setting/reading#27145

Closed
dvoytenko wants to merge 2 commits intoampproject:masterfrom
dvoytenko:runtime/style-custom-vars
Closed

Allow custom var setting/reading#27145
dvoytenko wants to merge 2 commits intoampproject:masterfrom
dvoytenko:runtime/style-custom-vars

Conversation

@dvoytenko
Copy link
Copy Markdown
Contributor

No description provided.

@dvoytenko
Copy link
Copy Markdown
Contributor Author

Heads up: I'm expecting a fair amount of tests to fail - the tests that use "fake" element mocks. I will fix them all.

@dvoytenko
Copy link
Copy Markdown
Contributor Author

So, tests worked as intended and I realized that style[x] =y and style.setProperty(x, y) are not equivalent in one important aspect. Style accessor accepts dashed and camel-case property names. I.e. both style['background-color'] and style['backgroundColor'] are ok. The setProperty('backgroundColor') however is not ok. In our code we by far prefer and use camel-case names. Thus this transition is harder to achieve.

@dreamofabear
Copy link
Copy Markdown

Ah, good find.

@dvoytenko
Copy link
Copy Markdown
Contributor Author

Unfortunately have to close this per the issue described above.

@dvoytenko dvoytenko closed this Mar 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants