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

Limit injected SVG styles to user cascade origin #37

Merged
merged 3 commits into from Aug 11, 2021
Merged

Limit injected SVG styles to user cascade origin #37

merged 3 commits into from Aug 11, 2021

Conversation

ghost
Copy link

@ghost ghost commented Jul 26, 2021

Closes #36. CC @1904labs. Resolves downstream issue jeffersonlicet/snipped#5.

Using the unset and initial properties, we inject any user origin styles inline and reduce file sizes by up to 95%. We use intial on the container in order to inject all inherited styling.

@ghost
Copy link
Author

ghost commented Jul 31, 2021

@IDisposable @kitmenke I'd really like this released this week, could you review soon? 🙏🏾

@IDisposable IDisposable merged commit d11bd5a into 1904labs:master Aug 11, 2021
@ghost ghost deleted the perf-reduce-styles branch August 11, 2021 21:20
@ghost
Copy link
Author

ghost commented Aug 11, 2021

We getting a min.js soon?

@IDisposable
Copy link
Member

Officially released on NPM and updated here as v2.9.1

@ghost
Copy link
Author

ghost commented Aug 11, 2021

Nice, gonna be using it right away :)

@mohd-akram
Copy link

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.

@ghost
Copy link
Author

ghost commented Sep 25, 2021

Yes and it made loading the output SVGs 50 times faster :) I agree but don't know how

@ghost
Copy link
Author

ghost commented Sep 29, 2021

@mohd-akram this has been done for you and will ship soon enough.

@mohd-akram
Copy link

Thanks @sndst00m, sorry I didn't get time to look at the PR earlier. I'll try it out and see how it goes!

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

Successfully merging this pull request may close these issues.

Limit styles to non-default CSS
2 participants