-
Notifications
You must be signed in to change notification settings - Fork 63
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
Support for CSS variables in styles
property
#163
Comments
Very interesting... h('div', {
styles: {
backgroundColor: 'var(--background-color, gray)'
}
}, []) DEMOhttps://stackblitz.com/edit/maquette-starter-b5kdg3?file=main.ts |
A long time ago, we made a style-applyer hook to allow adding vendor prefixes. It turns out you can use to apply styles in a way that is compatible with CSS variables:
We should add this to maquette though, but this means you do not have to wait for a new release Demohttps://stackblitz.com/edit/maquette-starter-b5kdg3?file=main.ts |
@Dyljyn can you confirm that the patch I just committed fixes your issue and CSS variables in general? I will make a new release if it does. |
Excellent! I can confirm that your latest commit resolves it 🎉 |
Release 3.4.0 contains the fix. |
Expected behavior
When providing a CSS variable through the
styles
property. It is added to thestyle
attribute of the tag.Should result in:
Current behavior
CSS variables get ignored and are not rendered.
Demo
https://stackblitz.com/edit/maquette-starter-j1rjrw?file=main.ts
The text was updated successfully, but these errors were encountered: