12 ms·
I've worked on many different codebases. CSS and script tags add to the mess something awful. For cleaning CSS I take an existing site open with developer conso
by megamindbrian 9y ago
I've worked on many different codebases. CSS and script tags add to the mess something awful. For cleaning CSS I take an existing site open with developer console and click through every HTML element in the tree looking for alignments offsets, centering madness before flexbox, font size and color corrections are all stripped away. These settings belong in the top level body or global part of the CSS. I flatten out the HTML and CSS alike so all my elements are at most 4 levels deep.
This is a process that takes about 1 day per product page. It's a horrible pain to clean up a site but the payoff is easier maintenance in the future and hopefully some acknowledgement that the page loads better. This skill can easily be trained in to developers. I hope this reminds everyone that computing is a skill that must be practiced.
It isn't normal to use tables for layout these days, just like it is no longer normal to use JavaScript for centering elements vertically. This is fixed with flexbox. Please learn and use it!
- jacobr 9y agoTry doing this in a team of 5-500 developers continously adding features all over the site. Then try adding an isolated component in a sidebar somewhere with 0% risk of visual regression elsewhere.