Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> And here’s some things you don’t need:

> reset.css

Wait, what? I was with him until that. Using a CSS reset is part of CSS 101, I would never dream of starting a project without one. It isn't a "complex dependency", it simplifies cross-browser issues greatly. Putting this on the list is simply... bizarre.



The problem with reset.css is that people often use reset files made by other people without understanding what they do. For example, lot's of people use https://github.com/necolas/normalize.css, without realising that it will turn off automatic text size adjustment on the iPhone. That's fine if you actually test on the iPhone and make a mobile specific stylesheet, but if you don't, this will make the experience worse for iPhone users.

So if you are going to use a reset.css file, you should do some research. Check on google what other people are writing about reset.css files, read comparisons of different reset.css files, test different reset.css files on different browsers, etc. But then you've wasted an afternoon NOT BUILDING YOUR PRODUCT.

If you just accept that your website is going to look slightly different in different browsers, you will realise that you don't need a reset.css file, and you will save a lot of time.


I've used a CSS reset in all my projects (both work and personal) for the last 7 years, and I agree that it's not mandatory for a successful product.

The CSS reset is a convenient tool for the visual layout only. It helps with browser consistency and prevents margin/padding/font-size issues mostly, but it won't turn your idea into a successful product. I think that's the only message the article meant to convey.


He says that you don't need that to make a successful webapp, which is true as you can make a successful one without it. I understand the post more in the line of focusing on whats important and not focusing that much in what is not.


Yup... just look at HN, no CSS resets going on here ;)


I have never used any reset.css file (I'm more of a backend developer), but I find this idea very interesting. Is this reset technique often used in modern web development ? Any feedback on this ?


"Professional" web developer here. Indeed the reset technique is used very often. Browsers often implement default margins and padding differently. A CSS reset can give you a more reasonable baseline to work with.


These browsers usually have reasons to have their own styles. Sometimes they are there to be consistent with the base OS (drop downs, buttons, etc) or they are there to best suit the format that the browser runs on small screen (phones), large screen (desktop) etc or to take care of device input types (touch screen devices would have larger buttons by default whereas pointing device doesn't need to have large buttons). I think it's best to let the browser decide what it wants to decide and build our app around browser differences instead of forcing our own design down browser's throat.


I think the problem is manly IE vs Chrome vs Firefox.. (and of course Opera). Example: Why would you want to have by default a padding of 10px in IE, a padding of 5px in Chrome, 7px in Firefox and 0px in Opera? Of course is easier to make a default for all those browsers to 0px or whatever you want.


Different browsers have different default values, a css reset is there to remove those inconsistencies allowing a fresh and sane starting point.

check this page for more info and an example of a css reset: http://meyerweb.com/eric/tools/css/reset/


Anytime someone uses Bootstrap then the css is reset




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: