3 ms·
I'd never thought of it that way. However, for me, input, select { background: white; border: none; float: left; font-s
by beaumartinez 15y ago
I'd never thought of it that way. However, for me,
input,
select {
background: white;
border: none;
float: left;
font-size: 14px;
margin: 0;
padding: 5px;
width: 400px;
}
Is more readable—each rule and selector on its own line. I am biased as I use Vim and half-page scroll lots, and like an 80-character maximum, though.
- bbx 15y agoI started writing CSS just like that. It makes reading properties easy but takes a lot of vertical space (and unlike you, I hate to scroll). So I write properties on one line, which makes reading selectors easy (example: http://jgthms.com/wings.css http://jgthms.com/wings.css). I compensate by ordering my properties alphabetically so I can scan horizontally to find any property (background and border come first, margin and padding are near the middle, text-transform and width are near the end...).
- MindTwister 15y ago> I compensate by ordering my properties alphabetically so I can scan horizontally to find any property (background and border come first, margin and padding are near the middle, text-transform and width are near the end...). Not a bad idea... I'm stealing it.
- prawn 15y agoI put "more likely to cause layout trouble" bits closer to the front where they'll be spotted more quickly. e.g., float, border, width, etc.