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

Streamed styles minification #72

Open
KoderFPV opened this issue Nov 17, 2024 · 2 comments
Open

Streamed styles minification #72

KoderFPV opened this issue Nov 17, 2024 · 2 comments

Comments

@KoderFPV
Copy link

Hi,

Can we somehow minify streamed styles using CleanCSS? I tried to pipe styles stream however, the writable stream does not support pipe method :)

@theKashey
Copy link
Owner

What do you want to achieve by minification?
CSS is produced in a the shortest way and represents all optimizations being applied during CSS generation.
The only difference - in dev mode it adds new line breaks - https://github.com/theKashey/used-styles/blob/master/src/parser/fromAst.ts#L7

Can you provide an example of a potential improvement?

@KoderFPV
Copy link
Author

@theKashey
On screenshot above is html with minified CSS via CleanCSS, and below is without modification
image

We do this in the standard rendering way:
image

We have quite a lot CSS :)

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

No branches or pull requests

2 participants