-
Notifications
You must be signed in to change notification settings - Fork 289
feat: Parse light-dark() CSS function by extracting the first argument and add tests.
#992
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
base: main
Are you sure you want to change the base?
Conversation
…ent and add tests.
|
@Its-Just-Nans Can you review this PR? I came here to fix a bug from Zed. Thanks. |
Hi, Maybe you should add an option to Note that I'm not a maintainer of resvg, only a contributor so, this is just a suggestion, but maybe not the best idea Edit: there is the color-scheme css props that can be in usvg Options |
…ion and inherit it in nested SVGs.
Suggestion applied. |
|
In general, a low-level attribute parsing is done at the svgtypes level. It also has necessary parsing utilities to simplify Yes, it's technically not a "SVG type", but that's how But if it is too much work, you can just add |
…t-dark` resolution integration.
Submitted: linebender/svgtypes#59 |
|
Thanks for the PR. However, while this might work for those tests, I'm not sure whether this is the right approach unfortunately. Firstly, I think it's a bit too hacky that we resolve If I'm understanding correctly, we are also attempting to parse I think the proper approach would be to support parsing light-dark inside of |
Closes #900
Added support for the CSS
light-dark()function to handle SVGs exported from Draw.io with dark mode support. Previously, usvg failed to parselight-dark()and fell back to black, making text invisible on dark backgrounds.Already tested in Zed