Files
iTop/css/backoffice/layout/_top-bar.scss

154 lines
3.8 KiB
SCSS

/*!
* Copyright (C) 2013-2021 Combodo SARL
*
* This file is part of iTop.
*
* iTop is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* iTop is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
*/
/* SCSS variables (can be overloaded) */
$ibo-top-bar--height: 54px !default;
$ibo-top-bar--padding-left: 16px !default; /* Should be align with the page content padding-left */
$ibo-top-bar--padding-right: 16px !default;
$ibo-top-bar--padding-y: 0px !default;
$ibo-top-bar--background-color: $ibo-color-white-100 !default;
$ibo-top-bar--elements-spacing: 32px !default;
$ibo-top-bar--quick-actions--margin-right: $ibo-top-bar--elements-spacing !default;
/* CSS variables (can be changed directly from the browser) */
:root{
--ibo-top-bar--height: #{$ibo-top-bar--height};
--ibo-top-bar--padding-left: #{$ibo-top-bar--padding-left};
--ibo-top-bar--padding-right: #{$ibo-top-bar--padding-right};
--ibo-top-bar--padding-y: #{$ibo-top-bar--padding-y};
--ibo-top-bar--background-color: #{$ibo-top-bar--background-color};
--ibo-top-bar--elements-spacing: #{$ibo-top-bar--elements-spacing};
--ibo-top-bar--quick-actions--margin-right: #{$ibo-top-bar--quick-actions--margin-right};
}
.ibo-top-bar{
@extend %ibo-full-height-content;
height: var(--ibo-top-bar--height);
padding: var(--ibo-top-bar--padding-y) var(--ibo-top-bar--padding-right) var(--ibo-top-bar--padding-y) var(--ibo-top-bar--padding-left);
background-color: var(--ibo-top-bar--background-color);
@extend %ibo-elevation-100;
.ibo-breadcrumbs {
flex-grow: 1; /* Occupy as much width as possible */
overflow-x: hidden; /* Avoid glitches when too many items */
}
}
.ibo-top-bar--quick-actions {
@extend %ibo-full-height-content;
margin-right: var(--ibo-top-bar--quick-actions--margin-right);
.ibo-global-search {
}
}
.ibo-top-bar--toolbar {
@extend %ibo-full-height-content;
}
.ibo-top-bar--toolbar-dashboard-title {
@extend %ibo-full-height-content;
@extend %ibo-font-ral-med-250;
display: flex;
align-items: center;
}
.ibo-top-bar--toolbar-dashboard-menu-toggler {
@extend %ibo-full-height-content;
display: flex;
align-items: center;
}
.ibo-top-bar--toolbar-dashboard-selector {
@extend %ibo-full-height-content;
display: flex;
align-items: center;
margin-left: 12px;
margin-right: 1px;
&:hover {
background-color: $ibo-color-secondary-100;
border-radius: $ibo-button--border-radius;
}
.selector-label {
display: inline-block;
margin-left: 10px;
margin-right: 10px;
vertical-align: super;
}
}
// Round Toggle
/* The switch - the box around the slider */
.switch {
position: relative;
display: inline-block;
width: 30px;
height: 24px;
vertical-align: baseline;
}
/* Hide default HTML checkbox */
.switch input {
display: none;
}
/* The slider */
.slider {
position: absolute;
cursor: pointer;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.slider:before {
position: absolute;
right: 5px;
bottom: 2px;
color: $ibo-color-secondary-800;
content: "\f007";
font-family: "Font Awesome 5 Free", serif;
font-size: $ibo-font-size-100;
font-weight: 900;
}
.slider:after {
position: absolute;
left: 5px;
bottom: 1px;
color: $ibo-color-primary-600;
content: "\f1ad";
font-family: "Font Awesome 5 Free", serif;
font-size: $ibo-font-size-150;
font-weight: 900;
}
input:checked + .slider:before {
content: "\f1ad";
}
input:checked + .slider:after {
content: "\f007";
}