Skip to content

Instantly share code, notes, and snippets.

@joshuapowell
Last active September 25, 2024 18:58
Show Gist options
  • Save joshuapowell/1680540 to your computer and use it in GitHub Desktop.
Save joshuapowell/1680540 to your computer and use it in GitHub Desktop.
LESS: Global LESS CSS reset that gives elements default formatting.
/**
* Global Reset of all HTML Elements
*
* Resetting all of our HTML Elements ensures a smoother
* visual transition between browsers. If you don't believe me,
* try temporarily commenting out this block of code, then go
* and look at Mozilla versus Safari, both good browsers with
* a good implementation of CSS. The thing is, all browser CSS
* defaults are different and at the end of the day if visual
* consistency is what we're shooting for, then we need to
* make sure we're resetting all spacing elements.
*
*/
html, body {
border: 0;
font-family: "Helvetica-Neue", "Helvetica", Arial, sans-serif;
line-height: 1.5;
margin: 0;
padding: 0;
}
div, span, object, iframe, img, table, caption, thead, tbody,
tfoot, tr, tr, td, article, aside, canvas, details, figure, hgroup, menu,
nav, footer, header, section, summary, mark, audio, video {
border: 0;
margin: 0;
padding: 0;
}
h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, address, cite, code,
del, dfn, em, ins, q, samp, small, strong, sub, sup, b, i, hr, dl, dt, dd,
ol, ul, li, fieldset, legend, label {
border: 0;
font-size: 100%;
vertical-align: baseline;
margin: 0;
padding: 0;
}
article, aside, canvas, figure, figure img, figcaption, hgroup,
footer, header, nav, section, audio, video {
display: block;
}
table {
border-collapse: separate;
border-spacing: 0;
caption, th, td {
text-align: left;
vertical-align: middle;
}
}
a img {
border: 0;
}
:focus {
outline: 0;
}
@justingreerbbi
Copy link

Awesome

@aditya-apps-foundry
Copy link

Thanks, that's awesome!

@sators
Copy link

sators commented May 12, 2015

Thanks sir!

@tdgm
Copy link

tdgm commented May 15, 2015

Thanks!

@brema
Copy link

brema commented Jun 6, 2015

Thank u

@BrandonClapp
Copy link

Awesome, thanks man.

@jensstalder
Copy link

Hihi – The only thing that requires less in this case is the table section. And it doesn't even make it much shorter ^^ .

@qhuang872
Copy link

This is awesome and make my life much easier! I really appreciate it!

@vikrantgujjar
Copy link

vikrantgujjar commented Apr 24, 2017

it removes li styling ... that's is unexpected i guess :) fix please

https://github.com/additiveinverse/normalize.less/blob/master/normalize.less <-----good option

@sukitfup
Copy link

Works perfect. Thanks.

@vasc1
Copy link

vasc1 commented Dec 16, 2020

NICE MAN!

@NeoYo
Copy link

NeoYo commented Oct 27, 2021

Thanks !

@chochinlu
Copy link

cit --> cite ?

@joshuapowell
Copy link
Author

Excellent catch @chochinlu!

I've updated the file to reflect that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment