-
Notifications
You must be signed in to change notification settings - Fork 111
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
Limit injected SVG styles to user cascade origin #37
Conversation
@IDisposable @kitmenke I'd really like this released this week, could you review soon? 🙏🏾 |
We getting a min.js soon? |
Officially released on NPM and updated here as v2.9.1 |
Nice, gonna be using it right away :) |
This change made producing an image 4 times slower in my case. It should be optimized or, at the very least, should not be used for non-SVG output where it makes no difference in size. |
Yes and it made loading the output SVGs 50 times faster :) I agree but don't know how |
@mohd-akram this has been done for you and will ship soon enough. |
Thanks @sndst00m, sorry I didn't get time to look at the PR earlier. I'll try it out and see how it goes! |
Closes #36. CC @1904labs. Resolves downstream issue jeffersonlicet/snipped#5.
Using the
unset
andinitial
properties, we inject any user origin styles inline and reduce file sizes by up to 95%. We useintial
on the container in order to inject all inherited styling.