BikeBikeBike/app/assets/stylesheets/application.scss
2015-04-14 19:41:46 -07:00

975 lines
16 KiB
SCSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

@import "settings";
body {
color: #333;
position: relative;
z-index: -1;
}
h1, h2, h3, h4, h5, label, button {
@include font-family(secondary);
}
h2 {
margin: 0;
font-size: 6vw;
}
p {
font-size: 4vw;
}
a {
text-decoration: none;
color: $colour-1;
border-bottom: 0 solid;
outline: 0;
position: relative;
@include after {
content: '';
position: absolute;
border-bottom: 0 solid;
right: 0;
bottom: 0;
left: 0;
opacity: 0;
@include _(transition, all 150ms ease-in-out);
@include _(transform, translateY(-1em));
}
&:hover,
&:active,
&:focus {
@include after {
border-bottom: 0.1em solid;
opacity: 1;
transform: translateY(0);
}
}
}
button {
position: relative;
color: #FFF;
background-color: $colour-1;
border: 0;
padding: 0.5em 1em;
font-size: 1.25em;
outline: 0;
border-bottom: 0.125em solid rgba(0, 0, 0, 0.15);
@include _(border-radius, 0.15em);
@include default-box-shadow(top, 2);
overflow: hidden;
cursor: pointer;
@include before-and-after {
content: '';
position: absolute;
display: block;
top: 0;
right: 100%;
font-size: 1.15em;
background-color: rgba(0, 0, 0, 0);
border-color: transparent;
@include _(transition, all 250ms ease-in-out);
}
@include before {
height: 100%;
width: 100%;
margin-right: 1em;
}
@include after {
border-style: solid;
border-width: 1em 0 1em 1em;
}
&:hover,
&:focus,
&:hover,
&:focus {
@include before-and-after {
right: -1em;
border-left-color: rgba(0, 0, 0, 0.15);
}
}
&:hover,
&:focus {
@include before {
background-color: rgba(0, 0, 0, 0.15);
}
}
&:active {
@include _(transform, scale(0.95));
@include after {
left: 120%;
}
}
&:disabled {
@include _(opacity, 0.5);
cursor: inherit;
@include before-and-after {
display: none;
}
}
#main &[type="submit"] {
background-color: $colour-5;
}
}
textarea {
$line-height: 2em;
display: block;
width: 100%;
min-height: $line-height * 4;
font-size: 1.25em;
margin: 1em 0;
padding: 0 0.5em;
line-height: $line-height;
border: 0.1rem solid #E8E8E8;
outline: 0;
background: linear-gradient(
to bottom,
transparent,
transparent ($line-height - 0.05em),
rgba($colour-1, 0.33) 0.05em,
rgba($colour-1, 0.33)
);
background-size: 100% $line-height;
border-radius: 0 0 1em 0;
color: #000;
font-weight: bold;
@include default-box-shadow(top, 2);
@include _(transition, box-shadow 100ms ease-in-out);
&:hover, &:focus, &:active {
@include default-box-shadow(top, 1);
}
}
input {
&[type="text"], &[type="password"], &[type="telephone"], &[type="search"], &[type="email"], &[type="url"] {
display: block;
font-size: 1.25em;
outline: 0;
border: 0;
margin: 1em 0;
width: 100%;
padding: 0.25em 0.5em;
border-bottom: 0.15em solid transparent;
//@include default-box-shadow(top, 2, false, 0 0.05em 0 0 #666);
//@include _(transition, box-shadow 100ms ease-in-out);
&:hover, &:focus, &:active {
//@include default-box-shadow(top, 2, false, 0 0.15em 0 0 $colour-1);
}
}
}
.email-field {
position: relative;
overflow: hidden;
@include default-box-shadow(top, 2, false, 0 0.05em 0 0 #666);
@include _(transition, box-shadow 100ms ease-in-out);
label {
//position: absolute;
font-size: 1em;
float: left;
//@include font-family(primary);
//font-weight: bold;
//left: 0;
//top: 0;
padding: 0.25em 0.667em;
width: auto;
background-color: #333;
color: #FFF;
//@include _(transition, transform 250ms ease-in-out);
//@include _(transform-origin, left center);
//@include _(transform, scale(1) translateY(0));
}
&:hover, &:focus, &:active {
@include default-box-shadow(top, 2, false, 0 0.15em 0 0 $colour-1);
label {
background-color: $colour-1;
}
}
/*input {
&:focus, &:active, &:not([value=""]) {
+ label {
@include _(transform, scale(0.75) translateY(-20%));
top: -0.5em;
}
}
}*/
}
::-webkit-resizer {
visibility: hidden;
cursor: nw-resize;
}
@include selection {
background-color: rgba($colour-2, 0.75);
color: rgba(#FFF, 0.75);
}
#main-nav {
position: relative;
top: 0;
left: 0;
width: 100%;
background-color: #FFF;
@include default-box-shadow(top, 2);
z-index: 1;
.nav {
text-align: center;
clear: left;
overflow: auto;
background-color: $colour-3;
a {
position: relative;
display: inline-block;
margin: 0;
padding: 1em 0;
float: left;
@include font-family(secondary);
text-decoration: none;
font-size: 2.25vw;
outline: none;
border: 0;
width: 33.33%;
background-color: $colour-5;
color: #FFF;
text-shadow: 0 0 0.35em #000;
@include after {
display: none;
}
@include before {
background-color: $colour-5;
}
&:nth-child(2) {
background-color: $colour-4;
@include before {
background-color: $colour-4;
}
}
&:nth-child(3) {
background-color: $colour-3;
@include before {
background-color: $colour-3;
}
}
}
}
.actions {
text-align: center;
position: absolute;
top: rems(1.5);
right: rems(1);
}
}
#main {
position: relative;
z-index: -1;
max-width: (rems(68) - $sidebar-width) * 2;
background-color: #FFF;
padding-bottom: rems(2);
article {
padding: rems(3.5) 7.5%;
&.supplementary {
//background-color: $colour-3;
margin: rems(1) 7.5%;
overflow: hidden;
border-radius: 0.33em;
border: 0.1rem solid #DDD;
background-color: #F7F7F7;
@include default-box-shadow(top, 2);
}
figure {
float: left;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
width: 33%;
height: 12em;
margin-left: -1em;
margin-top: 2em;
margin-right: 1.5em;
margin: 2em 1.5em 1.5em -1.5em;
}
}
}
a.logo {
display: inline-block;
font-size: rems(5);
text-decoration: none;
padding: 0.1em;
border: 0;
float: left;
@include clearfix;
&:hover,
&:active,
&:focus {
@include after {
display: none;
}
}
}
@if capable_of(svg) {
@include keyframes(active-logo) {
0% { fill: $colour-1; }
15% { fill: $colour-5; }
30% { fill: $colour-3; }
45% { fill: $colour-4; }
60% { fill: $colour-2; }
}
@include keyframes(banner-load) {
0% { fill: #888; }
}
svg.bb-icon-logo {
fill: $colour-1;
}
svg.bb-icon-logo-text {
fill: #333;
}
.logo svg {
display: inline-block;
height: 1em;
width: 1em;
float: left;
}
.logo:hover svg.bb-icon-logo {
@include _(animation, active-logo 4s infinite);
}
}
#banner {
clear: left;
figure {
width: 100%;
max-width: rems(60);
margin: 0;
}
img {
width: 100%;
@include default-box-shadow;
}
}
$header-tilt: 8deg;
#header-title {
font-size: 2.25vw;
background-size: cover;
background-position: 50% 20%;
background-repeat: no-repeat;
background-color: $colour-1;
color: #EEE;
overflow: hidden;
position: relative;
z-index: -1;
rect {
fill: $colour-1;
}
svg {
.colour-1 { fill: $colour-1; }
.colour-2 { fill: $colour-2; }
.colour-3 { fill: $colour-3; }
.colour-4 { fill: $colour-4; }
.colour-5 { fill: $colour-5; }
}
&.no-image,
&.short {
h1 {
text-align: center;
font-size: 3.5em;
margin: 0.25em 0.5em;
position: relative;
z-index: 1;
text-shadow: 0 0 0.15em #000;
}
}
svg {
display: none;
position: absolute;
width: 100%;
height: 100%;
}
.title {
position: relative;
padding: 1%;
overflow: hidden;
text-align: center;
@include _(text-shadow, 0 0.2em 0.5em rgba(32, 32, 32, 0.5))
}
.background {
position: absolute;
@include _(transform, rotate($header-tilt));
color: $colour-1;
@include _(opacity, 0.65);
margin: -4% -2%;
@if capable_of(calc) {
font-size: calc(5vw + #{rems(7)});
} @else {
font-size: rems(11);
}
display: none;
}
.details {
position: relative;
display: inline-block;
color: #FFF;
@include _(text-shadow, 0 0.2em 0.5em rgba(32, 32, 32, 0.75));
}
.primary {
font-size: 2.5em;
margin: 0;
}
.secondary {
font-size: 1.5em;
}
}
#footer {
padding: 1em;
.copy {
@include clearfix;
a {
float: right;
color: #666;
}
}
.facebook, .locale {
float: left;
a {
@include after {
display: none;
}
svg {
@include _(transition, fill 250ms ease-in-out);
}
&:hover, &:active, &:focus {
svg {
fill: #3B579D;
}
}
}
}
.github, .facebook {
.icons {
width: 1.5em;
height: 1.5em;
fill: #333;
vertical-align: middle;
}
}
.github {
position: relative;
background-color: #FFF;
border-radius: 0.25em;
border: 0.1em solid #DDD;
padding: 0.5em 0.5em 0.5em 2em;
text-align: center;
z-index: 1;
margin-bottom: 0.5em;
a {
margin: 0 0.5em;
font-size: 0.8em;
font-weight: bold;
color: inherit;
}
.icons {
position: absolute;
left: 0.5em;
top: 0.45em;
@include _(transition, 150ms fill ease-in-out);
}
&:hover .icons {
fill: #4183C4;
}
}
.locale {
@if capable_of(css3_selectors) {
margin: 0 0.5em;
#select-language {
position: absolute;
visibility: hidden;
}
.launch {
display: block;
height: 1.5em;
padding: 0 0.125em;
border-radius: 0.1em;
background-color: #888;
color: #E7E7E7;
text-align: center;
line-height: 1.5em;
@include font-family(secondary);
@include _(transition, 150ms background-color ease-in-out);
cursor: pointer;
&:hover {
background-color: #333;
}
@include after {
content: '×';
display: block;
position: fixed;
top: 0.5em;
left: -1em;
z-index: 11;
color: #333;
font-size: 2em;
opacity: 0;
@include _(transition, 250ms left ease-in-out);
}
}
.selector {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
padding: 1em 4em;
overflow: auto;
background-color: #FFF;
z-index: 10;
@include _(transform, scale(0));
@include _(transform-origin, 6.25em _calc('100% - 2em', 98%));
@include _(transition, 250ms all ease-in-out);
}
ul {
list-style: none;
padding: 0;
margin: 0;
text-align: center;
}
li {
position: relative;
display: inline-block;
min-width: 6em;
margin: 1em;
text-align: center;
border-radius: 0.33em;
overflow: hidden;
@include default-box-shadow;
@include _(transform, scale(1));
@include _(transition, 100ms transform ease-in-out);
a {
display: block;
position: static;
background-color: $colour-1;
@include font-family(secondary);
line-height: 1.5em;
color: #FFF;
@include before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
}
}
span {
padding: 1em;
height: 3.25em;
display: block;
}
&:hover {
@include _(transform, scale(1.25));
}
}
#select-language:checked ~ label {
@include after {
display: block;
left: 0.25em;
opacity: 1;
}
}
#select-language:checked ~ .selector {
@include _(transform, scale(1));
}
} @else {
display: none;
}
}
}
@include breakpoint(medium) {
h2 {
font-size: 2.25em;
}
p {
font-size: 1.4em;
}
#banner {
figure {
margin: rems(-20) auto rems(2);
}
}
#main {
clear: right;
}
#main-nav {
height: rems(6);
.nav {
width: 80%;
clear: none;
padding-top: rems(1.5);
background-color: transparent;
overflow: visible;
a {
padding: 0;
float: none;
width: auto;
margin: 0 0.5em 0.75em;
font-size: 1em;
color: #666;
background-color: transparent;
@include _(text-shadow, 0 0.125em 0.25em #888);
&:nth-child(n) {
background-color: transparent;
}
&.current {
color: $colour-1;
}
@include after {
content: '';
display: block;
position: absolute;
bottom: -0.1em;
right: 0;
left: 0;
width: 0;
margin: 0 auto;
opacity: 0;
border-bottom: 0.15em solid;
@include _(box-shadow, 0 0.075em 0.15em #888);
@include _(transition, all 250ms ease-in-out);
@include _(transform, none);
}
&:hover,
&:active,
&:focus {
@include after {
opacity: 1;
width: 100%;
}
}
}
}
.actions {
font-size: 2vw;
}
}
#header-title {
min-height: rems(35);
font-size: 1em;
&.short {
font-size: 2em;
min-height: rems(15);
h1 {
position: absolute;
bottom: 0;
text-align: left;
font-size: 2em;
}
@include before {
content: '';
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 1;
@include _(box-shadow, inset 0 -13rem 3em -4rem rgba(0, 0, 0, 0.8));
@include _(transition, opacity 250ms ease-in-out);
}
}
&.no-image {
min-height: 0;
font-size: 2em;
}
svg {
display: block;
}
svg rect {
@include _(animation, banner-load 1s ease-in-out);
}
.title {
text-align: left;
width: 110%;
background-color: rgba(#FFF, 0.5);
@include _(transform, rotate(-$header-tilt) translate3d(0, 0, 0));
@include _(transform-origin, 0 100%);
}
.details {
text-align: right;
color: #000;
}
.background {
display: block;
}
.primary {
padding: 12% 0 0 0.25em;
}
}
#footer {
.github {
bottom: 0.5em;
left: 4em;
float: left;
}
.facebook {
position: absolute;
left: 0.5em;
}
.locale {
position: absolute;
left: 2em;
}
}
}
@include breakpoint(large) {
#banner {
body.fixed-banner & {
position: fixed;
top: 0;
right: 0;
left: $sidebar-width;
z-index: 1;
}
figure {
width: 90%;
}
}
#main-nav {
position: fixed;
width: $sidebar-width;
height: 100%;
@include default-box-shadow(left, 2);
.nav {
text-align: left;
padding-top: rems(9);
width: 100%;
a {
font-size: 1.6em;
margin: 0.75em 1em;
@include _(transition, color 250ms ease-in-out);
&:hover, &:active, &:focus {
color: #333;
@include before {
@include _(opacity, 1)
}
}
}
}
.actions {
position: relative;
top: 0;
right: 0;
font-size: 1em;
}
}
#main {
padding-left: $sidebar-width;
}
#header-title {
&.no-image {
min-height: rems(10);
}
&.short {
min-height: rems(25);
}
&.no-image,
&.short {
h1 {
position: absolute;
bottom: 0;
}
}
}
a.logo {
display: block;
float: none;
font-size: rems(7.5);
padding: 0.2em;
}
.paypal-button {
margin: 4em 2em 0 0;
}
#footer {
position: fixed;
z-index: 1;
bottom: 0;
left: 0;
width: $sidebar-width;
.github {
position: absolute;
border-color: transparent;
max-width: 2.25em;
height: 2.25em;
left: 0.5em;
bottom: 0.333em;
overflow: hidden;
color: transparent;
padding: 0.333em;
line-height: 1.5em;
@include _(transition, all 250ms ease-in-out);
&:hover {
max-width: _calc('100% - 1em', 100%);
color: #333;
border-color: #DDD;
@include default-box-shadow(top, 2, true);
}
.icons {
float: left;
width: 1.5em;
height: 1.5em;
fill: #333;
vertical-align: middle;
position: static;
}
a {
margin: 0 0.5em;
font-size: 0.8em;
font-weight: bold;
color: inherit;
position: static;
&:hover {
text-decoration: underline;
@include after {
display: none;
}
}
}
}
.facebook, .locale {
position: relative;
left: 2.5em;
bottom: 0.25em;
}
}
}
@mixin header-colour($page, $colour) {
body.#{$page} {
#header-title {
background-color: $colour;
rect {
fill: $colour;
}
}
}
}
@include header-colour(about, $colour-4);
@include header-colour(policy, $colour-3);