grafana/public/sass/components/_row.scss

228 lines
4.0 KiB
SCSS
Raw Normal View History

2017-08-24 09:37:00 -05:00
$dashboard-row-height: 30px;
2017-08-18 09:33:36 -05:00
.dashboard-row {
display: flex;
2017-08-24 09:37:00 -05:00
height: $dashboard-row-height;
line-height: $dashboard-row-height;
2017-08-18 09:33:36 -05:00
align-items: center;
2017-08-25 11:53:35 -05:00
align-content: center;
justify-content: center;
&--collapse {
2017-08-18 09:33:36 -05:00
background: $panel-bg;
2017-08-24 09:37:00 -05:00
.dashboard-row__panel_count {
display: block;
}
.dashboard-row__drag,
.dashboard-row__actions {
visibility: visible;
opacity: 1;
}
2017-08-18 09:33:36 -05:00
}
&:hover {
2017-08-25 11:53:35 -05:00
.dashboard-row__actions-left,
.dashboard-row__actions-right {
2017-08-24 07:08:05 -05:00
visibility: visible;
opacity: 1;
2017-08-24 09:37:00 -05:00
transition: opacity 200ms ease-in-out 100ms;
}
}
}
2017-08-25 11:53:35 -05:00
.dashboard-row__center {
position: relative;
}
2017-08-18 09:33:36 -05:00
.dashboard-row__title {
2017-08-25 11:53:35 -05:00
@include brand-bottom-border();
position: relative;
2017-08-25 11:53:35 -05:00
flex-grow: 0;
2017-08-18 10:39:07 -05:00
font-size: 1.15rem;
2017-08-18 09:33:36 -05:00
font-weight: $font-weight-semi-bold;
2017-08-25 11:53:35 -05:00
padding: 0rem 1rem 0.3rem 1rem;
}
2017-08-25 11:53:35 -05:00
.dashboard-row__actions-left {
position: absolute;
left: -23px;
2017-08-18 09:33:36 -05:00
font-size: $font-size-xs;
color: $text-muted;
2017-08-24 09:37:00 -05:00
top: 1px;
2017-08-25 11:53:35 -05:00
visibility: hidden;
opacity: 0;
2017-08-18 09:33:36 -05:00
}
2017-08-25 11:53:35 -05:00
.dashboard-row__actions-right {
position: absolute;
right: -40px;
2017-08-24 09:37:00 -05:00
padding-right: 1rem;
2017-08-24 07:08:05 -05:00
font-size: $font-size-sm;
visibility: hidden;
opacity: 0;
2017-08-25 11:53:35 -05:00
top: 0px;
2017-08-24 07:08:05 -05:00
a {
color: $text-color-weak;
2017-08-24 09:37:00 -05:00
padding-left: $spacer;
2017-08-24 07:08:05 -05:00
&:hover {
color: $link-hover-color;
}
}
2017-08-18 09:33:36 -05:00
}
2017-08-18 09:33:36 -05:00
.dashboard-row__title-text {
color: $text-color;
}
2017-08-24 09:37:00 -05:00
.dashboard-row__panel_count {
color: $text-color-weak;
font-style: italic;
font-size: $font-size-sm;
font-weight: normal;
display: none;
2017-08-25 11:53:35 -05:00
position: absolute;
right: 30px;
top: 0;
2017-08-24 09:37:00 -05:00
}
.dashboard-row__drag {
cursor: move;
width: 1rem;
height: $dashboard-row-height;
background: url("../img/grab_dark.svg") no-repeat 50% 50%;
background-size: 8px;
visibility: hidden;
2017-08-25 11:53:35 -05:00
position: absolute;
top: 0;
right: 0;
2017-08-24 09:37:00 -05:00
}
.panels-wrapper {
flex-grow: 1;
position: relative;
}
.dash-row-dropview {
position: relative;
background: $panel-bg;
2016-11-04 06:14:43 -05:00
border: $panel-border;
margin: 0 $panel-margin $panel-margin*2 $panel-margin;
padding: $panel-margin*2;
display: flex;
}
.dash-row-dropview-close {
position: absolute;
right: -12px;
top: -10px;
width: 20px;
height: 20px;
}
.add-panel-panels-scroll {
width: 100%;
2016-11-03 07:19:40 -05:00
overflow: auto;
2016-11-16 10:08:38 -06:00
-ms-overflow-style: none;
2016-11-03 07:19:40 -05:00
&::-webkit-scrollbar {
display: none
}
}
.add-panel-panels {
display: flex;
flex-direction: row;
}
.add-panel-item {
background: $input-label-bg;
border: $panel-border;
padding: $spacer/3 $spacer;
min-width: 9rem;
max-width: 9rem;
text-align: center;
margin: $gf-form-margin;
cursor: pointer;
&.active,
&:hover {
box-shadow: inset 0 1px 1px rgba(0,0,0,.075),0 0 1px rgba(82,168,236,5.8)
}
}
.add-panel-item-name {
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
font-size: $font-size-sm;
}
.add-panel-item-img {
width: 2rem;
}
$dash-row-menu-animation-speed: 0.20s;
.dash-row-menu-container {
position: absolute;
top: 0px;
width: 138px;
min-height: 100%;
transform: translate(-131px, 0);
transition: 0.1s ease-out 0.4s;
2017-08-14 06:57:16 -05:00
z-index: 0;
display: flex;
flex-direction: row;
&:hover {
transform: translate(-$panel-margin, 0);
transition: $dash-row-menu-animation-speed ease-in 0.05s;
z-index: 101;
.dash-row-menu-grip {
opacity: 0;
transition: $dash-row-menu-animation-speed ease-in 0.05s;
}
}
}
.dash-row-menu {
list-style: none;
flex-grow: 1;
box-shadow: $menu-dropdown-shadow;
background: $menu-dropdown-bg;
li a {
display: block;
white-space: nowrap;
color: $dropdownLinkColor;
font-size: $font-size-sm;
padding: $spacer/2 $spacer;
border-left: 2px solid $menu-dropdown-bg;
i {
display: inline-block;
padding-right: $spacer/2;
}
&:hover {
@include left-brand-border-gradient();
color: $link-color;
background: $input-label-bg;
}
}
}
.dash-row-menu-grip {
text-align: center;
font-size: 130%;
color: $text-color-weak;
opacity: 1;
transition: $dash-row-menu-animation-speed ease-out 0.5s;
width: 1rem;
}