OK–I have a HUGE css file, inherited from another designer. I’m in the process of cleaning it. One thing I need to do is add a space after colon for rules but not selectors. i.e.:
.selector:after {
foo: bar;
}
Where I’m adding a space after foo: but NOT after .selector (between selector: and after).
I’m assuming there’s an easier way to do this than find/replace and manually/visually skipping the selector colons, but any advice is appreciated.
Why creating a regular expression would work very well. I think the easiest and quickest way would be to simple use your IDE’s find and replace to add a space after each colon and then use find and replace again to remove the space from your pseudo classes. Since there are probably only around 8 different pseudo classes used it shouldn’t take to long to prform a find a replace on each.