3 ms·
I'm surprised by the lack of spaces in, say, .error{ color:red; } I much prefer .error { color: red; } or .error { color: red; } (The latter i
by mhartl 15y ago
I'm surprised by the lack of spaces in, say,
.error{ color:red; }
I much prefer
.error { color: red; }
or
.error {
color: red;
}
(The latter is particularly nice because it implicitly acknowledges the likelihood that additional rules will be added.)
I don't recall seeing the space-compressed version much in the old days. Is it a new trend? I don't like it.
- jastuk 15y agoPersonally, I prefer the non-spaced variant when dealing with one-lined css. Simply because grouping it visually in chunks makes it easier for me to skim through code. Here I can recognize 4 chunks almost immediately: .error{ width:350px; height:200px; color:red; background:blue; } While here everything gets mixed up due to its uniformed spacing: .error { width: 350px; height: 200px; color: red; background: blue; }
- jacobr 15y agoI don't understand how anyone using version control can use one liner CSS. There is code folding in all decent text editors.