Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

226
Views
A simple way to remove newlines (line breaks) between CSS selectors

With gulp-beautify I'm optimizing files containing CSS for email, which means they can't have newlines between selectors, since there is a limit on the total number of lines allowed in some email clients. I've found Beautify has an option to add newlines between selectors, but it doesn't have a feature to remove them. If selector_separator_newline is false, it ignores newlines if present.

I'm building tasks for two outputs, minified, and beautified. Obviously, the minified version doesn't need this.

I could minify before I beautify, but that removes comments, and I need to preserve comments.

I could remove all new lines and then run Beautify, and I'm looking into doing that, but I feel like I'm missing something.

Is there a package, out-of-the-box, or otherwise simple way to remove all newlines / line breaks between selectors?

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!