|
@import "compass/css3"; |
|
/* Design style tiles in the browser with SCSS! Fork this in CodePen and make your own tiles. Share your tiles with clients with the Full Page link. Go CodePen Pro and update styles on the fly in Live View in a meeting with your client. It's responsive, too. Get your in-browser design on. (Documentation in the JS tab.) */ |
|
|
|
/* Web Fonts @import */ |
|
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400italic,800italic,400,800); |
|
@import url(http://fonts.googleapis.com/css?family=Droid+Serif:400,700,400italic,700italic); |
|
|
|
|
|
/* BASIC STYLING |
|
-------------------------------- */ |
|
|
|
/* Colours */ |
|
$color-1: rgb(159,28,25); |
|
$color-2: rgb(101,209,251); |
|
$color-3: rgb(5,171,235); |
|
$color-4: rgb(255,133,0); |
|
$color-5: rgb(255,36,31); |
|
|
|
$header-background: $color-1; |
|
$body-background: lighten($color-1, 90%); |
|
$typography-samples-background: $body-background; |
|
$footer-background: $body-background; |
|
|
|
/* Basic typography */ |
|
$heading-font-family: 'Open Sans', sans-serif; |
|
$heading-color: desaturate(darken($color-1, 15%), 80%); |
|
|
|
$body-font-family: 'Droid Serif', serif; |
|
$body-font-size: 1.6em; |
|
$body-line-height: 1.5; |
|
$body-color: #222; |
|
|
|
$body-link-font-family: $heading-font-family; |
|
$body-link-color: $color-3; |
|
|
|
$header-color: white; /* font color in <header> */ |
|
|
|
/* Basic button styling */ |
|
$button-1-background-color: $color-3; |
|
$button-1-border-radius: 4px; |
|
$button-1-padding: 1em; |
|
|
|
$button-2-background-color: $color-5; |
|
$button-2-border-radius: $button-1-border-radius; |
|
$button-2-padding: $button-1-padding; |
|
|
|
/* Basic texture swatch styling */ |
|
$texture-swatch-1-background: url("http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/pw_maze_white.png") top left repeat; |
|
$texture-swatch-2-background: url("http://subtlepatterns.com/patterns/white_paperboard.png") top left repeat; |
|
$texture-swatch-3-background: url("http://subtlepatterns.subtlepatterns.netdna-cdn.com/patterns/subtle_grunge.png") top left repeat; |
|
|
|
/* end basic styling */ |
|
|
|
|
|
/* ADVANCED STYLING |
|
-------------------------------- */ |
|
/* Main */ |
|
$main-background: $body-background; |
|
$main-padding: 20px; |
|
|
|
@mixin section-heading { /* e.g., h3's like "Possible colors", "Textures" */ |
|
font: italic 1.3em $heading-font-family; |
|
color: #777; |
|
margin-bottom: .5em; |
|
} |
|
|
|
/* Header */ |
|
$header-padding: $main-padding; |
|
|
|
@mixin header-h1 { |
|
//text-indent: -9999px; /*Uncomment this line if you're replacing the text with a logo. */ |
|
font: bold 3em/1 $heading-font-family; |
|
color: $header-color; |
|
text-transform: uppercase; |
|
letter-spacing: -2px; |
|
padding-right: .75em; |
|
} |
|
|
|
@mixin header-h2 { |
|
font: bold 1.6em $heading-font-family; |
|
color: rgba($header-color, .95); |
|
} |
|
|
|
@mixin header-h3 { |
|
font: italic 1.2em $heading-font-family; |
|
color: rgba($header-color, .95); |
|
} |
|
|
|
@mixin header-h4 { |
|
font: .8em $body-font-family; |
|
color: rgba($header-color, .95); |
|
} |
|
|
|
/* Colour swatches */ |
|
$color-swatch-1: $color-1; |
|
$color-swatch-2: $color-2; |
|
$color-swatch-3: $color-3; |
|
$color-swatch-4: $color-4; |
|
$color-swatch-5: $color-5; |
|
|
|
$color-swatch-height: 5em; |
|
|
|
/* Texture swatches */ |
|
@mixin texture-swatch-1 { |
|
background: $texture-swatch-1-background; |
|
} |
|
|
|
@mixin texture-swatch-2 { |
|
background: $texture-swatch-2-background; |
|
} |
|
|
|
@mixin texture-swatch-3 { |
|
background: $texture-swatch-3-background; |
|
} |
|
|
|
$texture-swatch-height: 8em; |
|
|
|
/* Buttons */ |
|
@mixin button-1 { |
|
padding: $button-1-padding; |
|
border-radius: $button-1-border-radius; |
|
background: $button-1-background-color; |
|
text-align: center; |
|
text-decoration: none; |
|
font: bold 1.25em/1 $heading-font-family; |
|
letter-spacing: 1px; |
|
color: lighten($button-1-background-color, 60%); |
|
text-transform: uppercase; |
|
text-shadow: 0px -1px 0px darken($button-1-background-color, 15%); |
|
transition: all .2s ease; |
|
&:hover { |
|
background: darken($button-1-background-color, 15%); |
|
} |
|
} |
|
|
|
@mixin button-2 { |
|
padding: $button-2-padding; |
|
border-radius: $button-2-border-radius; |
|
background: $button-2-background-color; |
|
text-align: center; |
|
text-decoration: none; |
|
font: bold 1.25em/1 $heading-font-family; |
|
letter-spacing: 1px; |
|
color: lighten($button-2-background-color, 60%); |
|
text-transform: uppercase; |
|
text-shadow: 0px -1px 0px darken($button-2-background-color, 15%); |
|
transition: all .2s ease; |
|
&:hover { |
|
background: darken($button-2-background-color, 15%); |
|
} |
|
} |
|
|
|
/* Typography samples */ |
|
@mixin typography-sample-h3 { |
|
font: bold 2.4em/1.25 $heading-font-family; |
|
margin-bottom: .25em; |
|
color: $heading-color; |
|
} |
|
|
|
@mixin typography-sample-h4 { |
|
font: italic 1.5em/1.25 $body-font-family; |
|
margin-bottom: .25em; |
|
color: $heading-color; |
|
} |
|
|
|
@mixin typography-sample-p { |
|
font: 1em/1.5 $body-font-family; |
|
color: $body-color; |
|
strong { |
|
font-weight: bold; |
|
} |
|
em { |
|
font-style: italic; |
|
} |
|
} |
|
|
|
@mixin typography-sample-a { |
|
font: bold 1em $body-link-font-family; |
|
color: $body-link-color; |
|
text-decoration: none; |
|
&:hover { |
|
color: darken(saturate($body-link-color, 50%), 10%); |
|
transition: all .3s ease; |
|
} |
|
} |
|
|
|
@mixin typography-samples { |
|
background: $typography-samples-background; |
|
padding: 0; |
|
@media (min-width: 50em) { |
|
padding: 20px; |
|
} |
|
} |
|
|
|
/* Adjectives */ |
|
@mixin adjective-1 { |
|
font: italic 1.6em/1 $heading-font-family; |
|
color: $color-1; |
|
} |
|
|
|
@mixin adjective-2 { |
|
font: bold 1.25em/1.25 $body-font-family; |
|
color: $color-3; |
|
} |
|
|
|
@mixin adjective-3 { |
|
font: 1.5em/1 $heading-font-family; |
|
color: $color-4; |
|
} |
|
|
|
@mixin adjective-4 { |
|
font: 1.6em/1.15 $heading-font-family; |
|
color: $color-2; |
|
} |
|
|
|
@mixin adjective-5 { |
|
font: bold italic 3em/.7 $heading-font-family; |
|
color: $color-5; |
|
} |
|
|
|
@mixin adjective-6 { |
|
font: bold italic 1.8em/1.1 $body-font-family; |
|
color: $color-3; |
|
} |
|
|
|
/* Footer */ |
|
$footer-padding: $main-padding; |
|
$footer-background: $footer-background; |
|
|
|
$footer-color: white; |
|
|
|
@mixin footer { |
|
padding: $footer-padding; |
|
font: italic 1em/1.5 $heading-font-family; |
|
color: $body-color; |
|
a { |
|
font-weight: bold; |
|
color: $color-3; |
|
text-decoration: none; |
|
} |
|
} |
|
/* end advanced styling */ |
|
|
|
|
|
/* SETTINGS |
|
-------------------------------- */ |
|
|
|
/* Typography samples settings */ |
|
$font-details-font: .75em/1 $body-font-family; |
|
|
|
@mixin font-details { |
|
margin-top: .5em; |
|
margin-bottom: 2em; |
|
font: $font-details-font; |
|
color: lighten($body-color, 30%); |
|
.font-color { |
|
font-style: italic; |
|
} |
|
} |
|
|
|
/* Grid settings */ |
|
$grid-padding: 30px; |
|
|
|
/* Swatch grid settings (for the boxes containing Possible Colors and Textures */ |
|
$swatch-border: 4px solid white; |
|
$swatch-shadow: 0px 0px 6px 0px rgba(0,0,0,.25); |
|
$swatch-margin: 2%; |
|
|
|
/* end settings */ |
|
|
|
|
|
|
|
/* ================================================== */ |
|
|
|
|
|
/* Clearfix |
|
-------------------- */ |
|
|
|
.group:after { |
|
visibility: hidden; |
|
display: block; |
|
content: ""; |
|
clear: both; |
|
height: 0; |
|
} |
|
* html .group { zoom: 1; } /* IE6 */ |
|
*:first-child+html .group { zoom: 1; } /* IE7 */ |
|
|
|
/* General styling |
|
-------------------- */ |
|
|
|
*, *:after, *:before { |
|
-webkit-box-sizing: border-box; |
|
-moz-box-sizing: border-box; |
|
box-sizing: border-box; |
|
} |
|
|
|
html { |
|
font-size: 62.5%; |
|
} |
|
|
|
body { |
|
background: $body-background; |
|
font: $body-font-size $body-font-family; |
|
line-height: $body-line-height; |
|
} |
|
|
|
header, .main, footer { |
|
max-width: 81em; |
|
margin: 0 auto; |
|
} |
|
|
|
/* Header |
|
-------------------- */ |
|
|
|
.header-wrapper { |
|
background: $header-background; |
|
} |
|
|
|
header { |
|
padding: $header-padding; |
|
background: $header-background; |
|
} |
|
|
|
header h1, header hgroup { |
|
position: relative; |
|
float: left; |
|
} |
|
|
|
header h1 { |
|
@include header-h1; |
|
} |
|
|
|
header h2 { |
|
@include header-h2; |
|
} |
|
|
|
header h3 { |
|
@include header-h3; |
|
} |
|
|
|
header h4 { |
|
@include header-h4; |
|
} |
|
|
|
.project-title { |
|
position: relative; |
|
float: left; |
|
} |
|
|
|
/* Main |
|
-------------------- */ |
|
|
|
.main { |
|
padding: $main-padding; |
|
background: $main-background; |
|
} |
|
|
|
.section-heading { |
|
@include section-heading; |
|
} |
|
|
|
.main p { |
|
margin-bottom: .5em; |
|
} |
|
|
|
section { |
|
margin-bottom: 2em; |
|
} |
|
|
|
/* Swatches |
|
-------------------- */ |
|
|
|
[class*="swatch-"] { |
|
height: $color-swatch-height; |
|
border: $swatch-border; |
|
box-shadow: $swatch-shadow; |
|
} |
|
|
|
.color-swatch-1 { |
|
background: $color-swatch-1; |
|
} |
|
|
|
.color-swatch-2 { |
|
background: $color-swatch-2; |
|
} |
|
|
|
.color-swatch-3 { |
|
background: $color-swatch-3; |
|
} |
|
|
|
.color-swatch-4 { |
|
background: $color-swatch-4; |
|
} |
|
|
|
.color-swatch-5 { |
|
background: $color-swatch-5; |
|
} |
|
|
|
/* Texture swatches |
|
-------------------- */ |
|
|
|
[class*="texture-swatch-"] { |
|
overflow: hidden; |
|
height: $texture-swatch-height; |
|
border: $swatch-border; |
|
box-shadow: $swatch-shadow; |
|
} |
|
|
|
.texture-swatch-1 { |
|
@include texture-swatch-1; |
|
} |
|
|
|
.texture-swatch-2 { |
|
@include texture-swatch-2; |
|
} |
|
|
|
.texture-swatch-3 { |
|
@include texture-swatch-3; |
|
} |
|
|
|
/* Buttons |
|
--------------------- */ |
|
|
|
[class*="button-"] { |
|
display: inline-block; |
|
position: relative; |
|
margin-right: 1em; |
|
margin-bottom: 1em; |
|
} |
|
|
|
.button-1 { |
|
@include button-1 |
|
} |
|
|
|
.button-2 { |
|
@include button-2 |
|
} |
|
|
|
/* Typography samples |
|
--------------------- */ |
|
|
|
.typography-samples { |
|
@include typography-samples |
|
} |
|
|
|
h3.typography-sample { |
|
@include typography-sample-h3; |
|
} |
|
|
|
h4.typography-sample { |
|
@include typography-sample-h4; |
|
} |
|
|
|
p.typography-sample { |
|
@include typography-sample-p; |
|
} |
|
|
|
a.typography-sample { |
|
@include typography-sample-a; |
|
} |
|
|
|
p[class*="font-details-"] { |
|
@include font-details; |
|
} |
|
|
|
/* Adjectives |
|
-------------------- */ |
|
.adjective-1 { |
|
@include adjective-1; |
|
} |
|
|
|
.adjective-2 { |
|
@include adjective-2; |
|
} |
|
.adjective-3 { |
|
@include adjective-3; |
|
} |
|
|
|
.adjective-4 { |
|
@include adjective-4; |
|
} |
|
|
|
.adjective-5 { |
|
@include adjective-5; |
|
} |
|
|
|
.adjective-6 { |
|
@include adjective-6; |
|
} |
|
|
|
/* Footer |
|
-------------------- */ |
|
.footer-wrapper { |
|
background: $footer-background; |
|
} |
|
|
|
footer { |
|
@include footer; |
|
} |
|
|
|
/* Grids |
|
based on Chris Coyier's Dont Overthink It Grids |
|
http://css-tricks.com/dont-overthink-it-grids/ |
|
-------------------- */ |
|
|
|
[class*='col-'] { float: left; } |
|
|
|
.grid:after { |
|
content: ""; |
|
display: table; |
|
clear: both; |
|
} |
|
|
|
.col-1-2 { |
|
width: 100%; /* Single-column by default, i.e., on mobile */ |
|
@media ( min-width: 50em ) { /* 2-column if viewport is wide enough*/ |
|
width: 50%; |
|
} |
|
} |
|
|
|
.col-1-3 { |
|
width: 100%; |
|
@media ( min-width: 50em ) { |
|
width: 33.3333%; |
|
} |
|
} |
|
|
|
[class*="col-"] { |
|
padding: 0; |
|
@media ( min-width: 50em ) { |
|
padding-left: $grid-padding; |
|
} |
|
} |
|
|
|
[class*="col-"]:first-child { padding-left: 0; } |
|
|
|
/* Swatch grids |
|
|
|
[Want to add more swatch grid column options? |
|
|
|
Formula for calculating swatch width: |
|
|
|
width: (100% - ($swatch-margin * (y - 1))) / y; |
|
|
|
where y = number of swatches in a grid row] |
|
|
|
*/ |
|
|
|
[class*='swatch-'] { float: left; } |
|
|
|
.swatchgrid:after { |
|
content: ""; |
|
display: table; |
|
clear: both; |
|
} |
|
|
|
.swatch-1-2 { |
|
width: ( 100% - ( $swatch-margin * ( 1 ) ) ) / 2; |
|
} |
|
|
|
.swatch-1-3 { |
|
width: ( 100% - ( $swatch-margin * ( 2 ) ) ) / 3; |
|
} |
|
|
|
.swatch-1-4 { |
|
width: ( 100% - ( $swatch-margin * ( 3 ) ) ) / 4; |
|
} |
|
|
|
.swatch-1-5 { |
|
width: ( 100% - ( $swatch-margin * ( 4 ) ) ) / 5; |
|
} |
|
|
|
[class*="swatch-"] { margin-left: $swatch-margin; } |
|
|
|
[class*="swatch-"]:first-child { margin-left: 0; } |