Minimizing CSS with keyboard shortcuts
Hi. Is it possible to minimize CSS file using built-in PhpStorm tools? I would like to push Ctrl+A then push some keyboard shortcuts get compressed CSS, such us https://csscompressor.com/
请先登录再写评论。
Hi. Is it possible to minimize CSS file using built-in PhpStorm tools? I would like to push Ctrl+A then push some keyboard shortcuts get compressed CSS, such us https://csscompressor.com/
请先登录再写评论。
Hi there,
To minify a selection? Nope, unless done via custom plugin.
You can minify whole file though (or multiple files / folder) using External Tools (on demand) or File Watcher (sort of automatic External Tools).
Thanks for the answer. It is a pity that there is no built-in utility for CSS compression. It would be very useful
>It is a pity that there is no built-in utility for CSS compression. It would be very useful
You can use ANY minifier you want and not be limited to some particular built-in one. Just setup your workflow pipeline/tools because ideally you want to have some toolchain where you click "build" and it will run all needed commands to compile/minify/combine/etc whole JS/CSS/Images for you.
I'm using node-sass for writing my CSS, it minifies it for me when stranspilling SCSS into CSS (I do not need any separate tools for that step; although separate minifier may provide more compact result).
I do it the same way, but it's not always fast. I thought there was a simpler solution. A solution that does not require initialization and do settings