

CSS Mini Reset - vladocar
http://www.vcarrer.com/2010/05/css-mini-reset.html

======
chime
Interesting. I never knew I was doing CSS Reset all this time. I add this to
the top of most of my CSS files:

    
    
        body, html, form {
          margin:0;
          padding:0;
        }
        table {
          border-collapse:collapse;
        }
        a {
          text-decoration:none;
        }
    

There are a few more rules I add but they depend on each site of course.

~~~
baby
I don't use border-collapse (I don't even know what it is)

but i have those also :

    
    
      body{
        font-family:verdana;
        font-size:0.8em;
      }
    
      p,h1,h2,h3,h4{
        margin:0;
        padding:0;
        font-weight:normal;
      }
    
      ul{
        list-style:none;
        margin:0;
      }

~~~
sirn
> I don't use border-collapse (I don't even know what it is)

When two borders are stacked together, they will be collapsed into a single
border. Only works with tables though.

------
ugh
I have seen this now several times, why don’t those CSS resets use the
universal selector?

    
    
      * {margin:0;padding:0;}
    

works fine. You want to reset not only html and body but also your hn and p
elements, right? Isn’t that sort of the idea?

That one line is pretty much the only thing I do in the way of CSS reset and
it’s tremendously helpful. There will only be margin and padding if I
explicitly declare that I want it which in turn helps remove a lot of
margin:0; and padding:0; (which before, because of laziness, I often put in
just to be safe).

~~~
chime
My understanding is that * { anything } is a huge performance hit, especially
for rich UI apps.

~~~
ugh
Ah! That’s why. (Doesn’t matter for what I’m doing, though :)

------
ElbertF
I prefer to completely reset all default CSS rules and specify them manually.
Works great for me, I haven't noticed any drawbacks.

    
    
        * {
            background-color: transparent;
            border: none;
            border-spacing: 0;
            font-size: inherit;
            font-weight: inherit;
            font-family: inherit;
            line-height: 1.5em;
            list-style: none inside;
            margin: 0;
            padding: 0;
            text-align: inherit;
            text-decoration: none;
        }

~~~
kilian
Apart from form inputs getting really messed up, there's a 'massive' speed
penalty you incur by using the * selector to reset everything. Where massive
probably isn't large enough for most websites, so if it works, carry on :)

------
kilian
What this basically does is what you would do when starting without a CSS
reset: Just reset the elements while you're styling them. Elements that you
don't use don't get reset.

That's fine of course, but if you make a lot of websites then you really just
want a common stylesheet that does everything you might need, and go from
there. (I made sencss with that in mind: <http://sencss.kilianvalkhof.com> )

------
quizbiz
I use:

    
    
       <link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.8.1/build/reset/reset-min.css>

------
RyanMcGreal
This is the CSS reset I normally use:

    
    
        /* reset block elements */
        blockquote, dir, div, dl, form, h1, h2, h3, h4, h5, h6, hr, ol, p, pre, table, ul  { 
    	    margin: 0; 
    	    padding: 0; 
    	    font-size: 1em;
        }

------
baby
weird, I was expecting Eric Meyer to have a very beautiful CSS website since I
learned CSS with his books. I was disapoint.

~~~
pbhjpbhj
<http://meyerweb.com/eric/css/edge/complexspiral/demo.html>

I remember when that was the height of internet awesomeness!

