Files
openmct/platform/commonUI/themes/espresso/res/sass/_mixins.scss
Charles Hacskaylo 86deec6364 [Frontend] IN-PROGRESS Theme changes continuing
open #95
Grid items;
2015-09-04 18:06:18 -07:00

54 lines
1.5 KiB
SCSS

@mixin containerSubtle($bg: $colorBodyBg, $fg: $colorBodyFg, $hover: false) {
$ltnRatio: 7%;
$gradRatio: 5%;
$hovRatio: 7%;
$bgBase: $bg; //pullForward($bg, $ltnRatio);
$fgBase: $fg; // pullForward($fg, $ltnRatio);
$gradC1: lighten($bgBase, $gradRatio); // Container should be lighter higher up
$gradC2: $bgBase;
$cInvokeBase: #fff;
@include background-image(linear-gradient($gradC1, $gradC2));
@include border-radius($controlCr);
@include box-sizing(border-box);
@include boxShdwSubtle();
border: none;
//border-top: 1px solid lighten($gradC1, 2%);
color: $fg;
display: inline-block;
@if $hover == true {
&:not(.disabled):hover {
@include background-image(linear-gradient(pullForward($gradC1, $hovRatio), pullForward($gradC2, $hovRatio)));
color: pullForward($fgBase, $hovRatio);
}
}
}
@mixin btnSubtle($bg: $colorBodyBg, $fg: $colorBodyFg, $ic: $colorKey) {
// $ic: Icon color
@include border-radius($controlCr);
@include containerSubtle($bg, $fg, true);
@include text-shadow(rgba(black, 0.3) 0 1px 1px);
.icon {
color: $ic;
}
&:not(.disabled) {
&:not(.paused) {
&:hover {
.icon {
color: lighten($ic, $ltGamma);
}
}
}
}
}
@function pullForward($c: $colorBodyBg, $p: 20%) {
// For dark interfaces, lighter things come forward - opposite for light interfaces
@return lighten($c, $p);
}
@function pushBack($c: $colorBodyBg, $p: 20%) {
// For dark interfaces, darker things move back - opposite for light interfaces
@return darken($c, $p);
}