2015-02-25 19:25:20 +00:00
|
|
|
@mixin absPosDefault($offset: 0px, $overflowHidden: hidden) {
|
|
|
|
overflow: $overflowHidden;
|
|
|
|
position: absolute;
|
|
|
|
top: $offset; right: $offset; bottom: $offset; left: $offset;
|
|
|
|
width: auto; height: auto;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin trans-prop-nice-fade($t: 0.5s) {
|
2015-02-26 02:17:11 +00:00
|
|
|
@if $t == 0 {
|
|
|
|
@include transition-property(none);
|
|
|
|
} @else {
|
|
|
|
@include transition-property(visibility, opacity, background-color, border-color);
|
|
|
|
@include transition-duration($t);
|
|
|
|
@include transition-timing-function(ease-in-out);
|
|
|
|
}
|
2015-02-25 19:25:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@mixin trans-prop-nice-resize-h($t: 0.5s) {
|
2014-12-31 18:43:01 +00:00
|
|
|
@include transition-property(height, bottom, top);
|
2015-02-25 19:25:20 +00:00
|
|
|
@include transition-duration($t);
|
2014-12-31 18:43:01 +00:00
|
|
|
@include transition-timing-function(ease-in-out);
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin triangle-right($size, $color) {
|
|
|
|
$size: $size/2;
|
|
|
|
$ratio: 1;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
border-top: $size/$ratio solid transparent;
|
|
|
|
border-left: $size solid $color;
|
|
|
|
border-bottom: $size/$ratio solid transparent;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin triangle-down($size, $color) {
|
|
|
|
$size: $size/2;
|
|
|
|
$ratio: 1;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
|
|
|
border-left: $size/$ratio solid transparent;
|
|
|
|
border-top: $size solid $color;
|
|
|
|
border-right: $size/$ratio solid transparent;
|
|
|
|
}
|
|
|
|
|
2015-02-25 19:25:20 +00:00
|
|
|
@mixin bgDiagonalStripes($c: yellow, $a: 0.1, $d: 40px) {
|
|
|
|
@include background-image(linear-gradient(-45deg,
|
|
|
|
rgba($c, $a) 25%, transparent 25%,
|
|
|
|
transparent 50%, rgba($c, $a) 50%,
|
|
|
|
rgba($c, $a) 75%, transparent 75%,
|
|
|
|
transparent 0
|
|
|
|
));
|
|
|
|
background-repeat: repeat;
|
|
|
|
background-size: $d $d;
|
|
|
|
}
|
|
|
|
|
2015-02-25 23:53:02 +00:00
|
|
|
@mixin bgTicks($c: $colorBodyFg, $repeatDir: 'x') {
|
|
|
|
$deg: 90deg;
|
|
|
|
@if ($repeatDir != 'x') {
|
|
|
|
$deg: 0deg;
|
|
|
|
$repeatDir: repeat-y;
|
|
|
|
} @else {
|
|
|
|
$repeatDir: repeat-x;
|
|
|
|
}
|
|
|
|
|
|
|
|
@include background-image(linear-gradient($deg,
|
2015-02-25 19:25:20 +00:00
|
|
|
$c 1px, transparent 1px,
|
|
|
|
transparent 100%
|
|
|
|
));
|
2015-02-25 23:53:02 +00:00
|
|
|
background-repeat: $repeatDir;
|
2015-02-25 19:25:20 +00:00
|
|
|
}
|
|
|
|
|
2014-12-31 18:43:01 +00:00
|
|
|
@mixin containerSubtle($bg: $colorBodyBg, $fg: $colorBodyFg, $hover: false) {
|
|
|
|
@include background-image(linear-gradient(lighten($bg, 10%), lighten($bg, 5%)));
|
|
|
|
@include border-radius($controlCr);
|
|
|
|
@include box-sizing(border-box);
|
|
|
|
// @include box-shadow(rgba(black, 0.3) 0 1px 2px);
|
|
|
|
@include boxShdwSubtle();
|
2015-02-24 19:37:34 +00:00
|
|
|
border: none;
|
2014-12-31 18:43:01 +00:00
|
|
|
border-top: 1px solid lighten($bg, 20%);
|
|
|
|
color: $fg;
|
|
|
|
display: inline-block;
|
|
|
|
@if $hover == true {
|
|
|
|
&:hover {
|
|
|
|
@include background-image(linear-gradient(lighten($bg, 20%), lighten($bg, 15%)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin sliderTrack($bg: $scrollbarTrackColorBg) {
|
|
|
|
$b: 1px solid lighten($bg, 30%);
|
|
|
|
@include border-radius(2px);
|
|
|
|
@include box-sizing(border-box);
|
|
|
|
@include boxIncised(0.7);
|
|
|
|
background-color: $bg;
|
|
|
|
border-bottom: $b;
|
|
|
|
border-right: $b;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin controlGrippy($b, $direction: horizontal, $w: 1px, $style: dotted) {
|
|
|
|
&:before {
|
|
|
|
// Grippy
|
|
|
|
content: '';
|
|
|
|
display: block;
|
|
|
|
height: auto;
|
|
|
|
position: absolute;
|
|
|
|
z-index: 2;
|
|
|
|
|
|
|
|
@if $direction == "horizontal" {
|
|
|
|
border-top: $w $style darken($b, 15%);
|
|
|
|
top: 2px;
|
|
|
|
left: 5px;
|
|
|
|
right: 5px;
|
|
|
|
|
|
|
|
} @else if $direction == "vertical" {
|
|
|
|
border-left: $w $style darken($b, 15%);
|
|
|
|
left: 2px;
|
|
|
|
bottom: 5px;
|
|
|
|
top: 5px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
&:not(.disabled):hover:before {
|
|
|
|
border-color: rgba($colorKey, 0.9);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin btnSubtle($bg: $colorBodyBg, $fg: $colorBodyFg) {
|
|
|
|
@include containerSubtle($bg, $fg);
|
|
|
|
&:not(.disabled):hover {
|
|
|
|
@include background-image(linear-gradient(lighten($bg, 20%), lighten($bg, 10%)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin btnNoticeable($bg: $colorBodyBg, $fg: $colorBodyFg) {
|
|
|
|
@include containerSubtle($bg, $fg);
|
|
|
|
@include background-image(linear-gradient(lighten($bg, 20%), $bg));
|
|
|
|
&:not(.disabled):hover {
|
|
|
|
@include background-image(linear-gradient(lighten($bg, 30%), lighten($bg, 10%)));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin boxIncised($sVal: 0.6) {
|
|
|
|
@include box-shadow(inset rgba(black, $sVal) 0 1px 5px);
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin boxOutline($c: lighten($colorBodyBg, 20%)) {
|
|
|
|
border: 1px solid $c;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin boxShdwSubtle($sVal: 0.3) {
|
|
|
|
@include box-shadow(rgba(black, $sVal) 0 1px 3px);
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin boxShdwLarge($sVal: 0.7) {
|
|
|
|
@include box-shadow(rgba(black, $sVal) 0 3px 10px);
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin outerGlow($color: #fff, $sVal: 0.3) {
|
|
|
|
@include box-shadow(rgba($color, $sVal) 0 0 30px);
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin txtShdwSubtle($sVal: 0.1) {
|
|
|
|
@include text-shadow(rgba(black, $sVal) 0 1px 2px);
|
|
|
|
}
|
2015-01-26 18:18:23 +00:00
|
|
|
@mixin txtShdwLarge($sVal: 0.7) {
|
|
|
|
@include text-shadow(rgba(black, $sVal) 0 3px 7px);
|
|
|
|
}
|
2014-12-31 18:43:01 +00:00
|
|
|
|
|
|
|
|
|
|
|
@mixin invokeMenu($baseColor) {
|
|
|
|
$c: $baseColor;
|
|
|
|
color: $c;
|
|
|
|
&:hover {
|
|
|
|
color: lighten($c, $ltGamma);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin menuUlReset() {
|
|
|
|
margin: 0;
|
|
|
|
padding: 0;
|
|
|
|
li {
|
|
|
|
list-style-type: none;
|
|
|
|
margin:0;
|
|
|
|
padding: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin vertical-align {
|
|
|
|
/* This doesn't work on an element inside an element with absolute positioning that has height: auto */
|
|
|
|
position: relative;
|
|
|
|
top: 50%;
|
|
|
|
-webkit-transform: translateY(-50%);
|
|
|
|
-ms-transform: translateY(-50%);
|
|
|
|
transform: translateY(-50%);
|
|
|
|
}
|
|
|
|
|
2015-02-25 19:25:20 +00:00
|
|
|
@mixin ellipsize() {
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
white-space: nowrap;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin scrollH($showBar: auto) {
|
|
|
|
overflow-x: $showBar;
|
|
|
|
overflow-y: hidden;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin scrollV($showBar: auto) {
|
|
|
|
overflow-x: hidden;
|
|
|
|
overflow-y: $showBar;
|
|
|
|
}
|
|
|
|
|
2014-12-31 18:43:01 +00:00
|
|
|
@mixin wait-spinner($b: 5px, $c: $colorAlt1) {
|
|
|
|
display: block;
|
|
|
|
position: absolute;
|
|
|
|
-webkit-animation: rotation .6s infinite linear;
|
|
|
|
-moz-animation: rotation .6s infinite linear;
|
|
|
|
-o-animation: rotation .6s infinite linear;
|
|
|
|
animation: rotation .6s infinite linear;
|
|
|
|
border-color: rgba($c, 0.25);
|
|
|
|
border-top-color: rgba($c, 1.0);
|
|
|
|
border-style: solid;
|
|
|
|
border-width: $b;
|
|
|
|
border-radius: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
@mixin test($c: #ffcc00, $a: 0.2) {
|
|
|
|
background-color: rgba($c, $a);
|
2015-02-25 19:25:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@mixin testObj($w: 2000px, $h: 1000px, $c: black, $a: 0.1) {
|
|
|
|
&:after {
|
|
|
|
@include box-sizing(border-box);
|
|
|
|
@include bgDiagonalStripes($c, $a);
|
|
|
|
color: rgba(white, 0.3);
|
|
|
|
font-style: italic;
|
|
|
|
content: "Test Object";
|
|
|
|
display: block;
|
|
|
|
padding: 20px;
|
|
|
|
position: relative;
|
|
|
|
width: $w;
|
|
|
|
height: $h;
|
|
|
|
transform: scaleX(1) scaleY(1) scaleZ(1);
|
|
|
|
transform-origin: 50% 50% 0;
|
|
|
|
}
|
2014-12-31 18:43:01 +00:00
|
|
|
}
|