Skip to content

Instantly share code, notes, and snippets.

@v-dimitrov
Forked from yavorski/_normalize.sass
Last active December 24, 2015 23:49
Show Gist options
  • Save v-dimitrov/6883493 to your computer and use it in GitHub Desktop.
Save v-dimitrov/6883493 to your computer and use it in GitHub Desktop.
$base-font-size: 14px;
$base-font-family: sans-serif;
// *
// @extend %bs-border-box
// Prevent iOS text size adjust after orientation change, without disabling user zoom
html
height: 100%
font-size: 100%
-webkit-text-size-adjust: 100%
-ms-text-size-adjust: 100%
body
min-height: 100%
margin: 0
color: $base-color
background: #fff
// specify font-size and line-height from your project requirements
font: 400 $base-font-size $base-font-family
// Correct 'block' display not defined in IE 8/9.
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
main,
nav,
section,
summary
display: block
// Fallback for hidden="hidden" styling not present in IE 8/9 etc.
[hidden]
display: none
// all sort of content links
a
color: $link-color
text-decoration: none
&:hover, &:active
outline: 0
&:hover, &:focus
color: $link-color-hover
text-decoration: underline
&:focus
outline: thin dotted #333
outline: 5px auto -webkit-focus-ring-color
outline-offset: -2px
b, strong
font-weight: 700
small
font-size: 80%
sub, sup
position: relative
font-size: 75%
line-height: 0
vertical-align: baseline
sup
top: -0.5em
sub
bottom: -0.25em
hr
clear: both
height: 0
margin: 20px 0
border: 0
border-top: 1px solid #eee
img
display: inline-block
max-width: 100%
height: auto
border: 0
vertical-align: middle
p
margin: 0 0 10px
// headings
h1, .h1
margin: 0 0 20px
font: 400 38px $base-font-family
h2, .h2
margin: 0 0 20px
font: 400 32px $base-font-family
h3, .h3
margin: 0 0 20px
font: 400 24px $base-font-family
h4, .h4
margin: 0 0 10px
font: 400 18px $base-font-family
h5, .h5
margin: 0 0 10px
font: 400 14px $base-font-family
h6, .h6
margin: 0 0 10px
font: 400 12px $base-font-family
ul, ol
margin: 0
list-style: none
table
width: 100%
border-spacing: 0
border-collapse: collapse
background-color: transparent
td, th
text-align: left
vertical-align: top
// form elements defaults
input, button, select, textarea
margin: 0
font-size: 100%
line-height: inherit
font-family: inherit
button, input[type="button"], input[type="reset"], input[type="submit"]
cursor: pointer
-webkit-appearance: button
border: none
input[disabled], button[disabled]
cursor: default
opacity: .75
input[type="radio"], input[type="checkbox"]
@extend %bs-border-box
padding: 0
line-height: normal
&:focus
outline: thin dotted #333
outline: 5px auto -webkit-focus-ring-color
outline-offset: -2px
button::-moz-focus-inner,
input::-moz-focus-inner
padding: 0
border: 0
textarea
overflow: auto
vertical-align: top
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment