2019-01-28 09:37:34 +01:00
|
|
|
/*! Icinga Web 2 | (c) 2019 Icinga Development Team | GPLv2+ */
|
2015-10-28 14:12:14 +01:00
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
/**********************************************************************************************************************
|
|
|
|
used colors (todo: move to base.less eventually)
|
|
|
|
***********************************************************************************************************************/
|
2015-09-27 13:41:07 +02:00
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
@disabled-gray: #9a9a9a;
|
|
|
|
@low-sat-blue: #dae3e6;
|
|
|
|
@low-sat-blue-dark: #becbcf;
|
|
|
|
@icinga-blue-light: #a5c4cd;
|
|
|
|
@icinga-blue-dark: #0081a6;
|
|
|
|
|
|
|
|
/**********************************************************************************************************************
|
|
|
|
general form layout
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
|
|
|
form:not(.inline):not([role="search"]) {
|
|
|
|
max-width: 70em;
|
|
|
|
width: 80%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.form-element,
|
|
|
|
.form-controls {
|
|
|
|
display: flex;
|
|
|
|
margin-left: 16em;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
.form-control {
|
|
|
|
display: inline-block;
|
|
|
|
float: right;
|
|
|
|
|
|
|
|
&:not(:last-child) {
|
|
|
|
margin-left: .5em;
|
2015-09-27 13:41:07 +02:00
|
|
|
}
|
2016-01-20 18:17:32 +01:00
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
&:last-child {
|
|
|
|
.clearfix();
|
|
|
|
}
|
2016-01-20 18:17:32 +01:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.control-group {
|
|
|
|
display: flex;
|
2019-06-19 14:40:46 +02:00
|
|
|
margin: 0 -.5em;
|
|
|
|
|
|
|
|
> * {
|
|
|
|
margin: .5em;
|
|
|
|
}
|
2015-09-27 13:41:07 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
/**********************************************************************************************************************
|
|
|
|
minimal form layout
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
|
|
|
#layout.minimal-layout,
|
|
|
|
#layout.twocols:not(.wide-layout) {
|
|
|
|
form:not(.inline) {
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
.control-label-group {
|
|
|
|
text-align: left;
|
|
|
|
width: 100%;
|
2019-06-19 14:40:46 +02:00
|
|
|
padding-bottom: 0;
|
|
|
|
padding-left: 0;
|
|
|
|
margin-bottom: 0;
|
2019-01-28 09:37:34 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.toggle-switch ~ .control-info:before {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
.control-info {
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
.errors > li {
|
|
|
|
margin-left: .5em;
|
|
|
|
}
|
2016-01-18 13:19:08 +01:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
/**********************************************************************************************************************
|
|
|
|
label styles
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
|
|
|
.control-group .control-label-group {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
justify-content: center;
|
|
|
|
line-height: 1;
|
2019-06-19 14:40:46 +02:00
|
|
|
padding: .5625em;
|
2019-01-28 09:37:34 +01:00
|
|
|
max-height: 2.5em;
|
|
|
|
text-align: right;
|
|
|
|
width: 15em;
|
2015-11-23 11:36:59 +01:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.control-info {
|
2019-06-19 14:40:46 +02:00
|
|
|
line-height: 2.5em;
|
|
|
|
|
|
|
|
&:before {
|
|
|
|
margin-left: -.5em;
|
|
|
|
margin-right: .5em;
|
|
|
|
}
|
2015-11-23 11:36:59 +01:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.toggle-switch ~ .control-info {
|
|
|
|
position: relative;
|
|
|
|
margin-left: .5em;
|
2015-11-23 11:36:59 +01:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.spinner {
|
2019-06-19 14:40:46 +02:00
|
|
|
line-height: 2.5em;
|
|
|
|
margin: .5em 0;
|
2019-01-28 09:37:34 +01:00
|
|
|
|
|
|
|
&:before {
|
|
|
|
margin-left: .5em;
|
|
|
|
opacity: 0.4;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
select ~ .spinner:before {
|
2019-06-19 14:40:46 +02:00
|
|
|
margin-left: -3.5em;
|
2019-01-28 09:37:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**********************************************************************************************************************
|
|
|
|
general input styles
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
|
|
|
.control-group input[type="text"],
|
|
|
|
.control-group input[type="password"],
|
|
|
|
.control-group input[type="number"],
|
|
|
|
.control-group textarea,
|
|
|
|
.control-group select {
|
|
|
|
background: @low-sat-blue;
|
|
|
|
flex: 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
.control-group input:not([type="checkbox"]),
|
|
|
|
.control-group .toggle-switch,
|
|
|
|
.control-group button,
|
|
|
|
.control-group select,
|
|
|
|
.control-group textarea,
|
|
|
|
.form-controls button,
|
|
|
|
.form-controls .toggle-switch,
|
|
|
|
.form-controls input {
|
|
|
|
border: none;
|
|
|
|
border-radius: .25em;
|
|
|
|
font-size: inherit;
|
|
|
|
padding: .5625em;
|
|
|
|
.appearance(none);
|
2015-11-23 11:36:59 +01:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.control-group .toggle-switch,
|
|
|
|
.form-controls .toggle-switch {
|
2019-06-19 14:40:46 +02:00
|
|
|
margin: 1em .5em;
|
2019-01-28 09:37:34 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
/**********************************************************************************************************************
|
|
|
|
specific input styles
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
2015-09-27 16:34:33 +02:00
|
|
|
input.search {
|
2019-01-28 09:37:34 +01:00
|
|
|
.transition(border 0.3s ease);
|
|
|
|
.transition(background-image 0.2s ease);
|
|
|
|
|
|
|
|
background: transparent url(../img/icons/search.png) no-repeat scroll 0.1em center;
|
2016-01-13 15:02:12 +01:00
|
|
|
background-size: 1em 1em;
|
2019-01-28 09:37:34 +01:00
|
|
|
border: none;
|
|
|
|
border-bottom: 1px solid @gray-light;
|
|
|
|
outline: none;
|
|
|
|
padding: @vertical-padding / 2 @horizontal-padding / 2;
|
2016-01-13 15:02:12 +01:00
|
|
|
padding-left: 1.5em;
|
2019-01-28 09:37:34 +01:00
|
|
|
width: 20em;
|
2015-10-01 02:49:38 +02:00
|
|
|
|
|
|
|
&:focus {
|
|
|
|
background-color: @body-bg-color;
|
2019-01-28 09:37:34 +01:00
|
|
|
background-image: url(../img/icons/search_icinga_blue.png);
|
2015-10-01 02:49:38 +02:00
|
|
|
}
|
2019-01-28 09:37:34 +01:00
|
|
|
&:focus:not([readonly]) {
|
|
|
|
border-color: @icinga-blue;
|
|
|
|
}
|
2015-09-27 16:34:33 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.link-button {
|
|
|
|
.action-link();
|
|
|
|
// Reset defaults
|
|
|
|
background: none;
|
|
|
|
border: none;
|
2015-09-30 11:16:15 +02:00
|
|
|
display: inline-block;
|
2019-01-28 09:37:34 +01:00
|
|
|
padding: 0;
|
|
|
|
|
|
|
|
text-align: left;
|
2015-09-30 11:16:15 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
/* The default resize handles are still displayed over the image, so I will remove this for now
|
|
|
|
.control-group textarea {
|
|
|
|
background-image: url(../img/textarea-corner-2x.png);
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-position: bottom right;
|
|
|
|
background-size: 1em 1em;
|
|
|
|
} */
|
|
|
|
|
|
|
|
.control-group select {
|
|
|
|
padding-right: 1.5625em;
|
2015-09-30 11:16:15 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
/* Remove native dropdown arrow in IE10+ */
|
|
|
|
.control-group select::-ms-expand {
|
|
|
|
display: none;
|
|
|
|
opacity: 0
|
2016-04-05 14:15:08 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.form-controls input:not(:last-child),
|
|
|
|
.form-controls button:not(:last-child) {
|
|
|
|
margin-right: 1em;
|
2015-09-30 22:24:26 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.control-group select:not([multiple]) {
|
|
|
|
background-image: url(../img/select-icon.svg);
|
|
|
|
background-repeat: no-repeat;
|
|
|
|
background-position: right center;
|
|
|
|
background-size: contain;
|
|
|
|
}
|
2015-10-01 03:03:51 +02:00
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
/**********************************************************************************************************************
|
|
|
|
button styles
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
|
|
|
.form-controls input[type="submit"],
|
|
|
|
.form-controls input[type="submit"].btn-confirm {
|
|
|
|
.button();
|
|
|
|
}
|
|
|
|
|
|
|
|
.form-controls input[type="submit"].btn-remove {
|
|
|
|
.button(@body-bg-color, @color-critical, darken(@color-critical, 10%));
|
2015-10-01 03:03:51 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.form-controls input[type="submit"].btn-cancel {
|
|
|
|
.button(@body-bg-color, @gray, @black);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**********************************************************************************************************************
|
|
|
|
IPL toggle styles
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
|
|
|
/* The switch - the box around the slider */
|
|
|
|
.toggle-switch {
|
|
|
|
cursor: pointer;
|
|
|
|
position: relative;
|
2015-09-27 13:41:07 +02:00
|
|
|
display: inline-block;
|
2019-01-28 09:37:34 +01:00
|
|
|
height: 1.5em;
|
|
|
|
width: 2.625em;
|
2015-10-01 23:00:45 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
/* Hide default HTML checkbox */
|
|
|
|
.toggle-switch input {
|
|
|
|
opacity: 0;
|
|
|
|
width: 0;
|
|
|
|
height: 0;
|
2015-09-27 13:41:07 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
/* The slider */
|
|
|
|
.toggle-slider {
|
|
|
|
position: absolute;
|
|
|
|
left: 0;
|
|
|
|
top: 0;
|
|
|
|
|
2015-09-27 13:41:07 +02:00
|
|
|
display: inline-block;
|
2019-01-28 09:37:34 +01:00
|
|
|
background: @low-sat-blue;
|
|
|
|
border: 1px solid @low-sat-blue;
|
|
|
|
box-sizing: content-box;
|
|
|
|
border-radius: 1em;
|
|
|
|
height: 4/3em;
|
|
|
|
width: 8/3em;
|
|
|
|
vertical-align: middle;
|
2015-09-27 13:41:07 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.toggle-slider:before {
|
|
|
|
position: absolute;
|
|
|
|
top: 0;
|
|
|
|
left: 0;
|
|
|
|
|
|
|
|
background: @text-color-inverted;
|
|
|
|
border-radius: 1em;
|
|
|
|
border: 1px solid @low-sat-blue;
|
|
|
|
box-sizing: border-box;
|
|
|
|
content: "";
|
|
|
|
display: block;
|
|
|
|
height: 4/3em;
|
|
|
|
margin-left: 0;
|
|
|
|
width: 4/3em;
|
|
|
|
|
|
|
|
@transition: left .2s ease, margin .2s ease;
|
|
|
|
-webkit-transition: @transition;
|
|
|
|
-moz-transition: @transition;
|
|
|
|
-o-transition: @transition;
|
|
|
|
transition: @transition;
|
|
|
|
}
|
|
|
|
|
|
|
|
input:checked + .toggle-slider {
|
|
|
|
background-color: @icinga-blue;
|
|
|
|
border: 1px solid @icinga-blue;
|
|
|
|
}
|
|
|
|
|
|
|
|
input:focus + .toggle-slider {
|
|
|
|
box-shadow: 0 0 0 2px @body-bg-color, 0 0 0 4px fade(@icinga-blue, 40);
|
|
|
|
}
|
|
|
|
|
|
|
|
input:checked + .toggle-slider:before {
|
|
|
|
border: 1px solid @icinga-blue;
|
|
|
|
left: 100%;
|
|
|
|
margin-left: -4/3em;
|
|
|
|
}
|
|
|
|
|
|
|
|
/**********************************************************************************************************************
|
|
|
|
disabled inputs
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
|
|
|
.toggle-switch.disabled {
|
|
|
|
cursor: default;
|
|
|
|
|
|
|
|
& > .toggle-slider {
|
|
|
|
background-color: @gray-light;
|
|
|
|
border-color: @gray-light;
|
2015-10-01 02:49:38 +02:00
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
&:before {
|
|
|
|
background-color: @gray-lighter;
|
|
|
|
border-color: @gray-light;
|
|
|
|
}
|
2015-10-01 02:49:38 +02:00
|
|
|
}
|
2015-09-27 13:41:07 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.control-group.disabled .control-label-group {
|
|
|
|
color: @disabled-gray;
|
|
|
|
}
|
|
|
|
|
|
|
|
.control-group input[disabled],
|
|
|
|
.control-group select[disabled] {
|
|
|
|
background: @gray-lighter;
|
2015-09-27 14:30:28 +02:00
|
|
|
border: none;
|
2019-01-28 09:37:34 +01:00
|
|
|
}
|
2015-09-27 14:30:28 +02:00
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
/**********************************************************************************************************************
|
|
|
|
errors and additional information
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
|
|
|
.form-notifications,
|
|
|
|
.form-description {
|
|
|
|
border-radius: .25em;
|
|
|
|
display: flex;
|
|
|
|
list-style: none;
|
|
|
|
margin: 0 0 1em 0;
|
|
|
|
padding: 1em .5em;
|
2016-02-25 10:18:41 +01:00
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
ul {
|
|
|
|
list-style: none;
|
|
|
|
margin: 0;
|
|
|
|
padding: 0 .5em;
|
|
|
|
}
|
|
|
|
|
|
|
|
li {
|
|
|
|
list-style: none;
|
|
|
|
}
|
|
|
|
|
|
|
|
& .form-notification-icon,
|
|
|
|
& .form-description-icon {
|
|
|
|
margin-left: 1em;
|
2015-09-27 14:30:28 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.form-notifications {
|
|
|
|
background-color: fade(@color-ok, 20%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.form-description {
|
|
|
|
background-color: fade(@gray, 20%);
|
|
|
|
}
|
|
|
|
|
|
|
|
.errors {
|
|
|
|
list-style: none;
|
|
|
|
position: relative;
|
|
|
|
margin: 0;
|
2015-10-01 02:49:38 +02:00
|
|
|
padding: 0;
|
2019-01-28 09:37:34 +01:00
|
|
|
display: block;
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
& > li {
|
|
|
|
margin: -0.5em 0 0.5em 16.5em;
|
|
|
|
color: #f56;
|
|
|
|
}
|
2015-10-01 02:49:38 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
.form-element-error {
|
|
|
|
color: @color-critical;
|
|
|
|
margin: 0 0 0.5em 15em;
|
|
|
|
padding: 0.5625em;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.control-group {
|
|
|
|
flex-wrap: wrap;
|
2015-10-01 02:49:38 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.form-info {
|
2015-11-03 12:21:18 +01:00
|
|
|
color: @text-color-light;
|
|
|
|
font-size: @font-size-small;
|
2019-01-28 09:37:34 +01:00
|
|
|
list-style: none;
|
|
|
|
padding-left: 0;
|
2015-10-01 02:49:38 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
/**********************************************************************************************************************
|
|
|
|
placeholder styles
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
|
|
|
input:-moz-placeholder { // FF 18-
|
|
|
|
color: @gray-light;
|
|
|
|
opacity: 1;
|
2015-10-01 02:49:38 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
input::-moz-placeholder { // FF 19+
|
|
|
|
color: @gray-light;
|
|
|
|
opacity: 1;
|
|
|
|
}
|
2015-10-01 02:49:38 +02:00
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
input:-ms-input-placeholder {
|
|
|
|
color: @gray-light;
|
2015-10-01 02:49:38 +02:00
|
|
|
}
|
|
|
|
|
2019-01-28 09:37:34 +01:00
|
|
|
input::-webkit-input-placeholder {
|
|
|
|
color: @gray-light;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**********************************************************************************************************************
|
|
|
|
specific form styles
|
|
|
|
***********************************************************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
.limiter-control-form > * {
|
|
|
|
display: inline-block;
|
|
|
|
margin-right: 0.25em;
|
|
|
|
}
|
|
|
|
|
|
|
|
.search.inline {
|
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.sort-control > * {
|
|
|
|
display: inline-block;
|
|
|
|
margin: 0.5em 0;
|
|
|
|
}
|