Hacker News new | ask | show | jobs
by Theodores 2880 days ago
As of 2018 there is no neat helpful way of resolving white space problems that I know of in Chrome devtools. I wish there was as I can remember trying to get the white space removed from a search box and the search submit button, almost getting into the realms of hacky negative margin things before the penny dropped that it was the white space problem that I had known since the IE6 days.

If using code to generate HTML then you can remove white space with Google's mod_pagespeed. This will only remove a certain amount and what remains either 'doesn't matter' or is something that needs fixing in templates.

I doubt there is a performance penalty for excessive white space but it is satisfying to be able to 'view source' for the document to be pretty printed with the exception of indentation. In my opinion source documents should be neat, otherwise might aw well just give up on HTML and go for some byte code HEX digit stream in a non-human-readable format.