CSS code formatting question: I have an old habit of adding a single space before the {
starts a new CSS rule, like this:
body {
font-size: 16px
}
the whitespaces like this one between body
and {
add up throughout the css.
Ideally, i'd prefer writing my rules like so (and thus saving whitespace):
body{
font-size: 16px
}
Actually, I forget why I do that?
Note that I intentionally simplified the example here to show the whitespace. Of course there is no need to remove the space here from the file. But in real life projects with 2-3,000 rules, it might add up. Also, i presume that a single whitespace at that position will compress badly compared to the situation where it is removed.
I have long forgotten why I add that odd whitespace. Is it safe to remove? Which browser needed the whitespaces?