[Frontend] Markup and CSS related to indicators; hover styles
open #442 https://github.jpl.nasa.gov/MissionControl/vista/issues/293 s-btn hover styling cleaned up; Spacing, styles, etc. for indicators refined; Constants, colors added to, cleaned up and normalized; Animation code in _effects refactored;
This commit is contained in:
@@ -39,39 +39,35 @@ a.disabled {
|
||||
@include test();
|
||||
}
|
||||
|
||||
@mixin customKeyframes($animName: pulse, $op0: 0.5) {
|
||||
@include keyframes($animName) {
|
||||
0% { opacity: $op0; }
|
||||
100% { opacity: 1; }
|
||||
}
|
||||
@include animation-name(pulse, 0.2);
|
||||
}
|
||||
|
||||
@mixin pulse($dur: 500ms, $iteration: infinite, $opacity0: 0.5, $opacity100: 1) {
|
||||
@include keyframes(pulse) {
|
||||
@mixin pulse($animName: pulse, $dur: 500ms, $iteration: infinite, $opacity0: 0.5, $opacity100: 1) {
|
||||
@include keyframes($animName) {
|
||||
0% { opacity: $opacity0; }
|
||||
100% { opacity: $opacity100; }
|
||||
}
|
||||
@include animation-name(pulse);
|
||||
@include animation-name($animName);
|
||||
@include animation-duration($dur);
|
||||
@include animation-direction(alternate);
|
||||
@include animation-iteration-count($iteration);
|
||||
@include animation-timing-function(ease-in-out);
|
||||
}
|
||||
|
||||
@mixin pulseBorder($c: red, $dur: 500ms, $iteration: infinite, $delay: 0s, $opacity0: 0, $opacity100: 1) {
|
||||
@include keyframes(pulseBorder) {
|
||||
0% { border-color: rgba($c, $opacity0); }
|
||||
100% { border-color: rgba($c, $opacity100); }
|
||||
}
|
||||
@include animation-name(pulseBorder);
|
||||
@include animation-duration($dur);
|
||||
@include animation-direction(alternate);
|
||||
@include animation-iteration-count($iteration);
|
||||
@include animation-timing-function(ease);
|
||||
@include animation-delay($delay);
|
||||
.pulse {
|
||||
@include pulse($animName: pulse, $dur: 750ms);
|
||||
}
|
||||
|
||||
.pulse {
|
||||
@include pulse(750ms);
|
||||
}
|
||||
.pulse-subtle {
|
||||
@include pulse($animName: pulse-subtle, $dur: 500ms, $opacity0: 0.7);
|
||||
}
|
||||
|
||||
@mixin pulseBorder($c: red, $dur: 500ms, $iteration: infinite, $delay: 0s, $opacity0: 0, $opacity100: 1) {
|
||||
@include keyframes(pulseBorder) {
|
||||
0% { border-color: rgba($c, $opacity0); }
|
||||
100% { border-color: rgba($c, $opacity100); }
|
||||
}
|
||||
@include animation-name(pulseBorder);
|
||||
@include animation-duration($dur);
|
||||
@include animation-direction(alternate);
|
||||
@include animation-iteration-count($iteration);
|
||||
@include animation-timing-function(ease);
|
||||
@include animation-delay($delay);
|
||||
}
|
||||
|
||||
@@ -297,21 +297,20 @@
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
@mixin btnBase($bg: $colorBodyBg, $bgHov: none, $fg: $colorBodyFg, $ic: $colorBtnIcon) {
|
||||
@mixin btnBase($bg: $colorBodyBg, $bgHovColor: none, $fg: $colorBodyFg, $ic: $colorBtnIcon) {
|
||||
@include user-select(none);
|
||||
@include transition(background, .25s);
|
||||
.icon {
|
||||
color: $ic;
|
||||
}
|
||||
@include desktop {
|
||||
@if $bgHov != none {
|
||||
&:not(.disabled):hover {
|
||||
@include background-image($bgHov);
|
||||
>.icon {
|
||||
color: lighten($ic, $ltGamma);
|
||||
}
|
||||
}
|
||||
}
|
||||
@if $bgHovColor != none {
|
||||
&:not(.disabled):hover {
|
||||
background: $bgHovColor; // was just background, and background-image before that
|
||||
>.icon {
|
||||
color: lighten($ic, $ltGamma);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ $pad: $interiorMargin * $baseRatio;
|
||||
|
||||
&:not(.major) {
|
||||
// bg, bgHov, fg, ic
|
||||
@include btnSubtle($colorBtnBg, $colorKey, $colorBtnFg, $colorBtnIcon);
|
||||
@include btnSubtle($colorBtnBg, $colorBtnBgHov, $colorBtnFg, $colorBtnIcon);
|
||||
}
|
||||
&.pause-play {
|
||||
|
||||
@@ -91,7 +91,7 @@ $pad: $interiorMargin * $baseRatio;
|
||||
&.paused {
|
||||
@include btnSubtle($colorPausedBg, pushBack($colorPausedBg, 10%), $colorPausedFg, $colorPausedFg);
|
||||
.icon {
|
||||
@include pulse(1000ms);
|
||||
@include pulse($dur: 1000ms);
|
||||
:before {
|
||||
content: "\0000EF";
|
||||
}
|
||||
@@ -269,14 +269,16 @@ $pad: $interiorMargin * $baseRatio;
|
||||
}
|
||||
|
||||
.first {
|
||||
.s-btn {
|
||||
.s-btn,
|
||||
&.s-btn {
|
||||
@include border-left-radius($controlCr);
|
||||
margin-left: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.last {
|
||||
.s-btn {
|
||||
.s-btn,
|
||||
&.s-btn {
|
||||
@include border-right-radius($controlCr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,9 +62,6 @@
|
||||
float: right;
|
||||
}
|
||||
|
||||
&.subtle {
|
||||
opacity: 0.5;
|
||||
}
|
||||
.status-indicator {
|
||||
margin-right: $interiorMarginSm;
|
||||
}
|
||||
@@ -79,7 +76,7 @@
|
||||
&:hover {
|
||||
.label {
|
||||
@include trans-prop-nice(max-width, $transSpeed, 0s);
|
||||
max-width: 450px;
|
||||
max-width: 600px;
|
||||
width: auto;
|
||||
}
|
||||
.count {
|
||||
@@ -107,8 +104,8 @@
|
||||
opacity: 1;
|
||||
}
|
||||
.s-btn {
|
||||
//background: orange;
|
||||
padding: 0 $interiorMarginSm;
|
||||
background: $colorStatusBtnBg;
|
||||
padding: 0 $interiorMargin;
|
||||
height: auto;
|
||||
line-height: inherit;
|
||||
}
|
||||
@@ -154,7 +151,7 @@
|
||||
left: 50%;
|
||||
opacity: 1;
|
||||
&:not(.info) {
|
||||
@include pulse(100ms, 10);
|
||||
@include pulse($dur: 100ms, $iteration: 10);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user