by tomfakes · 15y ago · 0 comments
.foo { x: y; a: b }
.bar { m: n }
.baz { background: blah blah url(xyz.png) top left;
x: y; i: j; }
instead of the more commonly seen: .foo {
x: y;
a: b;
}
.bar {
m: n
}
.baz {
background: blah blah url(xyz.png) top left;
x: y;
i: j;
}
My format takes up less vertical space in the editor. Sometimes, I can get my entire CSS file into a single page on the screen, reducing the amount of time I spend scrolling and searching. I do split lines when they go off the edge of the space, as seen in the .baz example.My screen is wide, my editor is wide, my code is fairly wide, but the standard format for CSS is really narrow. Every time I see the vertical format in my editor, easily 80% of the window space is completely empty, and otherwise useless, and 80% of the CSS is not on the screen and I have to page up and down, or search, to find stuff.
This is a workflow optimization that works for me. It might work for others too.
Most of the command-line diff tools don't highlight changes within a single line, and annotation tools usually work on a per-line basis as well.