Docunext

  • About

Regex to Flatten CSS Files

February 28th, 2010

I'm using jEdit to flatten some CSS files.

I search for this: (;|{)\n and replace with this: $1  (note the extra space after the $1 substitution.

By "flat", I refer to this:

.widget { position:relative; overflow:hidden; width:100%; }

instead of this:

.widget {
  position:relative;
  overflow:hidden;
  width:100%;
}
Yearly Indexes: 2010 2003 2005 2006 2007 2008 2009 2004 2011 2012 2013 2015 2019 2020