Friday, December 15th, 2006
YUI: Reset The Browsers CSS
YUI has a CSS Reset set of style that aims to normalize the browsers so your CSS can start on an even playing field.
The entire CSS file (which you can see here) is just 30 simple lines of getting explicit.
Dean Edwards wants a <reset /> button :)












I want a element so that I can build widgets without cascaded CSS rules affecting the layout of my widget.
I raised this on the WHATWG mailing list — you never know your luck. ;-)
Bah! That should read: I want a <reset> element.
would a simple inherit CSS property do?
#mywidget { inherit: none ; }
or would people just find that confusing and get it mixed up with the inherit value?
I think this can be done in 2 lines of code. Somebody correct me if I’m wrong.
@carter - one of the suggestions to my proposal on the WHATWG list was very similar:
#widget{cascade:off;}
I don’t really mind how it is achieved but sometimes I *really* want to turn off CSS inheritance.
http://listserver.dreamhost.com/pipermail/whatwg-whatwg.org/2006-December/008777.html
You forgot to mention the nicely minimized 1 line version
reset-min.css
that’s included in the YUI download.
The big one is just so that we dev’s can see what went into it, eh?
I use this one for a while now and I like it very much,
the version reset-min is a nice one, small but usefull
Charlie, your 2 liner doesn’t do the same thing. For example, it breaks i, b and I’m sure other tags that are already cross-browser. The purpose of reset.css is to normalize browser differences, not make everything plain text.
Jack: Thanks. That helps clear it up.
should this be a simple solution usable with nested elements too ?