Permalink
Browse files

Merge pull request #3 from justnorris/master

Added more options for Normalize
  • Loading branch information...
2 parents a7ef2df + 4249c2d commit 7ed5c3fa459650581a9a524cca4a19260770f51a Krister Kari committed Jan 14, 2013
Showing with 64 additions and 40 deletions.
  1. +64 −40 normalize.scss
View
@@ -1,12 +1,34 @@
// =============================================================================
// Normalize.scss settings
// =============================================================================
+// So since we're using Sass to compile our Normalize,
+// We can have some actual settings here, so we don't do more than we have to
+
// Set to false if you want to drop support for IE6 and IE7
// Notice: setting to false might render some elements
// slightly differently than when set to true
+$legacy_support_for_ie: true !default; // Used also in Compass
+
+
+// Set the default font family here so you don't have to override it later
+$normalized_font_family: sans-serif !default;
+
+$normalize_headings: true !default;
+
+$h1_font_size: 2em !default;
+$h2_font_size: 1.5em !default;
+$h3_font_size: 1.17em !default;
+$h4_font_size: 1em !default;
+$h5_font_size: 0.83em !default;
+$h6_font_size: 0.75em !default;
-$support-for-ie6-and-ie7: true;
+$h1_margin: 0.67em 0 !default;
+$h2_margin: 0.83em 0 !default;
+$h3_margin: 1em 0 !default;
+$h4_margin: 1.33em 0 !default;
+$h5_margin: 1.67em 0 !default;
+$h6_margin: 2.33em 0 !default;
// =============================================================================
// HTML5 display definitions
@@ -34,7 +56,7 @@ audio,
canvas,
video {
display: inline-block;
- @if $support-for-ie6-and-ie7 {
+ @if $legacy_support_for_ie {
*display: inline;
*zoom: 1;
}
@@ -65,7 +87,7 @@ audio:not([controls]) {
// www.456bereastreet.com/archive/201012/controlling_text_size_in_safari_for_ios_without_disabling_user_zoom/
html {
- @if $support-for-ie6-and-ie7 {
+ @if $legacy_support_for_ie {
font-size: 100%; // 1
}
-webkit-text-size-adjust: 100%; // 2
@@ -119,34 +141,36 @@ a {
// Addresses font sizes and margins set differently in IE6/7
// Addresses font sizes within 'section' and 'article' in FF4+, Chrome, S5
-h1 {
- font-size: 2em;
- margin: 0.67em 0;
-}
+@if $normalize_headings == true {
+ h1 {
+ font-size:$h1_font_size;
+ margin: $h1_margin;
+ }
-h2 {
- font-size: 1.5em;
- margin: 0.83em 0;
-}
+ h2 {
+ font-size:$h2_font_size;
+ margin: $h2_margin;
+ }
-h3 {
- font-size: 1.17em;
- margin: 1em 0;
-}
+ h3 {
+ font-size:$h3_font_size;
+ margin: $h3_margin;
+ }
-h4 {
- font-size: 1em;
- margin: 1.33em 0;
-}
+ h4 {
+ font-size:$h4_font_size;
+ margin: $h4_margin;
+ }
-h5 {
- font-size: 0.83em;
- margin: 1.67em 0;
-}
+ h5 {
+ font-size:$h5_font_size;
+ margin: $h5_margin;
+ }
-h6 {
- font-size: 0.75em;
- margin: 2.33em 0;
+ h6 {
+ font-size:$h6_font_size;
+ margin: $h6_margin;
+ }
}
// Addresses styling not present in IE7/8/9, S5, Chrome
@@ -162,7 +186,7 @@ strong {
font-weight: bold;
}
-@if $support-for-ie6-and-ie7 {
+@if $legacy_support_for_ie {
blockquote {
margin: 1em 40px;
}
@@ -182,7 +206,7 @@ mark {
}
// Addresses margins set differently in IE6/7
-@if $support-for-ie6-and-ie7 {
+@if $legacy_support_for_ie {
p,
pre {
margin: 1em 0;
@@ -197,7 +221,7 @@ code,
kbd,
samp {
font-family: monospace, serif;
- @if $support-for-ie6-and-ie7 {
+ @if $legacy_support_for_ie {
_font-family: 'courier new', monospace;
}
font-size: 1em;
@@ -215,7 +239,7 @@ pre {
// 2. Addresses quote property not supported in S4
// 1
-@if $support-for-ie6-and-ie7 {
+@if $legacy_support_for_ie {
q {
quotes: none;
}
@@ -257,7 +281,7 @@ sub {
// =============================================================================
// Addresses margins set differently in IE6/7
-@if $support-for-ie6-and-ie7 {
+@if $legacy_support_for_ie {
dl,
menu,
ol,
@@ -266,14 +290,14 @@ sub {
}
}
-@if $support-for-ie6-and-ie7 {
+@if $legacy_support_for_ie {
dd {
margin: 0 0 0 40px;
}
}
// Addresses paddings set differently in IE6/7
-@if $support-for-ie6-and-ie7 {
+@if $legacy_support_for_ie {
menu,
ol,
ul {
@@ -287,7 +311,7 @@ nav {
ul,
ol {
list-style: none;
- @if $support-for-ie6-and-ie7 {
+ @if $legacy_support_for_ie {
list-style-image: none;
}
}
@@ -303,7 +327,7 @@ nav {
img {
border: 0; // 1
- @if $support-for-ie6-and-ie7 {
+ @if $legacy_support_for_ie {
-ms-interpolation-mode: bicubic; // 2
}
}
@@ -329,7 +353,7 @@ figure {
// =============================================================================
// Corrects margin displayed oddly in IE6/7
-@if $support-for-ie6-and-ie7 {
+@if $legacy_support_for_ie {
form {
margin: 0;
}
@@ -351,7 +375,7 @@ legend {
border: 0; // 1
padding: 0;
white-space: normal; // 2
- @if $support-for-ie6-and-ie7 {
+ @if $legacy_support_for_ie {
*margin-left: -7px; // 3
}
}
@@ -367,7 +391,7 @@ textarea {
font-size: 100%; // 1
margin: 0; // 2
vertical-align: baseline; // 3
- @if $support-for-ie6-and-ie7 {
+ @if $legacy_support_for_ie {
*vertical-align: middle; // 3
}
}
@@ -393,7 +417,7 @@ input[type="reset"],
input[type="submit"] {
-webkit-appearance: button; // 2
cursor: pointer; // 3
- @if $support-for-ie6-and-ie7 {
+ @if $legacy_support_for_ie {
*overflow: visible; // 4
}
}
@@ -414,7 +438,7 @@ input[type="checkbox"],
input[type="radio"] {
box-sizing: border-box; // 1
padding: 0; // 2
- @if $support-for-ie6-and-ie7 {
+ @if $legacy_support_for_ie {
*height: 13px; // 3
*width: 13px; // 3
}

0 comments on commit 7ed5c3f

Please sign in to comment.