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

SVG doesn't support CSS classes (the image is black) #1217

Open
RedStoneCats101 opened this issue Oct 1, 2021 · 3 comments
Open

SVG doesn't support CSS classes (the image is black) #1217

RedStoneCats101 opened this issue Oct 1, 2021 · 3 comments
Assignees

Comments

@RedStoneCats101
Copy link

RedStoneCats101 commented Oct 1, 2021

.svg is drawn incorrectly, IntelliJ displays it properly, .png works fine (Mac OS intel)

kotlin("jvm") version "1.5.31"
id("org.jetbrains.compose") version "1.0.0-alpha4-build366"

svg
<style>.cls-1{fill:url(#linear-gradient);}.cls-2{fill:#fff;}.cls-3{fill:none;}</style>

bug
image
image

@igordmn
Copy link
Collaborator

igordmn commented Oct 1, 2021

Yeah, it is the known bug in Skia.

It doesn't support CSS classes at the moment.

Workaround is to inject all CSS classes into style attributes.

@igordmn igordmn changed the title .svg SVG doesn't support CSS classes (the image is black) Oct 1, 2021
@igordmn igordmn self-assigned this Oct 1, 2021
@RedStoneCats101
Copy link
Author

ok thanks

@RedStoneCats101
Copy link
Author

Exporting using inline styling worked for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants