Last active
August 29, 2015 14:07
-
-
Save jmwhittaker/627cfbd6beab79ca22e0 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.4.4) | |
// Compass (v1.0.1) | |
// ---- | |
$small6: 6; | |
$small7: 7; | |
$small8: 8; | |
$small9: 9; | |
$medium: 10; | |
$medium1: 11; | |
$medium2: 12; | |
$medium3: 13; | |
$medium4: 14; | |
$medium5: 15; | |
$medium6: 16; | |
$medium7: 17; | |
$medium8: 18; | |
$medium9: 19; | |
$large: 20; | |
$large1: 21; | |
$large2: 22; | |
$large3: 23; | |
$large4: 24; | |
$large5: 25; | |
$large6: 26; | |
$large7: 27; | |
$large8: 28; | |
$large9: 29; | |
$extraLarge: 30; | |
$extraLarge1: 31; | |
$extraLarge2: 32; | |
$sizing: s6 $small6, | |
s7 $small7, | |
s8 $small8, | |
s9 $small9, | |
m $medium, | |
m1 $medium1, | |
m2 $medium2, | |
m3 $medium3, | |
m4 $medium4, | |
m5 $medium5, | |
m6 $medium6, | |
m7 $medium7, | |
m8 $medium8, | |
m9 $medium9, | |
l $large, | |
l1 $large1, | |
l2 $large2, | |
l3 $large3, | |
l4 $large4, | |
l5 $large5, | |
l6 $large6, | |
l7 $large7, | |
l8 $large8, | |
l9 $large9, | |
xl $extraLarge, | |
xl1 $extraLarge1, | |
xl2 $extraLarge2; | |
/* Calculate rem values from base font size */ | |
@function calculateRem($size, $baseValue: 14) { | |
$remSize: $size / $baseValue; | |
@return #{$remSize}rem; | |
} | |
/* Fonts */ | |
@each $sizingClass, $size in $sizing { | |
%u-text--#{$sizingClass} { | |
font-size: #{$size}px !important; | |
} | |
%u-text-base--#{$sizingClass} { | |
font-size: calculateRem($size) !important; | |
} | |
}; | |
/* Padding */ | |
@each $sizingClass, $size in $sizing { | |
%u-padding-V--#{$sizingClass} { | |
padding-top: #{$size}px !important; padding-bottom: #{$size}px !important; | |
} | |
%u-padding-H--#{$sizingClass} { | |
padding-left: #{$size}px !important; padding-right: #{$size}px !important; | |
} | |
%u-padding-T--#{$sizingClass} { | |
padding-top: #{$size}px !important; | |
} | |
%u-padding-B--#{$sizingClass} { | |
padding-bottom: #{$size}px !important; | |
} | |
%u-padding-L--#{$sizingClass} { | |
padding-left: #{$size}px !important; | |
} | |
%u-padding-R--#{$sizingClass} { | |
padding-right: #{$size}px !important; | |
} | |
} | |
/* Only create classes that are currently needed */ | |
.u-text--m { @extend %u-text--m; } | |
.u-text--m2 { @extend %u-text--m2; } | |
.u-text--m4 { @extend %u-text--m4; } | |
.u-text--m6 { @extend %u-text--m6; } | |
.u-text--l1 { @extend %u-text--l1; } | |
.u-text-base--m { @extend %u-text-base--m; } | |
.u-text-base--m2 { @extend %u-text-base--m2; } | |
.u-text-base--m4 { @extend %u-text-base--m4; } | |
.u-text-base--m6 { @extend %u-text-base--m6; } | |
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
/* Calculate rem values from base font size */ | |
/* Fonts */ | |
.u-text--m { | |
font-size: 10px !important; | |
} | |
.u-text-base--m { | |
font-size: 0.71429rem !important; | |
} | |
.u-text--m2 { | |
font-size: 12px !important; | |
} | |
.u-text-base--m2 { | |
font-size: 0.85714rem !important; | |
} | |
.u-text--m4 { | |
font-size: 14px !important; | |
} | |
.u-text-base--m4 { | |
font-size: 1rem !important; | |
} | |
.u-text--m6 { | |
font-size: 16px !important; | |
} | |
.u-text-base--m6 { | |
font-size: 1.14286rem !important; | |
} | |
.u-text--l1 { | |
font-size: 21px !important; | |
} | |
/* Padding */ | |
/* Only create classes that are currently needed */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment