7 ms·
There's something to be said for both methods. Multi-line CSS is easier to read/edit when you're actively building something because you are constantly movin
by raimondious 16y ago
There's something to be said for both methods.
Multi-line CSS is easier to read/edit when you're actively building something because you are constantly moving properties within and across selectors. You're not likely to need to search for a selector because you probably have most of it in your head since it's all been written recently. In other words, inserts have greater importance than reads.
When you're maintaining a site, single-line CSS may be best. You may have forgotten the lay of the CSS, so the structure of it should be understandable at a glance. This is enhanced by the readability of comments, which have more impact when you can see all the CSS they are referring to at once.
- potatolicious 16y agoThis almost calls for some kind of plugin/script that converts this. It'd be insane to have a keyboard shortcut that will take the current selector and single-line/multi-line it.
- sharkbrainguy 16y agocss-tidy does a few different formats. You could alias a couple of different sets of options to e.g. `css-compress` and `css-expand` and just pipe your buffer through them.
- JoelSutherland 16y agoHere is a tool that does just that. http://www.newmediacampaigns.com/page/single-line-vs-multi-line-css-a-tool-to-end-the-debate http://www.newmediacampaigns.com/page/single-line-vs-multi-l...