3 ms·
> Putting everything in separate lines make the CSS file 10 times longer, and it's more difficult to see groups of rules that fit together along with their comm
by ebbv 10y ago
> Putting everything in separate lines make the CSS file 10 times longer, and it's more difficult to see groups of rules that fit together along with their common structure.
You block them together just like we do with code. Good code doesn't put multiple statements on a line, good CSS doesn't either. File length means nothing, if someone's looking for a specific class there are tools to do that, saving a few lines and making the CSS harder to read and edit isn't worth it.
The examples above are much more readable like this (margin added for illustration of grouping related properties):
.dtk-skin-dlg .yui-panel .hd {
font: 16px/1em Verdana, sans serif;
color: #ddd;
background: none;
padding: 10px 10px 0;
margin: auto;
}
Written that way, when someone finds that rule in the file they can easily parse the relevant property without having to scan a 200 character long line.