Adds LESS Version of Skeleton
GRID: - Added LESS logic so that grid columns are calculated from the total width of the container VARIABLES: Hooked up color variables to fonts, buttons, border, backgrounds BREAKPOINTS: defined breakpoints by variables. GRUNT: Grunt will watch the less file and any time there is a change saved it will compile to the css/skeleton.css file.
This commit is contained in:
429
less/skeleton.less
vendored
Normal file
429
less/skeleton.less
vendored
Normal file
@@ -0,0 +1,429 @@
|
||||
/*
|
||||
* Skeleton V2.0
|
||||
* Copyright 2014, Dave Gamache
|
||||
* www.getskeleton.com
|
||||
* Free to use under the MIT license.
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* 12/9/2014
|
||||
*/
|
||||
|
||||
|
||||
/* Table of contents
|
||||
––––––––––––––––––––––––––––––––––––––––––––––––––
|
||||
- Variables
|
||||
- Grid
|
||||
- Base Styles
|
||||
- Typography
|
||||
- Links
|
||||
- Buttons
|
||||
- Forms
|
||||
- Lists
|
||||
- Code
|
||||
- Tables
|
||||
- Spacing
|
||||
- Utilities
|
||||
- Clearing
|
||||
- Media Queries
|
||||
*/
|
||||
|
||||
// Colors
|
||||
@primary-color: #33C3F0;
|
||||
@secondary-color: #bbbbbb;
|
||||
@border-color: #bbbbbb;
|
||||
@link-color: #1EAEDB;
|
||||
@font-color: #222222;
|
||||
@light-gray: #e1e1e1;
|
||||
@dark-gray: #333333;
|
||||
|
||||
// Grid Variables
|
||||
@container-width: 960px;
|
||||
@total-columns: 12;
|
||||
@column-width: 100 / @total-columns; // calculates individual column width based off of # of columns
|
||||
@column-margin: 3%; // space between columns
|
||||
@column-padding: 4px 8px; // space inside columns
|
||||
@row-space:2rem; // Margin-bottom for .row
|
||||
|
||||
|
||||
// Breakpoints
|
||||
@larger-than-mobile: 400px;
|
||||
@larger-than-phablet: 550px;
|
||||
@larger-than-tablet: 750px;
|
||||
@larger-than-desktop: 1000px;
|
||||
@larger-than-desktophd: 1200px;
|
||||
|
||||
// Misc
|
||||
@global-radius:4px;
|
||||
|
||||
|
||||
/* Grid
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
|
||||
|
||||
.container {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
max-width: @container-width;
|
||||
margin: 0 auto;
|
||||
padding: 0; }
|
||||
.container .column,
|
||||
.container .columns {
|
||||
float: left;
|
||||
width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.row {
|
||||
margin-bottom: @row-space; }
|
||||
.row .column:first-child,
|
||||
.row .columns:first-child {
|
||||
margin-left: 0; }
|
||||
|
||||
/* For devices larger than 550px */
|
||||
@media (min-width: 550px) {
|
||||
|
||||
.container .column,
|
||||
.container .columns {
|
||||
margin-left: @column-margin;
|
||||
padding: @column-padding;
|
||||
|
||||
border: 1px solid @light-gray; // for demo only
|
||||
border-radius: @global-radius; // for demo only
|
||||
|
||||
}
|
||||
|
||||
.container .one.column,
|
||||
.container .one.columns { width: @column-width*1-(@column-margin/2)*1%; }
|
||||
.container .two.columns { width: @column-width*2-(@column-margin/2)*1%; }
|
||||
.container .three.columns { width: @column-width*3-(@column-margin/2)*1%; }
|
||||
.container .four.columns { width: @column-width*4-(@column-margin/2)*1%; }
|
||||
.container .five.columns { width: @column-width*5-(@column-margin/2)*1%; }
|
||||
.container .six.columns { width: @column-width*6-(@column-margin/2)*1%; }
|
||||
.container .seven.columns { width: @column-width*7-(@column-margin/2)*1%; }
|
||||
.container .eight.columns { width: @column-width*8-(@column-margin/2)*1%; }
|
||||
.container .nine.columns { width: @column-width*9-(@column-margin/2)*1%; }
|
||||
.container .ten.columns { width: @column-width*10-(@column-margin/2)*1%; }
|
||||
.container .eleven.columns { width: @column-width*11-(@column-margin/2)*1%; }
|
||||
.container .twelve.columns { width: 100%; margin-left: 0; }
|
||||
|
||||
.container .one-third.column { width: @column-width*4-(@column-margin/2)*1%; }
|
||||
.container .two-thirds.column { width: @column-width*8-(@column-margin/2)*1%; }
|
||||
|
||||
.container .one-half.column { width: @column-width*6-(@column-margin/2)*1%; }
|
||||
|
||||
/* Offsets */
|
||||
.container .offset-by-one.column,
|
||||
.container .offset-by-one.columns { margin-left: @column-width*1-(@column-margin/2)*1%; }
|
||||
.container .offset-by-two.column { margin-left: @column-width*2-(@column-margin/2)*1%; }
|
||||
.container .offset-by-three.column { margin-left: @column-width*3-(@column-margin/2)*1%; }
|
||||
.container .offset-by-four.column { margin-left: @column-width*4-(@column-margin/2)*1%; }
|
||||
.container .offset-by-five.column { margin-left: @column-width*5-(@column-margin/2)*1%; }
|
||||
.container .offset-by-six.column { margin-left: @column-width*6-(@column-margin/2)*1%; }
|
||||
.container .offset-by-seven.column { margin-left: @column-width*7-(@column-margin/2)*1%; }
|
||||
.container .offset-by-eight.column { margin-left: @column-width*8-(@column-margin/2)*1%; }
|
||||
.container .offset-by-nine.column { margin-left: @column-width*9-(@column-margin/2)*1%; }
|
||||
.container .offset-by-ten.column { margin-left: @column-width*10-(@column-margin/2)*1%; }
|
||||
.container .offset-by-eleven.column { margin-left: @column-width*11-(@column-margin/2)*1%; }
|
||||
|
||||
.container .offset-by-one-third.column { margin-left: @column-width*4-(@column-margin/2)*1%; }
|
||||
.container .offset-by-two-thirds.column { margin-left: @column-width*8-(@column-margin/2)*1%; }
|
||||
|
||||
.container .offset-by-one-half.column { margin-left: @column-width*1-(@column-margin/2)*1%; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
/* Base Styles
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
/* NOTE
|
||||
html is set to 62.5% so that all the REM measurements throughout Skeleton
|
||||
are based on 10px sizing. So basically 1.5rem = 15px :) */
|
||||
html { font-size: 62.5%; }
|
||||
|
||||
body {
|
||||
font-size: 1.5em; /* currently ems cause chrome bug misinterpreting rems on body element */
|
||||
line-height: 1.6;
|
||||
font-weight: 400;
|
||||
font-family: "Raleway", "HelveticaNeue", "elvetica Neue", Helvetica, Arial, sans-serif;
|
||||
color: @font-color;
|
||||
}
|
||||
|
||||
|
||||
/* Typography
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-weight: 300;
|
||||
margin-top: 0;
|
||||
margin-bottom: 2rem; }
|
||||
h1 { font-size: 4.0rem; line-height: 1.2; letter-spacing: -.1rem;}
|
||||
h2 { font-size: 3.6rem; line-height: 1.25; letter-spacing: -.1rem; }
|
||||
h3 { font-size: 3.0rem; line-height: 1.3; letter-spacing: -.1rem; }
|
||||
h4 { font-size: 2.4rem; line-height: 1.35; letter-spacing: -.08rem; }
|
||||
h5 { font-size: 1.8rem; line-height: 1.5; letter-spacing: -.05rem; }
|
||||
h6 { font-size: 1.5rem; line-height: 1.6; letter-spacing: 0; }
|
||||
|
||||
/* Larger than phablet */
|
||||
@media (min-width: @larger-than-phablet) {
|
||||
h1 { font-size: 5.0rem; }
|
||||
h2 { font-size: 4.2rem; }
|
||||
h3 { font-size: 3.6rem; }
|
||||
h4 { font-size: 3.0rem; }
|
||||
h5 { font-size: 2.4rem; }
|
||||
h6 { font-size: 1.5rem; }
|
||||
}
|
||||
|
||||
p {
|
||||
margin-top: 0; }
|
||||
|
||||
|
||||
/* Links
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
a {
|
||||
color: @link-color; }
|
||||
a:hover {
|
||||
color: darken(@link-color, 5%); }
|
||||
|
||||
|
||||
/* Buttons
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
.button,
|
||||
button,
|
||||
input[type="submit"],
|
||||
input[type="reset"],
|
||||
input[type="button"] {
|
||||
display: inline-block;
|
||||
background-color: transparent;
|
||||
border-radius: @global-radius;
|
||||
color: @secondary-color;
|
||||
text-align: center;
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
border: 1px solid @secondary-color;
|
||||
height: 38px;
|
||||
line-height: 38px;
|
||||
padding: 0 30px;
|
||||
letter-spacing: .1rem;
|
||||
text-transform: uppercase;
|
||||
white-space: nowrap;
|
||||
box-sizing: border-box; }
|
||||
.button:hover,
|
||||
button:hover,
|
||||
input[type="submit"]:hover,
|
||||
input[type="reset"]:hover,
|
||||
input[type="button"]:hover,
|
||||
.button:focus,
|
||||
button:focus,
|
||||
input[type="submit"]:focus,
|
||||
input[type="reset"]:focus,
|
||||
input[type="button"]:focus {
|
||||
border-color: darken(@secondary-color, 10%);
|
||||
color: darken(@secondary-color, 10%);
|
||||
outline: 0; }
|
||||
.button.button-primary,
|
||||
button.button-primary,
|
||||
input[type="submit"].button-primary,
|
||||
input[type="reset"].button-primary,
|
||||
input[type="button"].button-primary {
|
||||
color: #FFF;
|
||||
border-color: @primary-color;
|
||||
background-color: @primary-color; }
|
||||
.button.button-primary:hover,
|
||||
button.button-primary:hover,
|
||||
input[type="submit"].button-primary:hover,
|
||||
input[type="reset"].button-primary:hover,
|
||||
input[type="button"].button-primary:hover,
|
||||
.button.button-primary:focus,
|
||||
button.button-primary:focus,
|
||||
input[type="submit"].button-primary:focus,
|
||||
input[type="reset"].button-primary:focus,
|
||||
input[type="button"].button-primary:focus {
|
||||
background-color: darken(@primary-color, 10%);
|
||||
border-color: darken(@primary-color, 10%);
|
||||
color: #FFF; }
|
||||
|
||||
|
||||
/* Forms
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
input[type="email"],
|
||||
input[type="search"],
|
||||
input[type="text"],
|
||||
input[type="password"],
|
||||
textarea,
|
||||
select {
|
||||
border: 1px solid @border-color;
|
||||
height: 36px;
|
||||
padding: 6px 10px; /* The 6px vertically centers text on FF, ignored by Webkit */
|
||||
border-radius: @global-radius;
|
||||
box-shadow: none;
|
||||
background: #fff; }
|
||||
/* Removes awkard default styles on some inputs */
|
||||
input[type="email"],
|
||||
input[type="search"],
|
||||
input[type="text"],
|
||||
textarea {
|
||||
-webkit-appearance: none;
|
||||
-moz-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
textarea {
|
||||
min-height: 65px;
|
||||
padding-top: 6px;
|
||||
padding-bottom: 6px; }
|
||||
input[type="email"]:focus,
|
||||
input[type="search"]:focus,
|
||||
input[type="text"]:focus,
|
||||
input[type="password"]:focus,
|
||||
textarea:focus,
|
||||
select:focus {
|
||||
border: 1px solid @primary-color;
|
||||
outline: 0; }
|
||||
label,
|
||||
legend {
|
||||
display: block;
|
||||
font-weight: 600;
|
||||
margin-bottom: .5rem; }
|
||||
fieldset {
|
||||
border-width: 0;
|
||||
padding: 0; }
|
||||
input[type="checkbox"],
|
||||
input[type="radio"] {
|
||||
display: inline; }
|
||||
label > .label-body {
|
||||
display: inline-block;
|
||||
font-weight: normal;
|
||||
margin-left: .5rem; }
|
||||
|
||||
|
||||
/* Lists
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
ul {
|
||||
list-style: circle inside; }
|
||||
ol {
|
||||
list-style: decimal inside; }
|
||||
ol, ul {
|
||||
margin-top: 0;
|
||||
padding-left: 0; }
|
||||
ul ul,
|
||||
ul ol,
|
||||
ol ol,
|
||||
ol ul {
|
||||
margin: 1.5rem 0 1.5rem 3rem;
|
||||
font-size: 90%; }
|
||||
li {
|
||||
margin-bottom: 1rem; }
|
||||
|
||||
|
||||
/* Code
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
code {
|
||||
padding: .2rem .5rem;
|
||||
margin: 0 .2rem;
|
||||
font-size: 90%;
|
||||
background: lighten(@light-gray, 7%);
|
||||
border: 1px solid @light-gray;
|
||||
border-radius: @global-radius;
|
||||
white-space: nowrap; }
|
||||
pre > code {
|
||||
display: block;
|
||||
padding: 1rem 1.5rem;
|
||||
white-space: pre; }
|
||||
|
||||
|
||||
/* Tables
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
th,
|
||||
td {
|
||||
padding: 12px 15px;
|
||||
text-align: left;
|
||||
border-bottom: 1px solid @light-gray; }
|
||||
th:first-child,
|
||||
td:first-child {
|
||||
padding-left: 0; }
|
||||
th:last-child,
|
||||
td:last-child {
|
||||
padding-right: 0; }
|
||||
|
||||
|
||||
/* Spacing
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
button,
|
||||
.button {
|
||||
margin-bottom: 1rem; }
|
||||
input,
|
||||
textarea,
|
||||
select,
|
||||
fieldset {
|
||||
margin-bottom: 1.5rem; }
|
||||
pre,
|
||||
blockquote,
|
||||
form,
|
||||
dl,
|
||||
figure,
|
||||
table,
|
||||
p,
|
||||
ul,
|
||||
ol,
|
||||
form {
|
||||
margin-bottom: 2.5rem; }
|
||||
p {
|
||||
margin-top: 0; }
|
||||
|
||||
|
||||
|
||||
/* Utilities
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
.u-full-width {
|
||||
width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.u-max-full-width {
|
||||
max-width: 100%;
|
||||
box-sizing: border-box; }
|
||||
.u-pull-right {
|
||||
float: right; }
|
||||
.u-pull-left {
|
||||
float: left; }
|
||||
|
||||
|
||||
/* Misc
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
hr {
|
||||
margin-top: 3rem;
|
||||
margin-bottom: 3.5rem;
|
||||
border-width: 0;
|
||||
border-top: 1px solid @light-gray;
|
||||
}
|
||||
|
||||
/* Clearing
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
|
||||
/* Self Clearing Goodness */
|
||||
.container:after,
|
||||
.row:after,
|
||||
.u-cf {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both; }
|
||||
|
||||
|
||||
/* Media Queries
|
||||
–––––––––––––––––––––––––––––––––––––––––––––––––– */
|
||||
/*
|
||||
Note: The best way to structure the use of media queries is to create the queries
|
||||
near the relevant code. For example, if you wanted to change the styles for buttons
|
||||
on small devices, paste the mobile query code up in the buttons secion and style it
|
||||
there.
|
||||
*/
|
||||
|
||||
/* Larger than mobile */
|
||||
@media (min-width: @larger-than-mobile) {}
|
||||
|
||||
/* Larger than phablet (also point when grid becomes active) */
|
||||
@media (min-width: @larger-than-phablet) {}
|
||||
|
||||
/* Larger than tablet */
|
||||
@media (min-width: @larger-than-tablet) {}
|
||||
|
||||
/* Larger than desktop */
|
||||
@media (min-width: @larger-than-desktop) {}
|
||||
|
||||
/* Larger than Desktop HD */
|
||||
@media (min-width: @larger-than-desktophd) {}
|
Reference in New Issue
Block a user