icingaweb2/public/css/icinga/mixins.less

206 lines
3.9 KiB
Plaintext
Raw Normal View History

/*! Icinga Web 2 | (c) 2015 Icinga Development Team | GPLv2+ */
2015-08-21 16:40:30 +02:00
2015-12-04 10:55:47 +01:00
.box-shadow(@x: 0.2em; @y: 0.2em; @blur: 0.2em; @spread: 0; @color: rgba(83, 83, 83, 0.25)) {
-webkit-box-shadow: @arguments;
-moz-box-shadow: @arguments;
box-shadow: @arguments;
}
.button(@background-color: @body-bg-color, @color: @icinga-blue) {
2015-09-30 11:13:45 +02:00
.rounded-corners(3px);
background-color: @background-color;
border: 2px solid @color;
color: @color;
2015-09-30 11:13:45 +02:00
cursor: pointer;
2016-01-18 11:03:22 +01:00
outline: none;
2015-09-30 11:13:45 +02:00
padding: @vertical-padding @horizontal-padding;
2015-12-09 16:12:16 +01:00
// Transition mixin does not work w/ comma-separated transistions
2015-09-30 11:13:45 +02:00
-webkit-transition: background 0.3s ease, color 0.3s ease;
-moz-transition: background 0.3s ease, color 0.3s ease;
-o-transition: background 0.3s ease, color 0.3s ease;
transition: background 0.3s ease, color 0.3s ease;
2015-12-16 12:32:52 +01:00
&:focus,
2015-09-30 11:13:45 +02:00
&:hover {
background-color: @color;
color: @background-color;
2015-12-16 12:32:52 +01:00
}
&:hover {
2015-09-30 11:13:45 +02:00
text-decoration: none;
}
}
.clearfix {
&:after {
content: "";
clear: both;
display: table;
}
}
2015-10-01 03:03:29 +02:00
.opacity(@opacity: 0.6) {
-webkit-opacity: @opacity;
-moz-opacity: @opacity;
opacity: @opacity;
}
2015-08-21 16:40:30 +02:00
.transform(@transform) {
-webkit-transform: @transform;
-moz-transform: @transform;
-ms-transform: @transform;
-o-transform: @transform;
transform: @transform;
}
2015-08-21 16:44:30 +02:00
.rounded-corners(@border-radius: 0.4em) {
-webkit-border-radius: @border-radius;
-moz-border-radius: @border-radius;
border-radius: @border-radius;
-webkit-background-clip: padding-box;
-moz-background-clip: padding;
background-clip: padding-box;
}
2015-10-28 14:09:58 +01:00
.transition (@transition) {
-webkit-transition: @transition;
-moz-transition: @transition;
-o-transition: @transition;
transition: @transition;
}
// Fadein animation
/* Chrome, WebKit */
@-webkit-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* FF < 16 */
@-moz-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* IE */
@-ms-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
/* Opera < 12.1 */
@-o-keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes fadein {
from { opacity: 0; }
to { opacity: 1; }
}
.fadein() {
opacity: 0;
-webkit-animation: fadein 2s ease-in; /* Chrome, WebKit */
-moz-animation: fadein 2s ease-in; /* FF < 16 */
-o-animation: fadein 2s ease-in; /* Opera < 12.1 */
animation: fadein 2s ease-in;
// Make sure that after animation is done we remain at the last keyframe value (opacity: 1)
-webkit-animation-fill-mode: forwards;
-moz-animation-fill-mode: forwards;
-o-animation-fill-mode: forwards;
animation-fill-mode: forwards;
}
2016-01-25 08:20:58 +01:00
// Color mixins
.bg-color-ok,
.bg-color-up {
background-color: @color-ok;
}
.bg-color-warning {
background-color: @color-warning;
&.handled {
background-color: @color-warning-handled;
}
}
.bg-color-critical,
.bg-color-down {
background-color: @color-critical;
&.handled {
background-color: @color-critical-handled;
}
}
.bg-color-unreachable {
background-color: @color-unreachable;
&.handled {
background-color: @color-unreachable-handled;
}
}
.bg-color-unknown {
background-color: @color-unknown;
&.handled {
background-color: @color-unknown-handled;
}
}
.bg-color-pending {
background-color: @color-pending;
}
.fg-color-ok,
.fg-color-up {
color: @color-ok;
}
.fg-color-warning {
color: @color-warning;
&.handled {
color: @color-warning-handled;
}
}
.fg-color-critical,
.fg-color-down {
color: @color-critical;
&.handled {
color: @color-critical-handled;
}
}
.fg-color-unreachable {
color: @color-unreachable;
&.handled {
color: @color-unreachable-handled;
}
}
.fg-color-unknown {
color: @color-unknown;
&.handled {
color: @color-unknown-handled;
}
}
.fg-color-pending {
color: @color-pending;
}