Outside, didn't read yet. Does minification include summering? Like if a child has an attribute that it actually doesn't need because it will inherit anyway since it is on the parent too, we can remove that attribute and save a line. Does it make sense?
Parcel CSS: A new CSS parser, compiler, and minifier
91–100 of 129 posts
Re: Parcel CSS: A new CSS parser, compiler, and minifier
#92Re: Parcel CSS: A new CSS parser, compiler, and minifier
#93Earlier quoted context omitted.
Oh my ... Does one need all of that? Isn't there a process of reducing it to only what one needs? I think there was something like that in the past. Not sure how well that works.
> Isn't there a process of reducing it to only what one needs? Yes there is: https://github.com/uncss/uncss https://github.com/purifycss/purifycss
Re: Parcel CSS: A new CSS parser, compiler, and minifier
#94Earlier quoted context omitted.
> Webpack is a "legacy" bundler How did you end up with this assessment? I'm not a fan either, but it's still very popular, I doubt it will go away in the next 5 years.
It won't go away, it will still be supported and used for many years, but majority of new projects today won't use it. Brief history: Rollup dramatically improved bundler plugin and ES modules situation, then came new super fast bundlers like Esbuild and finally solutions combining both like Vite. Webpack is still playing catch up with that. There is literally zero reasons to choose clunky, slow Webpack configs, whil…
What about module federation? Has any other bundler implemented that?
Re: Parcel CSS: A new CSS parser, compiler, and minifier
#95Fantastic work, I believe cssparser could benefit from Parcel CSS if they contributed back.
Re: Parcel CSS: A new CSS parser, compiler, and minifier
#96"Parcel CSS is based on the cssparser Rust crate, a browser-grade CSS tokenizer created by Mozilla and used in Firefox." Fantastic work, I believe cssparser could benefit from Parcel CSS if they contributed back.
Re: Parcel CSS: A new CSS parser, compiler, and minifier
#97Re: Parcel CSS: A new CSS parser, compiler, and minifier
#98When a site's CSS is well written, with a capable web developer knowing, what they are doing, such a tool would not be necessary. People pump out megabytes of JavaScript, but then they worry about a few kilobytes of CSS being saved by compressing it, at the same time making it less readable by minifying it. (We are not yet shipping hundreds of kilobytes of CSS, are we?!) When there is a need for a tool that minifies…
This is not a good argument, because no matter how well you write anything, reducing its size is beneficial for everyone.
Re: Parcel CSS: A new CSS parser, compiler, and minifier
#99Earlier quoted context omitted.
It won't go away, it will still be supported and used for many years, but majority of new projects today won't use it. Brief history: Rollup dramatically improved bundler plugin and ES modules situation, then came new super fast bundlers like Esbuild and finally solutions combining both like Vite. Webpack is still playing catch up with that. There is literally zero reasons to choose clunky, slow Webpack configs, whil…
> literally zero reasons What about module federation? Has any other bundler implemented that?
Re: Parcel CSS: A new CSS parser, compiler, and minifier
#100Earlier quoted context omitted.
From the Parcel CSS page : it does 'tree shaking', which automatically eliminates unused code. Not details on what that implies, though. Tools like PurgeCSS (used by Tailwind pre-v3) comb through the HTML for matching selectors, but I'm not sure if Parcel does the same thing. Anyway, as others comments said, these kind of tools nowadays are more 'transformers' than mere 'minifiers'.
That's really nice, but to me still sounds like the wrong way to go. Instead of reducing something that is too much, that which is too much should not have been added in the first place. We are doing work here, removing, what we have previously added. I wonder how much ineffective styling still remains after "tree shaking". I guess the fancy tree shaking is out of luck, if we add unnecessary styling to elements, whic…
The problem is, with CSS you don't know if you've added too much. As the project evolves, and code and styles change there's literally no way of knowing if a certain CSS rule is still in use Well, except regexp'ing the whole project looking for matches.