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

Multiple CSS variables as inline style #312

Open
ArthurGoupil opened this issue Feb 1, 2024 · 0 comments
Open

Multiple CSS variables as inline style #312

ArthurGoupil opened this issue Feb 1, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@ArthurGoupil
Copy link

ArthurGoupil commented Feb 1, 2024

Hi !

I have an svg that takes variables as inline style as follow:

<svg
 style={{ height: size, width: size, fill: iconColor }}
/>

where each variable end up being a CSS variable.

The fill variable is well taken into consideration by jest-preview, but not the width/height 🤔 . When I hardcode values for height/width, it works.

I've checked and the CSS variable exist in the preview and follow the exact same structure than for fill.

Screenshots

Capture d’écran 2024-02-01 à 01 14 49

Reproduce

https://stackblitz.com/edit/jest-preview-yegte5?file=src%2FApp.tsx
The CSS variables on the test div are not taken into account

@ArthurGoupil ArthurGoupil added the bug Something isn't working label Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant