Enrolled to Infinite Learning

Showing posts with label css reset. Show all posts
Showing posts with label css reset. Show all posts

Sunday, 28 June 2015

Should I use CSS Reset?

The goal of a reset stylesheet is to reduce browser inconsistencies in things like default line heights, margins and font sizes of headings, and so on.

The question of which CSS Reset to use is one that developers and designers spend far too much time worrying about. In this article, I’ll cover two important points that can hopefully offer a little insight into the thought process: 

Firstly, to simplify and clarify what exactly we need from a good CSS Reset (and what we don’t!)
Second – and more importantly – to persuade people to stop just using the same, unmodified CSS Reset that came with their framework, without giving any thought to it.

When you include a CSS Reset in your stylesheet, you’re actually asking the browser to do an awful lot of work, in that you’re applying a CSS style to every single element on the page. This is totally fine, as long as you know what you’re doing (in any case, it’s only older browsers that will struggle with this.) Then, after zero-ing out every element’s default browser style, we go on to restyle them with fairly complex CSS rules. Not highly optimised, but it works.

The issue is that many people just stuff in any old CSS Reset without modification, which must be avoided.

Eric Meyer, when he pioneered the technique of CSS Reset (Eric Meyer’s Reset CSS), explicitly stated that:
The reset styles given here are intentionally very generic. I don’t particularly recommend that you just use this in its unaltered state in your own projects. It should be tweaked, edited, extended, and otherwise tuned to match your specific reset baseline. Fill in your preferred colors for the page, links, and so on.
With this, he persuades developers to build on top of his Reset stylesheet, to hack it, tweak it, make it their own, and then (possibly) republish it.

Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to to, let us concentrate rather on explaining to human beings what we want a computer to do.
--Donald Knuth

Categories

Agile (1) Angular JS (2) CSS (1) css reset (1) Grunt (1) Jasmine (1) Karma (1) Scrum (1) setup (1) Sprint (1) test cases (1) Typescript (1) UI Automation (1) Webstorm (1)
Disclaimer

The information and images of this blog are sometimes referred from various websites and blogs across the web to provide the best possible content to the reader. The information furnished hereby cannot be used for legal purposes. I will not be liable to you (whether under the law of contact, the law of torts or otherwise) in relation to the contents of, or use of, or otherwise in connection with, this website.