Created
March 8, 2015 01:25
-
-
Save epilande/1c45b01d02deb245003e to your computer and use it in GitHub Desktop.
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
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300,400,700); | |
$base-font-family: 'Open Sans', sans-serif; | |
$background-color: #fff; | |
@import 'media-queries'; | |
// Set a rem font size with pixel fallback | |
@function calculate-rem($size) { | |
$rem-size: $size / 16px; | |
@return $rem-size * 1rem; | |
} | |
@mixin font-size($size) { | |
font-size: $size; | |
font-size: calculate-rem($size); | |
} | |
html { | |
font-size: 10px; | |
width: 100%; | |
height: 100%; | |
@include min-breakpoint(screen-xs) { | |
font-size: 12px; | |
} | |
@include min-breakpoint(screen-sm) { | |
font-size: 14px; | |
} | |
@include min-breakpoint(screen-md) { | |
font-size: 16px; | |
} | |
} | |
body { | |
width: 100%; | |
height: 100%; | |
margin: 0; | |
padding: 0; | |
font-family: $base-font-family; | |
line-height: 1.2em; | |
color: #333; | |
background: #fff; | |
} | |
header { | |
background: #111; | |
} | |
.headline { | |
position: relative; | |
height: 400px; | |
color: #fff; | |
text-align: center; | |
background: url('https://farm9.staticflickr.com/8088/8363737128_b76782c7a2_b.jpg') no-repeat center center; | |
background-size: cover; | |
&:after { | |
position: absolute; | |
content: ''; | |
top: 0; | |
left: 0; | |
width: 100%; | |
height: 100%; | |
background: rgba(#111, 0.5); | |
} | |
} | |
.inner { | |
position: absolute; | |
top: 50%; | |
left: 50%; | |
opacity: 0; | |
z-index: 10; | |
transform: translateX(-50%) translateY(-50%); | |
animation: fade-in 0.75s 0.25s ease-in forwards; | |
h1 { | |
@include font-size(64px); | |
margin: 0; | |
line-height: 1.2em; | |
} | |
p { | |
@include font-size(22px); | |
margin: 0; | |
font-style: italic; | |
font-family: serif; | |
} | |
} | |
nav { | |
position: fixed; | |
width: 100%; | |
z-index: 10; | |
&.scrolled { | |
background: rgba(#111, 0.9); | |
} | |
ul { | |
float: right; | |
list-style: none; | |
padding: 25px; | |
margin: 0; | |
} | |
li { | |
float: left; | |
} | |
a { | |
@include font-size(14px); | |
color: #fff; | |
text-decoration: none; | |
margin: 5px 0 0 20px; | |
display: block; | |
&:hover { | |
color: darken(#fff, 7%); | |
} | |
} | |
} | |
.logo { | |
height: 75px; | |
float: left; | |
&:before, &:after { | |
@include font-size(12px); | |
position: absolute; | |
font-weight: 300; | |
line-height: 0; | |
color: #fff; | |
top: 25px; | |
} | |
&:before { | |
content: '\00BB'; | |
left: 20px; | |
} | |
&:after { | |
content: '\00AB'; | |
left: 34px; | |
} | |
} | |
section { | |
@include font-size(18px); | |
width: 100%; | |
margin: 25px auto; | |
padding: 20px; | |
max-width: 800px; | |
line-height: 1.6em; | |
box-sizing: border-box; | |
} | |
@keyframes fade-in { | |
0% { | |
opacity: 0; | |
} | |
100% { | |
opacity: 1; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment