1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

base, functions, helpers, settings

This commit is contained in:
Antoine Boulanger
2014-09-30 11:39:26 -04:00
parent 18c438d65f
commit 09bee42a42
7 changed files with 108 additions and 25 deletions

View File

@@ -7,6 +7,7 @@
$font-size: 16px; $font-size: 16px;
$line-height: 1.4; $line-height: 1.4;
$font-family: sans-serif; $font-family: sans-serif;
$color: #222;
$heading-1: 32px; // .alpha $heading-1: 32px; // .alpha
$heading-2: 24px; // .beta $heading-2: 24px; // .beta
@@ -54,4 +55,6 @@ $to-laptop: $from-laptop - 1;
$from-wide: 1680px; $from-wide: 1680px;
$to-wide: $from-wide - 1; $to-wide: $from-wide - 1;
/* Transitions
========================================================================== */
$speed: 0.3s;

View File

@@ -0,0 +1,33 @@
*, *:before, *:after {
box-sizing: inherit;
}
html {
box-sizing: border-box;
font-size : $font-size;
font-family : $font-family;
line-height : $line-height;
color : $ia-body-text-color;
}
::selection {
background: #b3d4fc;
text-shadow: none;
}
hr {
display: block;
height: 1px;
border: 0;
border-top: 1px solid #ccc;
margin: 1em 0;
padding: 0;
}
img, svg {
vertical-align: middle;
}
textarea {
resize: vertical;
}

View File

@@ -3,26 +3,31 @@ h1, .h1, .alpha{
line-height: $heading-line-height; line-height: $heading-line-height;
margin-top: 0; margin-top: 0;
} }
h2, .h2, .beta{ h2, .h2, .beta{
font-size: $heading-2; font-size: $heading-2;
line-height: $heading-line-height; line-height: $heading-line-height;
margin-top: 0; margin-top: 0;
} }
h3, .h3, .gamma{ h3, .h3, .gamma{
font-size: $heading-3; font-size: $heading-3;
line-height: $heading-line-height; line-height: $heading-line-height;
margin-top: 0; margin-top: 0;
} }
h4, .h4, .delta{ h4, .h4, .delta{
font-size: $heading-4; font-size: $heading-4;
line-height: $heading-line-height; line-height: $heading-line-height;
margin-top: 0; margin-top: 0;
} }
h5, .h5, .epsilon{ h5, .h5, .epsilon{
font-size: $heading-5; font-size: $heading-5;
line-height: $heading-line-height; line-height: $heading-line-height;
margin-top: 0; margin-top: 0;
} }
h6, .h6, .zeta{ h6, .h6, .zeta{
font-size: $heading-6; font-size: $heading-6;
line-height: $heading-line-height; line-height: $heading-line-height;

View File

@@ -1,24 +0,0 @@
* {
box-sizing:border-box;
}
html {
font-size : ($ia-base-font-size / 16px) * 1em; /* [1] */
font-family : $ia-font-family-sans;
line-height : $ia-base-line-height / $ia-base-font-size; /* [1] */
background-color : $ia-body-background-color;
color : $ia-body-text-color;
overflow-y : scroll; /* [2] */
min-height : 100%; /* [3] */
-ms-text-size-adjust : 100%; /* [4] */
-webkit-text-size-adjust : 100%; /* [5] */
}
/**
* Remove default margin.
*/
body {
margin: 0;
}

View File

@@ -0,0 +1,26 @@
.clearfix:before,
.clearfix:after {
content: " ";
display: table;
}
.clearfix:after {
clear: both;
}
.center-vertically {
text-align: center;
height: 100%;
&:before {
content : "";
display : inline-block;
height : 100%;
vertical-align : middle;
}
> * {
display : inline-block;
vertical-align : middle;
}
}

View File

@@ -0,0 +1,29 @@
.left {
float: left !important;
}
.right {
float: right !important;
}
.align-left {
text-align: left !important;
}
.align-right {
text-align: right !important;
}
.align-center {
text-align: center !important;
}
.is-visible {
visibility: visible !important;
opacity: 1 !important;
}
.is-hidden {
visibility: hidden !important;
opacity: 0 !important;
}

View File

@@ -0,0 +1,11 @@
@function em($px, $base: $font-size) {
@return ($px / $base) * 1em;
}
@function rem($px, $base: $font-size) {
@return ($px / $base) * 1rem;
}
@function span($fraction) {
@return $fraction * 100%;
}