Created
October 2, 2014 18:42
-
-
Save alienresident/0136d79e0b51adaddffd to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.14) | |
// Compass (v1.0.1) | |
// ---- | |
////////////////////////////// | |
// DEFAULT VARIABLES | |
////////////////////////////// | |
$body-font-family: Calibri, 'Helvetica Neue', Arial, sans-serif; | |
$header-font-family: $body-font-family; | |
@mixin bold-italic-uppercase-variant($bold :default, $italic: false, $uppercase: false, $variant: false) { | |
@if $bold { font-weight: bold; } @else { font-weight: normal; } | |
@if $italic { font-style: italic; } | |
@if $uppercase { text-transform: uppercase; } | |
@if $variant { font-variant: small-caps; } | |
} | |
@mixin type-size($size, $leading: false) { | |
font-size: $size; | |
@if $leading { line-height: $leading; } | |
} | |
@mixin margin-padding($type, $amount: false, $side: false) { | |
@if $side { | |
#{$type}-#{$side}: $amount; | |
} @else { | |
#{$type}: $amount; | |
} | |
} | |
@mixin border-outline($type: border, $width: 1px, $style: solid, $color: #333, $offset: false) { | |
@include border-outline-check($type, $width, $style, $color, $offset); | |
@if $width == 'none' { | |
#{$type}: $width; | |
} @else if $width == false { | |
} @else { | |
#{$type}: { | |
width: $width; | |
style: $style; | |
color: $color; | |
@if $type == 'outline' and $offset { | |
offset: $offset; | |
} | |
} | |
} | |
} | |
@mixin border-outline-check($type, $width, $style, $color, $offset) { | |
@if $type == 'border' and $offset { | |
@warn "#{$type} does not use offset"; | |
} | |
@if $type == 'outline' { // wish this was cleaner! there's probably a better way to do this. | |
$widths: length($width); | |
$styles: length($style); | |
$colors: length($color); | |
$offsets: length($offset); | |
@if $widths > 1 or $styles > 1 or $colors > 1 or $offsets > 1 { | |
@warn "You cannot use mulitple values for #{$type} - only the first value will be used!"; | |
} | |
} | |
} | |
/// Headers | |
//// h1 | |
$h1-font-bold: false !default; // normal | |
$h1-font-italic: false !default; // normal | |
$h1-font-uppercase: false !default; // normal | |
$h1-font-variant: false !default; // normal | |
$h1-font-size: 2.5em !default; | |
$h1-line-height: 1.125em !default; | |
$h1-padding: 1em !default; | |
$h1-padding-pos: top !default; | |
$h1-margin: 0.3em !default; | |
$h1-margin-pos: bottom !default; | |
$h1-color: #444 !default; | |
$h1-border-width: 0 0 0.2em 0 !default; | |
$h1-border-style: solid !default; | |
$h1-border-color: #693 !default; | |
//// h2 | |
$h2-font-bold: false !default; // normal | |
$h2-font-italic: false !default; // normal | |
$h2-font-uppercase: false !default; // normal | |
$h2-font-variant: false !default; // normal | |
$h2-font-size: 1.875em !default; | |
$h2-line-height: 1.5em !default; | |
$h2-padding: 0.8333em !default; | |
$h2-padding-pos: top !default; | |
$h2-margin: 0.7em !default; | |
$h2-margin-pos: bottom !default; | |
$h2-color: #555 !default; | |
$h2-border-width: 0 0 0.13333em 0 !default; | |
$h2-border-style: solid !default; | |
$h2-border-color: #693 !default; | |
//// h3 | |
$h3-font-bold: false !default; // normal | |
$h3-font-italic: false !default; // normal | |
$h3-font-uppercase: false !default; // normal | |
$h3-font-variant: false !default; // normal | |
$h3-font-size: 1.5625em !default; | |
$h3-line-height: 1.4em !default; | |
$h3-padding: 1em !default; | |
$h3-padding-pos: top !default; | |
$h3-margin: 0.7em !default; | |
$h3-margin-pos: bottom !default; | |
$h3-color: #666 !default; | |
$h3-border-width: 0 0 0.1em 0 !default; | |
$h3-border-style: solid !default; | |
$h3-border-color: #693 !default; | |
//// h4 | |
$h4-font-bold: false !default; // normal | |
$h4-font-italic: false !default; // normal | |
$h4-font-uppercase: false !default; // normal | |
$h4-font-variant: false !default; // normal | |
$h4-font-size: 1.25em !default; | |
$h4-line-height: 1.5em !default; | |
$h4-padding: 1em !default; | |
$h4-padding-pos: top !default; | |
$h4-margin: 1em !default; | |
$h4-margin-pos: bottom !default; | |
$h4-color: #777 !default; | |
$h4-border-width: false !default; | |
$h4-border-style: solid !default; | |
$h4-border-color: #693 !default; | |
//// h5 | |
$h5-font-bold: false !default; // normal | |
$h5-font-italic: false !default; // normal | |
$h5-font-uppercase: false !default; // normal | |
$h5-font-variant: false !default; // normal | |
$h5-font-size: 1.125em !default; | |
$h5-line-height: 1.6667em !default; | |
$h5-padding: 1.1111em !default; | |
$h5-padding-pos: top !default; | |
$h5-margin: 0 !default; | |
$h5-margin-pos: false !default; | |
$h5-color: #888 !default; | |
$h5-border-width: false !default; | |
$h5-border-style: solid !default; | |
$h5-border-color: #693 !default; | |
//// h6 | |
$h6-font-bold: false !default; // normal | |
$h6-font-italic: false !default; // normal | |
$h6-font-uppercase: false !default; // normal | |
$h6-font-variant: false !default; // normal | |
$h6-font-size: inherit !default; | |
$h6-line-height: inherit !default; | |
$h6-padding: 1em !default; | |
$h6-padding-pos: top !default; | |
$h6-margin: 0 !default; | |
$h6-margin-pos: false !default; | |
$h6-color: #999 !default; | |
$h6-border-width: false !default; | |
$h6-border-style: solid !default; | |
$h6-border-color: #693 !default; | |
////////////////////////////// | |
// EXTENDABLES: For Base styles | |
////////////////////////////// | |
%h1 { | |
font-family: $header-font-family; | |
@include bold-italic-uppercase-variant($h1-font-bold, $h1-font-italic, $h1-font-uppercase, $h1-font-variant); | |
@include type-size($h1-font-size, $h1-line-height); | |
@include margin-padding(padding, $h1-padding, $h1-padding-pos); | |
@include margin-padding(margin, $h1-margin, $h1-margin-pos); | |
color: $h1-color; | |
@include border-outline(border, $h1-border-width, $h1-border-style, $h1-border-color); | |
} | |
%h2 { | |
font-family: $header-font-family; | |
@include bold-italic-uppercase-variant($h2-font-bold, $h2-font-italic, $h2-font-uppercase, $h2-font-variant); | |
@include type-size($h2-font-size, $h2-line-height); | |
@include margin-padding(padding, $h2-padding, $h2-padding-pos); | |
@include margin-padding(margin, $h2-margin, $h2-margin-pos); | |
color: $h2-color; | |
@include border-outline(border, $h2-border-width, $h2-border-style, $h2-border-color); | |
} | |
%h3 { | |
font-family: $header-font-family; | |
@include bold-italic-uppercase-variant($h3-font-bold, $h3-font-italic, $h3-font-uppercase, $h3-font-variant); | |
@include type-size($h3-font-size, $h3-line-height); | |
@include margin-padding(padding, $h3-padding, $h3-padding-pos); | |
@include margin-padding(margin, $h3-margin, $h3-margin-pos); | |
color: $h3-color; | |
@include border-outline(border, $h3-border-width, $h3-border-style, $h3-border-color); | |
} | |
%h4 { | |
font-family: $header-font-family; | |
@include bold-italic-uppercase-variant($h4-font-bold, $h4-font-italic, $h4-font-uppercase, $h4-font-variant); | |
@include type-size($h4-font-size, $h4-line-height); | |
@include margin-padding(padding, $h4-padding, $h4-padding-pos); | |
@include margin-padding(margin, $h4-margin, $h4-margin-pos); | |
color: $h4-color; | |
@include border-outline(border, $h4-border-width, $h4-border-style, $h4-border-color); | |
} | |
%h5 { | |
font-family: $header-font-family; | |
@include bold-italic-uppercase-variant($h5-font-bold, $h5-font-italic, $h5-font-uppercase, $h5-font-variant); | |
@include type-size($h5-font-size, $h5-line-height); | |
@include margin-padding(padding, $h5-padding, $h5-padding-pos); | |
@include margin-padding(margin, $h5-margin, $h5-margin-pos); | |
color: $h5-color; | |
@include border-outline(border, $h5-border-width, $h5-border-style, $h5-border-color); | |
} | |
%h6 { | |
font-family: $header-font-family; | |
@include bold-italic-uppercase-variant($h6-font-bold, $h6-font-italic, $h6-font-uppercase, $h6-font-variant); | |
@include type-size($h6-font-size, $h6-line-height); | |
@include margin-padding(padding, $h6-padding, $h6-padding-pos); | |
@include margin-padding(margin, $h6-margin, $h6-margin-pos); | |
color: $h6-color; | |
@include border-outline(border, $h6-border-width, $h6-border-style, $h6-border-color); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment