When a browser renders an HTML page, it applies basic styles before you’ve even written a single style.
While all browsers apply their basic styles, each browser has its specific styles different from other browsers, and that, of course, causes an inconsistency problem.
Which approaches do you use to tackle this problem?
Do you try to provide cross-browser consistency in the default styling by using some libraries like Normalize CSS?
Do you reset all the default browser styles completely using something like Reset CSS and then style everything from scratch?
Or do you write your own set of rules by using some kind of combination of rules from both approaches?
Top comments (5)
I am not even sure if not normalizing at all is safe in the latest browsers...
normalize.css
is more safe for Markdown as well, and I think it is much less invasive and opinionated than classless CSS.CSS resets might be better and smaller, as well as make CSS more manageable, if you don't work with Markdown.
I am currently not sure if I need normalize.css or CSS resets in shadow DOMs.
For simpler projects I always do simple resets like resetting padding, border, box-sizing before doing anything.. for more complex layouts I would mostly bring in some extended css reset rules ;)
I always aim to use the smallest CSS footprint I can. I only normalise delicately and minimally. Reset??!? ask Sugar Brown - Ain't nobody got time for that!
Each browser has it's own eco-system - and appearance, and quirks, and your users chose their (current!) browser (by accident, carefully, because they wanted a change, because it was mandated, for a (insert special reason) we cannot imagine...)
If you want your app/website/opinion to appeal to these different eco-systems of users, then let them have their bigger fonts, brighter colours, higher contrast, accessibility...
I used to be a detective in the Pixel Police, obsessed with single pixel alignment... and the mathematical relationships between colours - but I've learnt that change is inevitable, and trying to coerce the world into a single specific vision for all time is futile.
:) $0.02
Thanks for your insight, Vesa :)