packer-cn/website/source/assets/stylesheets/_helpers.scss

183 lines
3.5 KiB
SCSS
Raw Normal View History

/* variables */
//color
$black: #000;
$white: #fff;
$red: #ff0000;
$green: #7bc6b1;
$orange: #f2826a;
$background: #f2eee5;
$dark-background: #333;
$gray-dark: #5c5c5c;
$gray-mid: #b2b2b2;
$gray-light: #e0e0e0;
$border-dark: #333;
// base measures
$baseline: 20px;
$base-font-size: 16px;
$base-line-height: 20px;
$button-height: 60px;
2013-06-20 20:46:51 -04:00
.center {
2014-10-20 13:55:50 -04:00
margin: 0 auto;
2013-06-20 20:46:51 -04:00
}
.padded-lg {padding: ($baseline * 2) 0;}
.padded {padding: ($baseline * 2) 0;}
.padded-sm {padding: ($baseline) 0;}
// components
$nav-height: 100px;
$hero-height: 460px;
2013-06-21 01:41:43 -04:00
$docs-top-margin: 40px;
$sidebar-background-color: $dark-background;
2013-06-20 21:35:02 -04:00
$sidebar-width: 250px;
//typography
2013-06-21 01:46:33 -04:00
$serif: 'myriad-pro', helvetica, Georgia, serif;
$sans: 'HeimatStencil-SemiBold', 'Avenir', 'Helvetica Neue', Helvetica, Arial, sans-serif;
$mono: 'Inconsolata', 'courier new', courier, mono-space;
2014-10-20 13:55:50 -04:00
.serif { font-family: $serif; }
.sans { font-family: $sans; }
.mono { font-family: $mono; }
2014-10-20 13:55:50 -04:00
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }
2014-10-20 13:55:50 -04:00
.text-green { color: $green; }
2014-10-20 13:55:50 -04:00
.uppercase { text-transform: uppercase !important; }
@font-face {
font-family: 'HeimatStencil-SemiBold';
2014-10-06 20:34:44 -04:00
src: font-url('2772B2_0_0.eot');
src: font-url('2772B2_0_0.woff') format('woff'),
font-url('2772B2_0_0.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
//color
.dark-background {
2014-10-20 13:55:50 -04:00
background-color: #000;
color: $white;
2015-07-22 21:09:32 -04:00
a {
2014-10-20 13:55:50 -04:00
color: inherit;
&:hover {
2015-07-22 21:09:32 -04:00
color: $green;
}
2014-10-20 13:55:50 -04:00
2015-07-22 21:09:32 -04:00
&:active {
color: darken($green, 30%);
}
}
}
.white-background {
2014-10-20 13:55:50 -04:00
background-color: $white;
}
//elements
.divider {
2014-10-20 13:55:50 -04:00
background: image-url('divider.png') no-repeat center bottom;
height: 70px;
width: 70px;
background-size: 70px 70px;
display: table-cell;
text-align: center;
vertical-align: middle;
}
.packer {
2014-10-20 13:55:50 -04:00
color: $orange;
font-size: 20px;
2015-07-22 21:09:32 -04:00
a:hover, a:active, a:visited {
2014-10-20 13:55:50 -04:00
color: inherit;
2015-07-22 21:09:32 -04:00
}
}
// media queries
$break-sm: 480px;
$break-med: 768px;
$break-max: 1200px;
$break-lg: 980px;
@mixin respond-to($media) {
@if $media == mobile {
@media only screen and (max-width: $break-sm) { @content; }
}
@else if $media == tablet {
@media only screen and (max-width: $break-med - 1) { @content; }
}
@else if $media == desktop {
@media only screen and (min-width: $break-med) and (max-width: $break-lg - 1) { @content; }
}
@else if $media == desktop-lg {
@media only screen and (min-width: $break-max) { @content; }
}
}
/*
* example *
.profile-pic {
@include respond-to(mobile) { width: 100% ;}
@include respond-to(tablet) { width: 125px; }
}
*/
//////
/* utlities */
.d {
2014-10-20 13:55:50 -04:00
border-bottom: 1px solid $red;
border-top: 1px solid $red;
background-color: transparentize($red, .9);
}
.hyphenate {
2014-10-20 13:55:50 -04:00
-webkit-hyphens: auto;
-moz-hyphens: auto;
hyphens: auto;
}
.full-width {
2014-10-20 13:55:50 -04:00
margin-right: -20px;
margin-left: -20px;
}
.add-transition {
2014-10-20 13:55:50 -04:00
-webkit-transition: all .1s ease-in-out;
-moz-transition: all .1s ease-in-out;
-o-transition: all .1s ease-in-out;
transition: all .1s ease-in-out;
}
@mixin opacity($opacity) {
2014-10-20 13:55:50 -04:00
-khtml-opacity: $opacity;
-moz-opacity: $opacity;
opacity: $opacity;
}
@mixin transform-scale($value) {
2014-10-20 13:55:50 -04:00
-webkit-transform: scale($value);
2015-07-22 21:09:32 -04:00
-moz-transform: scale($value);
transform: scale($value);
}
@mixin rounded($radius) {
2014-10-20 13:55:50 -04:00
-webkit-border-radius: $radius;
-moz-border-radius: $radius;
-khtml-border-radius: $radius;
border-radius: $radius;
}