victorporof / Sublime-HTMLPrettify

HTML, CSS, JavaScript, JSON, React/JSX and Vue code formatter for Sublime Text 2 and 3 via node.js
https://github.com/victorporof/Sublime-HTMLPrettify
1.93k stars 259 forks source link

Add support for minification #242

Open TidyWorks opened 9 years ago

TidyWorks commented 9 years ago

Would anyone be able to tell me how you add single line css formatting into the plugin? the rest of it works great, this one issue is holding me back. Cheers

*remove line breaks at the end of each rule

victorporof commented 9 years ago

What do you mean by that? Does simply selecting the line and formatting it work?

TidyWorks commented 9 years ago

Hi Victor,

For example h1, h2, h3, h4, p, a, li, input, label { padding: $site-pad2 0; font-size: 14px; color: $site-color1; letter-spacing: 0; line-height: 1.3; } to h1, h2, h3, h4, p, a, li, input, label {padding: $site-pad2 0; font-size: 14px; color: $site-color1; letter-spacing: 0; line-height: 1.3;}

Apologies if I'm missing something!

victorporof commented 9 years ago

That's minifying, not prettifying. Not supported by this plugin, but would be a great addition.

TidyWorks commented 9 years ago

Ok, thanks for the quick response. I would use minifying, but still like indented formatting and spaced layout with single line. Unfortunately it's the way I work which doesn't work well with collogues.