diff --git a/scss/_blocks.scss b/scss/_blocks.scss new file mode 100644 index 0000000..20bb04a --- /dev/null +++ b/scss/_blocks.scss @@ -0,0 +1,73 @@ +/* =Blocks +-----------------------------------------------------------------------------*/ + +.blocks-2, +.blocks-3, +.blocks-4, +.blocks-5, +.blocks-6 { + padding-left: 0; + list-style: none; + margin-left: -$gridGutterWidth / ($gridWidth / 100) * 1%; + .clearfix { + & li { + height: auto; + float: left; + margin-bottom: $baseLine / $em em; + margin-left: $gridGutterWidth / ($gridWidth / 100) * 1%; + } + } +} + +.blocks-2 > li { @include block(2); } +.blocks-3 > li { @include block(3); } +.blocks-4 > li { @include block(4); } +.blocks-5 > li { @include block(5); } +.blocks-6 > li { @include block(6); } + +.block-first { + clear: both; +} + +/* =Responsive +-----------------------------------------------------------------------------*/ +@media only screen and (max-width: 767px) { + + .blocks-2, + .blocks-3, + .blocks-4, + .blocks-5, + .blocks-6 { + margin-left: 0; + margin-bottom: $baseLine / $em em; + } + + .blocks-2 > li, + .blocks-3 > li, + .blocks-4 > li, + .blocks-5 > li, + .blocks-6 > li { + float: none; + margin-left: 0; + width: 100%; + } + + .blocks-mobile-50 > li, + .blocks-mobile-33 > li { + float: left; + margin-left: $gridGutterWidth / ($gridWidth/100)*1%; + } + .blocks-mobile-33, + .blocks-mobile-50 { + margin-left: -$gridGutterWidth / ($gridWidth/100)*1%; + } + + .blocks-mobile-50 > li { + @include block(2); + } + .blocks-mobile-33 > li { + @include block(3); + } + + +} diff --git a/scss/_buttons.scss b/scss/_buttons.scss new file mode 100644 index 0000000..b258915 --- /dev/null +++ b/scss/_buttons.scss @@ -0,0 +1,170 @@ +/* =Buttons +-----------------------------------------------------------------------------*/ +.btn { + display: inline-block; + vertical-align: top; + + font-family: $controlsFontFamily; + font-size: $baseFontSize + 0px; + font-weight: 400; + + line-height: 1; + + text-align: center; + text-decoration: none; + color: $colorBody; + + margin: 0; + border: none; + border-radius: 3px; + box-shadow: none; + + cursor: pointer; + + background: #eeeded; + padding: 9px 20px; + height: 2.3em; + + &:hover { + color: rgba(0, 0, 0, .5); + background: #dbdada; + } +} +input[type="submit"].btn { + -webkit-appearance: none; +} +.btn-small { + font-size: $buttonsSmallFontSize; + padding: 7px 16px; +} +.btn-outline { + background: none; + border: 1px solid #ddd; + padding: 8px 19px; + &.btn-small { + padding: 6px 15px; + } +} + + +.btn-blue, +.btn-red, +.btn-green, +.btn-black { + color: #fff; + &:hover { + color: rgba(255, 255, 255, .7); + } +} +.btn-white { + background: #fff; + &:hover { background: darken(#fff, 5%); } +} +.btn-white.btn-outline { + background: none; + border-color: rgba(255, 255, 255, .85); + color: rgba(255, 255, 255, .85); + &:hover { + color: rgba(0, 0, 0, .9); + background: #fff; + } +} +.btn-blue { + background: $colorBlue; + &:hover { background: darken($colorBlue, 10%); } +} +.btn-red { + background: $colorRed; + &:hover { background: darken($colorRed, 10%); } +} +.btn-green { + background: $colorGreen; + &:hover { background: darken($colorGreen, 10%); } +} +.btn-yellow { + background: $colorYellow; + color: #000; + &:hover { + background: darken($colorYellow, 17%); + } +} +.btn-black { + background: #000; + &:hover { background: lighten(#000, 20%); } +} + +.btn-active, +.btn[disabled], +.btn-disabled { + border: none; + background: none; + background-color: #dbdada; + color: rgba(0, 0, 0, .5); + &:hover { + color: rgba(0, 0, 0, .5); + } +} +.btn-active { + box-shadow: 0 1px 3px rgba(0, 0, 0, .4) inset; +} +.btn[disabled], +.btn-disabled { + cursor: default; + box-shadow: none; +} + +.btn-blue.btn-active, +.btn-red.btn-active, +.btn-green.btn-active, +.btn-black.btn-active { + box-shadow: 0 1px 3px rgba(0, 0, 0, .7) inset; +} + +.btn-blue.btn-active, +.btn-red.btn-active, +.btn-green.btn-active, +.btn-black.btn-active, +.btn-blue.btn-disabled, +.btn-red.btn-disabled, +.btn-green.btn-disabled, +.btn-black.btn-disabled, +.btn-blue[disabled], +.btn-red[disabled], +.btn-green[disabled], +.btn-black[disabled] { + color: rgba(255, 255, 255, .6); + &:hover { + color: rgba(255, 255, 255, .6); + } +} + +.btn-white.btn-active, +.btn-white.btn-disabled, +.btn-white[disabled] { + background: darken(#fff, 5%); +} +.btn-blue.btn-active, +.btn-blue.btn-disabled, +.btn-blue[disabled] { + background: darken($colorBlue, 10%); +} +.btn-red.btn-active, +.btn-red.btn-disabled, +.btn-red[disabled] { + background: darken($colorRed, 10%); +} +.btn-green.btn-active, +.btn-green.btn-disabled, +.btn-green[disabled] { + background: darken($colorGreen, 10%); +} +.btn-yellow.btn-active, +.btn-yellow.btn-disabled, +.btn-yellow[disabled] { + background: darken($colorYellow, 17%); +} +.btn-black.btn-active, +.btn-black.btn-disabled, +.btn-black[disabled] { + background: lighten(#000, 30%); +} diff --git a/scss/_forms.scss b/scss/_forms.scss new file mode 100644 index 0000000..ce3d60b --- /dev/null +++ b/scss/_forms.scss @@ -0,0 +1,206 @@ +/* =Forms +-----------------------------------------------------------------------------*/ +.forms { + & label { + display: block; + margin-bottom: $fieldsBottom; + } + + & fieldset { + padding-bottom: .5em; + border-radius: 4px; + } + + & input[type="text"], + & input[type="password"], + & input[type="email"], + & input[type="url"], + & input[type="phone"], + & input[type="tel"], + & input[type="number"], + & input[type="datetime"], + & input[type="date"], + & input[type="search"], + & input[type="range"], + & input[type="file"], + & input[type="datetime-local"], + & textarea, + & select { + display: block; + } +} +.forms-inline, +.forms-inline-list { + & input[type="text"], + & input[type="password"], + & input[type="email"], + & input[type="url"], + & input[type="phone"], + & input[type="tel"], + & input[type="number"], + & input[type="datetime"], + & input[type="date"], + & input[type="search"], + & input[type="range"], + & input[type="file"], + & input[type="datetime-local"], + & textarea, + & select { + display: inline-block; + } +} + +.forms-list, +.forms-inline-list { + margin: 0; + padding: 0; + margin-bottom: $fieldsBottom; + list-style: none; +} +.forms-list label, +.forms-inline-list li, +.forms-inline-list li label { + display: inline-block; + margin-bottom: 0; +} +.forms-inline-list li label { + margin-right: $fieldsBottom; +} +.forms-list li { + margin-bottom: 6px; +} +.forms-desc { + margin-top: 4px; + color: rgba(0, 0, 0, .4); + font-size: $smallFontSize; + line-height: 1.4em; +} + + +input[type="radio"], +input[type="checkbox"] { + position: relative; + top: -1px; +} +input[type="text"], +input[type="password"], +input[type="email"], +input[type="url"], +input[type="phone"], +input[type="tel"], +input[type="number"], +input[type="datetime"], +input[type="date"], +input[type="search"], +input[type="datetime-local"], +textarea { + @include transition(border ease .5s); +} +input[type="range"] { + position: relative; + top: 3px; +} +textarea { + line-height: 1.4em; +} +select { + margin-bottom: 0 !important; +} + +/* States */ +.error, +.success { + font-weight: normal; + font-size: $smallFontSize; +} +input.input-error, +textarea.input-error, +select.input-error, +.input-error { + border-color: $colorRed; + box-shadow: 0 0 0 2px rgba(red($colorRed), green($colorRed), blue($colorRed), .3),0 1px 2px rgba(0, 0, 0, .2) inset; +} +input.input-success, +textarea.input-success, +select.input-success, +.input-success { + border-color: $colorGreen; + box-shadow: 0 0 0 2px rgba(red($colorGreen), green($colorGreen), blue($colorGreen), .3),0 1px 2px rgba(0, 0, 0, .2) inset; + +} +input.input-gray, +textarea.input-gray, +select.input-gray, +.input-gray { + border-color: #ccc; + box-shadow: 0 0 0 2px rgba(204, 204, 204, .3),0 1px 2px rgba(0, 0, 0, .2) inset; +} + +input:focus, +textarea:focus { + outline: none; + border-color: #5ca9e4; + box-shadow: 0 0 0 2px rgba(70, 161, 231, .3), 0 1px 2px rgba(0, 0, 0, .2) inset; +} + +input.input-search, +input[type="search"] { + padding-right: 10px; + padding-left: 10px; + margin-bottom: 0; + border-radius: 15px; +} + +/* Append & Prepend */ +.input-groups { + display: table !important; +} +.input-groups input { + width: 100%; +} +.input-groups input, +.input-groups .input-append, +.input-groups .input-prepend, +.input-groups .btn-append { + display: table-cell !important; +} +.input-groups .btn-append, +.input-groups .input-append, +.input-groups .input-prepend { + width: 1%; + vertical-align: middle; +} +.input-groups .input-append, +.input-groups .input-prepend { + background-color: #eee; + border: 1px solid #ccc; + margin: 0; + padding: 0; + color: $colorBody; + line-height: 1; + font-size: 1em; + white-space: nowrap; +} +.input-groups .input-prepend { + border-right: none; +} +.input-groups .input-append { + position: relative; + z-index: 1; + border-left: none; +} +.input-groups .btn-append .btn { + display: block; + height: auto; + border-radius: 0 4px 4px 0; +} + +/* =Mobile (Portrait) +-----------------------------------------------------------------------------*/ +@media only screen and (max-width: 767px) { + + .forms-list label { + display: inline-block; + } + +} diff --git a/scss/_grid.scss b/scss/_grid.scss new file mode 100644 index 0000000..563c317 --- /dev/null +++ b/scss/_grid.scss @@ -0,0 +1,282 @@ +/* =Grid +-----------------------------------------------------------------------------*/ + +.units-container, +.units-row-end, +.units-row { + @extend .clearfix; +} +.units-container { /* it's the trick to not collapse padding-top in the child element */ + padding-top: 1px; + margin-top: -1px; +} +.units-row { + margin-bottom: $baseLine / $em em; + margin-bottom: $baseLine; +} +.units-row-end { + margin-bottom: 0; +} + +.width-100, .unit-100 { width: 100%; } +.width-80, .unit-80 { width: 80%; } +.width-75, .unit-75 { width: 75%; } +.width-70, .unit-70 { width: 70%; } +.width-66, .unit-66 { width: 66.6%; } +.width-65, .unit-65 { width: 65%; } +.width-60, .unit-60 { width: 60%; } +.width-50, .unit-50 { width: 50%; } +.width-40, .unit-40 { width: 40%; } +.width-35, .unit-35 { width: 35%; } +.width-33, .unit-33 { width: 33.3%; } +.width-30, .unit-30 { width: 30%; } +.width-25, .unit-25 { width: 25%; } +.width-20, .unit-20 { width: 20%; } + +input.width-100, +input.unit-100 { width: 98.6%; } +textarea.width-100, +textarea.unit-100 { width: 98.8%; } +select.width-100, +select.unit-100 { width: 99.4%; } + +.units-row .unit-80, +.units-row .unit-75, +.units-row .unit-70, +.units-row .unit-66, +.units-row .unit-65, +.units-row .unit-60, +.units-row .unit-50, +.units-row .unit-40, +.units-row .unit-35, +.units-row .unit-33, +.units-row .unit-30, +.units-row .unit-25, +.units-row .unit-20, +.units-row-end .unit-100, +.units-row-end .unit-80, +.units-row-end .unit-75, +.units-row-end .unit-70, +.units-row-end .unit-66, +.units-row-end .unit-65, +.units-row-end .unit-60, +.units-row-end .unit-50, +.units-row-end .unit-40, +.units-row-end .unit-35, +.units-row-end .unit-33, +.units-row-end .unit-30, +.units-row-end .unit-25, +.units-row-end .unit-20 { + float: left; + margin-left: $gridGutterWidth/($gridWidth/100)*1%; + &:first-child { + margin-left: 0; + } +} +.units-row .unit-80, +.units-row-end .unit-80 { @include columns(4, 5); } +.units-row .unit-75, +.units-row-end .unit-75 { @include columns(3, 4); } +.units-row .unit-70, +.units-row-end .unit-70 { @include columns(7, 10); } +.units-row .unit-66, +.units-row-end .unit-66 { @include columns(2, 3); } +.units-row .unit-65, +.units-row-end .unit-65 { @include columns(2, 3); } +.units-row .unit-60, +.units-row-end .unit-60 { @include columns(3, 5); } +.units-row .unit-50, +.units-row-end .unit-50 { @include column(2); } +.units-row .unit-40, +.units-row-end .unit-40 { @include columns(2, 5); } +.units-row .unit-35, +.units-row-end .unit-35 { @include column(3); } +.units-row .unit-33, +.units-row-end .unit-33 { @include column(3); } +.units-row .unit-30, +.units-row-end .unit-30 { @include columns(3, 10); } +.units-row .unit-25, +.units-row-end .unit-25 { @include column(4); } +.units-row .unit-20, +.units-row-end .unit-20 { @include column(5); } + +.unit-push-80, +.unit-push-75, +.unit-push-70, +.unit-push-66, +.unit-push-65, +.unit-push-60, +.unit-push-50, +.unit-push-40, +.unit-push-35, +.unit-push-33, +.unit-push-30, +.unit-push-25, +.unit-push-20 { + position: relative; +} +.unit-push-30 { @include columns-push(3, 10); } +.unit-push-80 { @include columns-push(4, 5); } +.unit-push-75 { @include columns-push(3, 4); } +.unit-push-70 { @include columns-push(7, 10); } +.unit-push-66 { @include columns-push(2, 3); } +.unit-push-65 { @include columns-push(2, 3); } +.unit-push-60 { @include columns-push(3, 5); } +.unit-push-50 { @include column-push(2); } +.unit-push-40 { @include columns-push(2, 5); } +.unit-push-35 { @include column-push(3); } +.unit-push-33 { @include column-push(3); } +.unit-push-25 { @include column-push(4); } +.unit-push-20 { @include column-push(5); } + +.units-row .unit-push-right, +.units-row-end .unit-push-right { + float: right; +} + +.centered, +.unit-centered { + float: none !important; + margin: 0 auto !important; +} + +.unit-padding { + padding: $baseLine / $em em; +} +.units-padding .unit-100, +.units-padding .unit-80, +.units-padding .unit-75, +.units-padding .unit-70, +.units-padding .unit-66, +.units-padding .unit-65, +.units-padding .unit-60, +.units-padding .unit-50, +.units-padding .unit-40, +.units-padding .unit-35, +.units-padding .unit-33, +.units-padding .unit-30, +.units-padding .unit-25, +.units-padding .unit-20 { + padding: $baseLine / $em em; +} + +.units-split .unit-80, +.units-split .unit-75, +.units-split .unit-70, +.units-split .unit-66, +.units-split .unit-65, +.units-split .unit-60, +.units-split .unit-50, +.units-split .unit-40, +.units-split .unit-35, +.units-split .unit-33, +.units-split .unit-30, +.units-split .unit-25, +.units-split .unit-20 { + margin-left: 0; +} +.units-split .unit-80 { width: 80%; } +.units-split .unit-75 { width: 75%; } +.units-split .unit-70 { width: 70%; } +.units-split .unit-66 { width: 66.6%; } +.units-split .unit-65 { width: 65%; } +.units-split .unit-60 { width: 60%; } +.units-split .unit-50 { width: 50%; } +.units-split .unit-40 { width: 40%; } +.units-split .unit-35 { width: 35%; } +.units-split .unit-33 { width: 33.3%; } +.units-split .unit-30 { width: 30%; } +.units-split .unit-25 { width: 25%; } +.units-split .unit-20 { width: 20%; } + + +/* =Responsive +-----------------------------------------------------------------------------*/ +@media only screen and (max-width: 767px) { + + .units-row .unit-80, + .units-row .unit-75, + .units-row .unit-70, + .units-row .unit-66, + .units-row .unit-65, + .units-row .unit-60, + .units-row .unit-50, + .units-row .unit-40, + .units-row .unit-35, + .units-row .unit-33, + .units-row .unit-30, + .units-row .unit-25, + .units-row .unit-20, + .units-row-end .unit-80, + .units-row-end .unit-75, + .units-row-end .unit-70, + .units-row-end .unit-66, + .units-row-end .unit-65, + .units-row-end .unit-60, + .units-row-end .unit-50, + .units-row-end .unit-40, + .units-row-end .unit-35, + .units-row-end .unit-33, + .units-row-end .unit-30, + .units-row-end .unit-25, + .units-row-end .unit-20 { + width: 100%; + float: none; + margin-left: 0; + margin-bottom: $baseLine/$em em; + } + + .unit-push-80, + .unit-push-75, + .unit-push-70, + .unit-push-66, + .unit-push-65, + .unit-push-60, + .unit-push-50, + .unit-push-40, + .unit-push-35, + .unit-push-33, + .unit-push-30, + .unit-push-25, + .unit-push-20 { + left: 0; + } + + .units-row-end .unit-push-right, + .units-row .unit-push-right { + float: none; + } + + .units-mobile-50 .unit-80, + .units-mobile-50 .unit-75, + .units-mobile-50 .unit-70, + .units-mobile-50 .unit-66, + .units-mobile-50 .unit-65, + .units-mobile-50 .unit-60, + .units-mobile-50 .unit-40, + .units-mobile-50 .unit-30, + .units-mobile-50 .unit-35, + .units-mobile-50 .unit-33, + .units-mobile-50 .unit-25, + .units-mobile-50 .unit-20 { + float: left; + margin-left: $gridGutterWidth/($gridWidth/100)*1%; + @include column(2); + } + .units-mobile-50 .unit-80:first-child, + .units-mobile-50 .unit-75:first-child, + .units-mobile-50 .unit-70:first-child, + .units-mobile-50 .unit-66:first-child, + .units-mobile-50 .unit-65:first-child, + .units-mobile-50 .unit-60:first-child, + .units-mobile-50 .unit-40:first-child, + .units-mobile-50 .unit-35:first-child, + .units-mobile-50 .unit-30:first-child, + .units-mobile-50 .unit-33:first-child, + .units-mobile-50 .unit-25:first-child, + .units-mobile-50 .unit-20:first-child { + margin-left: 0; + } + + +} diff --git a/scss/_helpers.scss b/scss/_helpers.scss new file mode 100644 index 0000000..1bd5b41 --- /dev/null +++ b/scss/_helpers.scss @@ -0,0 +1,92 @@ +/* =Helpers +-----------------------------------------------------------------------------*/ +.group { + @include clearfix; +} +.small { + font-size: $smallFontSize; +} +.nowrap, +.nowrap td { + white-space: nowrap; +} +.req, +.required { + font-weight: normal; + color: $colorRed; +} +.color-gray { + color: #777; +} +.color-gray-light { + color: #999; +} +.color-black { + color: #000; +} +.color-red, +.error { + color: $colorRed; +} +.color-green, +.success { + color: $colorGreen; +} +.text-centered { + text-align: center; +} +.text-right { + text-align: right; +} +.last { + margin-right: 0 !important; +} +.pause { + margin-bottom: $baseLineHeight/2 + 0em !important; +} +.end { + margin-bottom: 0 !important; +} +.normal { + font-weight: normal; +} +.bold { + font-weight: bold; +} +.italic { + font-style: italic; +} +.left { + float: left; +} +.right { + float: right; +} + + +/* Responsive embedded objects */ +.video-wrapper { + height: 0; + padding-bottom: 56.25%; // ratio 16:9 + position: relative; + margin-bottom: $baseLineInEms; + & iframe, + & object, + & embed { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 100%; + } +} + + +/* =Responsive +-----------------------------------------------------------------------------*/ +@media only screen and (max-width: 767px) { + .left, + .right { + float: none; + } +} diff --git a/scss/_mixins.scss b/scss/_mixins.scss new file mode 100644 index 0000000..79cb2a3 --- /dev/null +++ b/scss/_mixins.scss @@ -0,0 +1,187 @@ +@mixin clearfix { + &:after { + content: ""; + display: table; + clear: both; + } +} +@mixin btn-color($color, $darken: 10%) { + background: $color; + &:hover { + background: darken($color, $darken); + } +} +@mixin opacity($opacity: 100) { + filter: alpha(opacity=$opacity); + -moz-opacity: $opacity / 100; + opacity: $opacity / 100; +} +@mixin selection($r, $g, $b) { + ::selection { background: rgb($r, $g, $b); } + ::-moz-selection { background: rgb($r, $g, $b); } + img::selection { background: transparent; } + img::-moz-selection { background: transparent; } +} +@mixin box-sizing($box-model) { + -webkit-box-sizing: $box-model; + -moz-box-sizing: $box-model; + box-sizing: $box-model; +} +@mixin vertical-align { + position: relative; + top: 50%; + -webkit-transform: translateY(-50%); + -ms-transform: translateY(-50%); + transform: translateY(-50%); +} +@mixin gradient($start: #555, $end: #333) { + background-color: mix($start, $end, 60%); + background-image: -moz-linear-gradient(top, $start, $end); // FF 3.6+ + background-image: -ms-linear-gradient(top, $start, $end); // IE10 + background-image: -webkit-gradient(linear, 0 0, 0 100%, from($start), to($end)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(top, $start, $end); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(top, $start, $end); // Opera 11.10 + background-image: linear-gradient(top, $start, $end); // The standard + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=$start, endColorstr=$end, GradientType=0); // IE9 and down +} +@mixin border-top-radius($radius) { + border-top-right-radius: $radius; + border-top-left-radius: $radius; +} +@mixin border-right-radius($radius) { + border-bottom-right-radius: $radius; + border-top-right-radius: $radius; +} +@mixin border-bottom-radius($radius) { + border-bottom-right-radius: $radius; + border-bottom-left-radius: $radius; +} +@mixin border-left-radius($radius) { + border-bottom-left-radius: $radius; + border-top-left-radius: $radius; +} +@mixin bordered($top-color: #eee, $right-color: #eee, $bottom-color: #eee, $left-color: #eee) { + border-top: 1px solid $top-color; + border-right: 1px solid $right-color; + border-bottom: 1px solid $bottom-color; + border-left: 1px solid $left-color; +} +@mixin retina-image($path, $w: auto, $h: auto) { + background-image: url($path); + + $at2x_path: '${path}.replace(/\.\w+$/, function(match) { return "@2x" + match; })'; //SaSS + + @media + only screen and (-webkit-min-device-pixel-ratio: 2), + only screen and ( min--moz-device-pixel-ratio: 2), + only screen and ( -o-min-device-pixel-ratio: 2/1), + only screen and ( min-device-pixel-ratio: 2), + only screen and ( min-resolution: 192dpi), + only screen and ( min-resolution: 2dppx) { + background-image: url($at2x_path); + background-size: $w $h; + } +} +@mixin transition($transition: all linear .2s) { + -moz-transition: $transition; + transition: $transition; +} +@mixin blur($radius) { + -webkit-filter: blur($radius); + -moz-filter: blur($radius); + -ms-filter: blur($radius); + filter: blur($radius); +} +@mixin arrow-top($color: #fff, $size: 5px, $left: 5px) { + &:after { + bottom: 100%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-bottom-color: $color; + border-width: $size; + left: $left; + } +} +@mixin arrow-bottom($color: #fff, $size: 5px, $left: 5px) { + &:after { + top: 100%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-top-color: $color; + border-width: $size; + left: $left; + } +} +@mixin arrow-left($color: #fff, $size: 5px, $top: 5px) { + &:after { + right: 100%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-right-color: $color; + border-width: $size; + top: $top; + } +} +@mixin arrow-right($color: #fff, $size: 5px, $top: 5px) { + &:after { + left: 100%; + border: solid transparent; + content: " "; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + border-left-color: $color; + border-width: $size; + top: $top; + } +} +@mixin close($r: 0, $g: 0, $b: 0) { + padding: 4px 6px; + line-height: 1; + font-size: 18px; + cursor: pointer; + color: rgba($r, $g, $b, 1); + text-decoration: none; + &.opacity { + @include opacity(50); + } + &:before { + content: '\00D7'; + } + &:hover { + @include opacity(100); + } +} +// Grid +@mixin block($num) { + width: (($gridWidth - ($gridGutterWidth * $num)) / $num / ($gridWidth / 100)) * 1%; +} + +@mixin column($num) { + width: (($gridWidth - ($gridGutterWidth * ($num - 1))) / $num / ($gridWidth / 100)) * 1%; +} + +@mixin columns($factor, $num) { + width: ((($gridWidth - ($gridGutterWidth * ($num - 1))) / $num / ($gridWidth / 100)) * $factor) + (($gridGutterWidth / ($gridWidth / 100)) * ($factor - 1)) * 1%; +} + +@mixin column-push($num) { + left: ((($gridWidth - ($gridGutterWidth * ($num - 1))) / $num / ($gridWidth / 100)) + $gridGutterWidth/($gridWidth/100)) * 1%; +} + +@mixin columns-push($factor, $num) { + left: (((($gridWidth - ($gridGutterWidth * ($num - 1))) / $num / ($gridWidth / 100)) * $factor) + (($gridGutterWidth / ($gridWidth / 100)) * ($factor - 1)) + $gridGutterWidth/($gridWidth/100)) * 1%; +} diff --git a/scss/_navigation.scss b/scss/_navigation.scss new file mode 100644 index 0000000..17d38f0 --- /dev/null +++ b/scss/_navigation.scss @@ -0,0 +1,244 @@ +/* =Navs +-----------------------------------------------------------------------------*/ + +/* NavBar */ +.navbar { + margin-bottom: $baseLineInEms; + @include clearfix; +} +.navbar-left { + float: left; +} +.navbar-right { + float: right; +} +.navbar ul { + list-style: none; + margin: 0; + @include clearfix; +} +.navbar ul li { + float: left; + margin-right: $baseLineInEms; +} +.navbar-right ul li { + margin-right: 0; + margin-left: $baseLineInEms; +} +.navbar ul li a, +.navbar ul li span { + display: block; + text-decoration: none; +} +.navbar ul li a:hover { + color: $colorLinkHover; +} +.navbar ul li.active a, +.navbar ul li span { + text-decoration: none; + cursor: text; + color: rgba(0, 0, 0, .4); +} + + +/* Fullwidth */ +.fullwidth ul { + width: 100%; +} +.fullwidth li { + float: none !important; + margin: 0; + display: table-cell; + width: 1%; + text-align: center; +} +.fullwidth li a, +.fullwidth li span { + display: block; +} + + +/* Vertical */ +.nav { + margin-bottom: $baseLineInEms; +} +.nav ul { + list-style: none; + margin: 0; +} +.nav ul li ul { + margin-left: 2em; + font-size: .95em; +} +.nav ul li a, +.nav ul li span { + display: block; + padding: 5px 0; +} +.nav ul li ul li a, +.nav ul li ul li span { + padding: 4px 0; +} +.nav ul li a { + text-decoration: none; +} +.nav ul li a:hover { + color: $colorLinkHover; + text-decoration: underline; +} +.nav ul li.active a, +.nav ul li span { + text-decoration: none; + cursor: text; + color: rgba(0, 0, 0, .4); +} + +/* Stroked */ +.nav-stroked li { + border-bottom: 1px solid #eee; +} +.nav-stroked li:last-child { + border-bottom: none; +} + +/* Stacked */ +.nav-stacked ul { + border: 1px solid #eee; + border-bottom: 0; +} +.nav-stacked ul li { + border-bottom: 1px solid #eee; +} +.nav-stacked ul li a, +.nav-stacked ul li span { + padding: 5px 10px; +} +.nav-stacked ul li a:hover { + background-color: #f5f5f5; +} + +/* Stats */ +.nav-stats li { + position: relative; +} +.nav-stats li a, +.nav-stats li span { + padding-right: 50px; +} +.nav-stats sup { + position: absolute; + top: 50%; + right: 0; + color: rgba(0, 0, 0, .4); +} +.nav-stats.nav-stacked sup { + right: .5em; +} + + +/* Breadcrumbs */ +.breadcrumbs { + margin-bottom: $baseLineInEms; + @include clearfix; +} +.breadcrumbs ul { + font-size: .9em; + color: rgba(0, 0, 0, .4); + list-style: none; + margin: 0; + @include clearfix; +} +.breadcrumbs ul li { + float: left; + margin-right: 3px; +} +.breadcrumbs li + li:before { + content: " > "; + color: #aaa; + font-size: 12px; + margin: 0 3px; + position: relative; + top: -1px; +} +.breadcrumbs-sections li + li:before { + content: " | "; + top: 0; +} +.breadcrumbs-path li + li:before { + content: " / "; + top: 0; +} +.breadcrumbs ul li a { + color: $colorBlack; + text-decoration: none; +} +.breadcrumbs ul li.active a { + text-decoration: none; + cursor: text; + color: rgba(0, 0, 0, .4); +} +.breadcrumbs ul li a:hover { + color: $colorBlack; + text-decoration: underline; +} + +/* =Pagination +-----------------------------------------------------------------------------*/ +.pagination { + position: relative; + left: -9px; + margin-left: 0; + list-style: none; + @include clearfix; +} +.pagination li { + float: left; + margin-right: 2px; +} +.pagination li a, +.pagination li span { + display: block; + padding: 7px 9px; + line-height: 1; + border-radius: 3px; + color: $colorBlack; + text-decoration: none; +} +.pagination span { + border: 1px solid #ddd; +} +.pagination li a:focus, +.pagination li a:hover { + text-decoration: none; + background-color: $colorBlack; + color: #fff; +} + +/* =Responsive +-----------------------------------------------------------------------------*/ +@media only screen and (max-width: 767px) { + .navbar-left, + .navbar-right, + .navbar ul li, + .navbar-right ul li, + .subnav-right ul, + .subnav ul li, + .subnav-right ul li { + float: none; + text-align: center; + } + .navbar ul li, + .navbar-right ul li, + .subnav ul li, + .subnav-right ul li { + margin-left: 0; + margin-right: 0; + } + .fullwidth ul { + width: auto; + } + .fullwidth li { + display: block; + width: auto; + } +} diff --git a/scss/_normalize.scss b/scss/_normalize.scss new file mode 100644 index 0000000..eeecb62 --- /dev/null +++ b/scss/_normalize.scss @@ -0,0 +1,225 @@ +/* =Normalize +-----------------------------------------------------------------------------*/ +*, +*:before, +*:after { + @include box-sizing(border-box); +} +html { + font-family: sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} +html, +body, +div, +span, +object, +iframe, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +em, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +ol, +ul, +li, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video, +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0; + padding: 0; + border: 0; + outline: 0; + font-size: 100%; + vertical-align: baseline; + background: transparent; +} +a:active, +a:hover { + outline: 0; +} +button, +input { + line-height: normal; +} +button, +select { + text-transform: none; +} +/* Structure tags */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +main, +nav, +section, +summary { + display: block; +} +audio, +canvas, +video { + display: inline-block; +} +audio:not([controls]) { + display: none; + height: 0; +} +/* To prevent some browsers from inserting quotes on q and p */ +blockquote, +q { + quotes: none; +} +blockquote p:before, +blockquote p:after, +q:before, +q:after { + content: ''; + content: none; +} +/* Table reset */ +table { + border-collapse: collapse; + border-spacing: 0; +} +caption, +th, +td { + text-align: left; + vertical-align: top; + font-weight: normal; +} +thead th, +thead td { + font-weight: bold; + vertical-align: bottom; +} +/* Image inside */ +a img, +th img, +td img { + vertical-align: top; +} +button, +input, +select, +textarea { + margin: 0; +} +textarea { + overflow: auto; + vertical-align: top; + resize: vertical; +} +/* Normalize buttons in IE */ +button { + width: auto; + overflow: visible; +} +/* Hand cursor on clickable controls */ +input[type=button], +input[type=submit], +button { + cursor: pointer; +} +/* Trick with vertical align for radio and checkbox */ +input[type="radio"], +input[type="checkbox"] { + font-size: 110%; + position: relative; + top: -1px; +} +/* Normalize search fields */ +input[type="search"] { + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +hr { + display: block; + height: 1px; + border: 0; + border-top: 1px solid #ddd; +} +/* Responsive media */ +img, +video { + max-width: 100%; + height: auto; +} +img { + -ms-interpolation-mode: bicubic; +} +audio { + width: 100%; +} diff --git a/scss/_prettyprint.scss b/scss/_prettyprint.scss new file mode 100644 index 0000000..466d06f --- /dev/null +++ b/scss/_prettyprint.scss @@ -0,0 +1,69 @@ +/* string content */ +.str { + color: #dd1144; +} + +/* a keyword */ +.kwd { + color: #333333; +} + +/* a comment */ +.com { + color: #999988; +} + +/* a type name */ +.typ { + color: #445588; +} + +/* a literal value */ +.lit { + color: #445588; +} + +/* punctuation */ +.pun { + color: #888; +} + +/* lisp open bracket */ +.opn { + color: #333333; +} + +/* lisp close bracket */ +.clo { + color: #333333; +} + +/* a markup tag name */ +.tag { + color: #367ac3; +} + +/* a markup attribute name */ +.atn { + color: #51a7c9; +} + +/* a markup attribute value */ +.atv { + color: #709c1a; +} + +/* a declaration */ +.dec { + color: #666; +} + +/* a variable name */ +.var { + color: teal; +} + +/* a function name */ +.fun { + color: #990000; +} \ No newline at end of file diff --git a/scss/_tables.scss b/scss/_tables.scss new file mode 100644 index 0000000..0b6a7d3 --- /dev/null +++ b/scss/_tables.scss @@ -0,0 +1,40 @@ +/* =Tables +-----------------------------------------------------------------------------*/ +table.table-bordered td, +table.table-bordered th { + border: 1px solid #ddd; +} +table.table-simple td, +table.table-simple th { + border: none; + padding-left: 0; +} +table.table-flat td, +table.table-flat th { + border: none; + padding: 0; +} +table.table-striped tbody tr:nth-child(odd) td { + background-color: #f8f8f8; +} + +/* Responsive Tables */ +.table-container { + width: 100%; + overflow: auto; + margin-bottom: $baseLineInEms; + & table { + margin-bottom: 0; + } + &::-webkit-scrollbar { + -webkit-appearance: none; + width: 14px; + height: 14px; + } + &::-webkit-scrollbar-thumb { + border-radius: 8px; + border: 3px solid #fff; + background-color: rgba(0, 0, 0, .3); + } +} + diff --git a/scss/_typography.scss b/scss/_typography.scss new file mode 100644 index 0000000..d9fefe6 --- /dev/null +++ b/scss/_typography.scss @@ -0,0 +1,324 @@ +/* =Typography +-----------------------------------------------------------------------------*/ +body { + background: $backgroundBody; + color: $colorBody; + font-size: $baseFontSize + 0px; + line-height: $baseLineInEms; + font-family: $baseFontFamily; +} +a { + color: $colorLink; + &:focus, + &:hover { + color: $colorLinkHover; + } +} +.title, +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: $headingsFontFamily; + font-weight: bold; + color: $colorHeadings; + text-rendering: optimizeLegibility; +} +h1 { + font-size: $h1FontSize; + line-height: 1.111em; + margin-bottom: .25em; +} +h2 { + font-size: $h2FontSize; + line-height: 1.111em; + margin-bottom: .5em; +} +h3 { + font-size: $h3FontSize; + line-height: 1.333em; + margin-bottom: .5em; +} +h4 { + font-size: $h4FontSize; + line-height: 1.5em; + margin-bottom: .333em; +} +h5 { + font-size: $h5FontSize; + line-height: $baseLineInEms; + margin-bottom: .25em; +} +h6 { + font-size: $h6FontSize; + text-transform: uppercase; + line-height: $baseLineInEms; + margin-bottom: .25em; +} + +/* =Subheading +-----------------------------------------------------------------------------*/ +hgroup h1:first-child, +hgroup h2:first-child, +hgroup h3:first-child, +hgroup h4:first-child, +hgroup h5:first-child, { + margin-bottom: 0; +} +h1.subheading, +h2.subheading, +h3.subheading, +h4.subheading, +h5.subheading { + font-weight: 300; +} +h1.subheading { + font-size: $h1SubheadingFontSize; +} +h2.subheading { + font-size: $h2SubheadingFontSize; +} +h3.subheading { + font-size: $h3SubheadingFontSize; +} +h4.subheading { + font-size: $h4SubheadingFontSize; +} +h5.subheading { + font-size: $h5SubheadingFontSize; +} + +/* =Lead +-----------------------------------------------------------------------------*/ +.lead { + font-size: $leadFontSize; + font-weight: 300; + line-height: 1.4em; + margin-bottom: .75em; +} +p, +ul, +ol, +dl, +dd, +dt, +blockquote, +td, +th { + line-height: $baseLineInEms; +} +ul, +ol, +ul ul, +ol ol, +ul ol, +ol ul { + margin: 0 0 0 $baseLineInEms; +} +ol ol li { + list-style-type: lower-alpha; +} +ol ol ol li { + list-style-type: lower-roman; +} +p, +ul, +ol, +dl, +blockquote, +hr, +pre, +table, +form, +fieldset, +figure, +address { + margin-bottom: $baseLineInEms; +} +address { + font-style: normal; +} +dl dt { + font-weight: 500; +} +dd { + margin-left: 1em; +} +blockquote { + font-size: $quoteFontSize; + font-style: italic; + position: relative; + padding-left: $baseLineInEms; + margin-left: 0; + border-left: 2px solid #dbdada; + & p { + margin-bottom: .5em; + } +} +blockquote small, +cite { + color: #777; + font-style: italic; +} +small, +blockquote cite { + font-size: $smallFontSize; + line-height: 1; +} +del { + text-decoration: line-through; +} +abbr[title], +dfn[title] { + border-bottom: 1px dotted #000; + cursor: help; +} +strong, +b { + font-weight: bold; +} +em, +i { + font-style: italic; +} +sub, +sup { + font-size: $superSmallFontSize; + line-height: 0; + position: relative; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +figcaption { + font-size: $smallFontSize; + font-style: italic; +} +ins, +mark { + background-color: $colorYellow; + color: $colorBlack; + text-decoration: none; +} +pre, +code, +kbd, +samp { + font-size: 90%; + font-family: $codeFontFamily; +} +pre { + font-size: 90%; + line-height: 1.45em; + color: $colorBody; + background: #f6f6f6; + padding: $baseLineInEms; + overflow: auto; +} +code { + padding: 3px 3px 1px 3px; + display: inline-block; + line-height: 1; + background: #f6f6f6; + border: 1px solid #ddd; +} +pre code { + font-size: 100%; + border: none; + padding: 0; + background: none; + line-height: $baseLineInEms; +} +kbd { + padding: 2px 6px 1px 6px; + line-height: 1; + display: inline-block; + border-radius: .3em; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2), 0 0 0 1px white inset; + background-color: #fafafa; + border: 1px solid #ccc; + color: $colorBody; + font-weight: normal; + white-space: nowrap; +} +button:active, +button:focus { + outline: none; +} +input[type="text"], +input[type="password"], +input[type="email"], +input[type="url"], +input[type="phone"], +input[type="tel"], +input[type="number"], +input[type="datetime"], +input[type="date"], +input[type="search"], +input[type="datetime-local"], +textarea, +select[multiple="multiple"] { + font-family: $controlsFontFamily; + line-height: 1; + font-size: $baseFontSize + 0px; + border-radius: 0; + background: #fff; + box-shadow: none; + border: 1px solid #bbbcc0; + outline: none; + padding: 7px 5px; + position: relative; + z-index: 2; + -webkit-appearance: none; +} +input[type="text"], +input[type="password"], +input[type="email"], +input[type="url"], +input[type="phone"], +input[type="tel"], +input[type="number"], +input[type="datetime"], +input[type="date"], +input[type="search"], +input[type="datetime-local"] { + height: 2.3em; +} +input[type="range"] { + position: relative; + top: 3px; +} +select[multiple="multiple"], +textarea { + line-height: 1.35em; +} +fieldset { + padding: $baseLineInEms; + margin-bottom: $baseLineInEms; + border: 1px solid #dbdada; +} +legend { + font-weight: bold; + padding: 0 1em; + margin-left: -1em; +} +tfoot th, +tfoot td { + background-color: #f4f4f4; +} +th, +td { + border-bottom: 1px solid #eee; + padding: 8px 10px; +} +table caption { + text-transform: uppercase; + padding: 0 1em; + color: #777; + font-size: $smallFontSize; +} diff --git a/scss/_variables.scss b/scss/_variables.scss new file mode 100644 index 0000000..81162bb --- /dev/null +++ b/scss/_variables.scss @@ -0,0 +1,62 @@ +// Font +$baseFontFamily: "Helvetica Neue", Helvetica, Arial, sans-serif; +$headingsFontFamily: $baseFontFamily; +$controlsFontFamily: $baseFontFamily; +$codeFontFamily: Menlo, Monaco, Consolas, "Courier New", monospace; + +// Base color +$backgroundBody: #fff; +$colorBody: #333; +$colorHeadings: #222; + +// Grid +$gridWidth: 1000; +$gridGutterWidth: 30; + +// Type +$baseFontSize: 14; +$baseLineHeight: 1.6; +$baseLine: $baseFontSize * $baseLineHeight; + +// Util +$em: $baseFontSize; // outputting ems, e.g. 14 / $em + +$baseLineInEms: $baseLine / $em em; + +// Heading +$h1FontSize: $baseFontSize + 22px; // 36px +$h2FontSize: $baseFontSize + 16px; // 30px +$h3FontSize: $baseFontSize + 10px; // 24px +$h4FontSize: $baseFontSize + 4px; // 18px +$h5FontSize: $baseFontSize + 0px; // 14px +$h6FontSize: $baseFontSize - 2px; // 12px + +$h1SubheadingFontSize: $baseFontSize + 16px; // 30px +$h2SubheadingFontSize: $baseFontSize + 10px; // 24px +$h3SubheadingFontSize: $baseFontSize + 4px; // 18px +$h4SubheadingFontSize: $baseFontSize + 0px; // 14px +$h5SubheadingFontSize: $baseFontSize - 2px; // 12px + +// Font size +$superSmallFontSize: $baseFontSize - 4px; // 10px +$smallFontSize: $baseFontSize - 2px; // 12px +$leadFontSize: $baseFontSize + 4px; // 18px +$bigFontSize: $baseFontSize + 4px; // 18px +$quoteFontSize: $baseFontSize + 2px; // 16px +$buttonsSmallFontSize: $baseFontSize - 3px; // 11px + +// Colors +$colorBlack: #0f0f0f; +$colorBlue: #3d58a8; +$colorRed: #d70a16; +$colorGreen: #159776; +$colorYellow: #fddc43; + +// LinkColor +$colorLink: #3570c3; +$colorLinkHover: $colorRed; + +// Forms +$fieldsBottom: 1em; + + diff --git a/scss/kube.scss b/scss/kube.scss new file mode 100644 index 0000000..fbbc54a --- /dev/null +++ b/scss/kube.scss @@ -0,0 +1,18 @@ +@import "_mixins.scss"; +@import "_variables.scss"; + +@import "_normalize.scss"; +@import "_typography.scss"; + +@import "_grid.scss"; +@import "_blocks.scss"; + +@import "_navigation.scss"; + +@import "_tables.scss"; +@import "_forms.scss"; + +@import "_buttons.scss"; + +@import "_helpers.scss"; +@import "_prettyprint.scss";