gitlab-org--gitlab-foss/app/assets/stylesheets/new_sidebar.scss

210 lines
3.7 KiB
SCSS
Raw Normal View History

@import "framework/variables";
@import 'framework/tw_bootstrap_variables';
@import "bootstrap/variables";
2017-07-07 12:28:06 +00:00
$active-background: rgba(0,0,0,.04);
$active-border: $indigo-500;
$active-color: $indigo-700;
$active-hover-background: $active-background;
$active-hover-color: $gl-text-color;
$inactive-badge-background: rgba(0,0,0,.08);
$hover-background: $indigo-700;
$hover-color: $white-light;
$inactive-color: $gl-text-color-secondary;
$new-sidebar-width: 220px;
.page-with-new-sidebar {
@media (min-width: $screen-sm-min) {
padding-left: $new-sidebar-width;
}
2017-06-27 20:30:15 +00:00
// Override position: absolute
.right-sidebar {
position: fixed;
height: 100%;
}
}
2017-06-27 20:30:15 +00:00
.context-header {
border-bottom: 1px solid $border-color;
2017-06-28 14:52:11 +00:00
font-weight: 600;
2017-06-27 20:30:15 +00:00
display: flex;
align-items: center;
2017-07-07 12:28:06 +00:00
padding: 10px 16px 10px 10px;
color: $gl-text-color;
2017-06-27 20:30:15 +00:00
.avatar-container {
flex: 0 0 40px;
}
2017-06-28 14:52:11 +00:00
&:hover {
2017-07-07 12:28:06 +00:00
background-color: $hover-background;
color: $hover-color;
border-color: $hover-background;
.avatar-container {
border-color: transparent;
}
.settings-avatar {
background-color: $indigo-500;
i {
color: $hover-color;
}
}
2017-06-28 14:52:11 +00:00
}
.project-title,
.group-title {
overflow: hidden;
text-overflow: ellipsis;
}
2017-06-27 20:30:15 +00:00
}
.settings-avatar {
background-color: $white-light;
2017-07-07 12:28:06 +00:00
transition: background-color 100ms linear;
2017-06-27 20:30:15 +00:00
2017-06-29 12:05:07 +00:00
i {
2017-06-27 20:30:15 +00:00
font-size: 20px;
width: 100%;
2017-06-28 14:52:11 +00:00
color: $gl-text-color-secondary;
2017-06-27 20:30:15 +00:00
text-align: center;
align-self: center;
2017-07-07 12:28:06 +00:00
transition: color 100ms linear;
2017-06-27 20:30:15 +00:00
}
}
.nav-sidebar {
position: fixed;
z-index: 400;
width: $new-sidebar-width;
transition: width $sidebar-transition-duration;
top: 50px;
bottom: 0;
left: 0;
overflow: auto;
2017-07-07 12:28:06 +00:00
background-color: $gray-normal;
box-shadow: inset -2px 0 0 $border-color;
a {
text-decoration: none;
}
ul {
2017-07-07 12:28:06 +00:00
padding-left: 0;
list-style: none;
}
li {
white-space: nowrap;
a {
display: block;
2017-07-07 12:28:06 +00:00
padding: 12px 16px;
color: $inactive-color;
}
}
2017-07-07 12:28:06 +00:00
li.active {
box-shadow: inset 4px 0 0 $active-border;
> a {
color: $active-color;
font-weight: 700;
}
}
@media (max-width: $screen-xs-max) {
width: 0;
}
}
.sidebar-sub-level-items {
display: none;
2017-07-07 12:28:06 +00:00
padding-bottom: 8px;
> li {
a {
2017-07-07 12:28:06 +00:00
font-size: 12px;
padding: 8px 16px 8px 24px;
2017-07-07 12:28:06 +00:00
&:hover,
&:focus {
background: $active-hover-background;
color: $active-hover-color;
}
}
&.active {
2017-07-07 12:28:06 +00:00
a {
&,
&:hover,
&:focus {
background: $active-background;
color: $active-color;
}
}
}
}
}
.sidebar-top-level-items {
> li {
.badge {
float: right;
2017-07-07 12:28:06 +00:00
background-color: $inactive-badge-background;
color: $inactive-color;
}
&.active {
2017-07-07 12:28:06 +00:00
background: $active-background;
.badge {
2017-07-07 12:28:06 +00:00
color: $active-color;
font-weight: 600;
}
.sidebar-sub-level-items {
display: block;
}
}
2017-07-07 12:28:06 +00:00
> a:hover {
background-color: $hover-background;
color: $hover-color;
.badge {
2017-07-07 12:28:06 +00:00
transition: background-color 100ms linear, color 100ms linear;
background-color: $indigo-500;
color: $hover-color;
}
}
}
}
// Make issue boards full-height now that sub-nav is gone
.boards-list {
height: calc(100vh - 50px);
@media (min-width: $screen-sm-min) {
height: 475px; // Needed for PhantomJS
// scss-lint:disable DuplicateProperty
height: calc(100vh - 120px);
// scss-lint:enable DuplicateProperty
}
}
2017-07-07 12:28:06 +00:00
// Change color of all horizontal tabs to match the new indigo color
.nav-links li.active a {
border-bottom-color: $active-border;
.badge {
font-weight: 600;
}
}