debian-mirror-gitlab/app/assets/stylesheets/framework/contextual_sidebar.scss

454 lines
8.1 KiB
SCSS
Raw Normal View History

2018-03-17 18:26:18 +05:30
.page-with-contextual-sidebar {
transition: padding-left $sidebar-transition-duration;
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(md) {
2018-03-17 18:26:18 +05:30
padding-left: $contextual-sidebar-collapsed-width;
2017-09-10 17:25:29 +05:30
}
2019-07-07 11:18:12 +05:30
@include media-breakpoint-up(xl) {
2018-03-17 18:26:18 +05:30
padding-left: $contextual-sidebar-width;
2017-09-10 17:25:29 +05:30
}
2018-12-05 23:21:45 +05:30
.issues-bulk-update.right-sidebar.right-sidebar-expanded .issuable-sidebar-header {
2017-09-10 17:25:29 +05:30
padding: 10px 0 15px;
}
}
.page-with-icon-sidebar {
2019-07-07 11:18:12 +05:30
@include media-breakpoint-up(md) {
2018-03-17 18:26:18 +05:30
padding-left: $contextual-sidebar-collapsed-width;
2017-09-10 17:25:29 +05:30
}
}
.context-header {
position: relative;
margin-right: 2px;
2018-03-17 18:26:18 +05:30
width: $contextual-sidebar-width;
2017-09-10 17:25:29 +05:30
2018-11-08 19:23:39 +05:30
> a,
> button {
2018-03-17 18:26:18 +05:30
transition: padding $sidebar-transition-duration;
font-weight: $gl-font-weight-bold;
2017-09-10 17:25:29 +05:30
display: flex;
2018-11-08 19:23:39 +05:30
width: 100%;
2017-09-10 17:25:29 +05:30
align-items: center;
padding: 10px 16px 10px 10px;
color: $gl-text-color;
2018-11-08 19:23:39 +05:30
background-color: transparent;
border: 0;
text-align: left;
2017-09-10 17:25:29 +05:30
2018-11-08 19:23:39 +05:30
&:hover,
&:focus {
background-color: $link-hover-background;
color: $gl-text-color;
outline: 0;
}
2017-09-10 17:25:29 +05:30
}
.avatar-container {
flex: 0 0 40px;
2020-04-22 19:07:51 +05:30
background-color: $white;
2017-09-10 17:25:29 +05:30
}
2018-03-17 18:26:18 +05:30
.sidebar-context-title {
2017-09-10 17:25:29 +05:30
overflow: hidden;
text-overflow: ellipsis;
2018-11-18 11:00:15 +05:30
&.text-secondary {
font-weight: normal;
font-size: 0.8em;
}
2017-09-10 17:25:29 +05:30
}
}
.settings-avatar {
2020-04-22 19:07:51 +05:30
background-color: $white;
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
svg {
fill: $gl-text-color-secondary;
margin: auto;
2017-09-10 17:25:29 +05:30
}
}
2019-07-07 11:18:12 +05:30
@mixin collapse-contextual-sidebar-content {
.context-header {
height: 60px;
width: $contextual-sidebar-collapsed-width;
a {
padding: 10px 4px;
}
}
.sidebar-top-level-items > li {
.sidebar-sub-level-items {
&:not(.flyout-list) {
display: none;
}
}
}
.nav-icon-container {
margin-right: 0;
}
.toggle-sidebar-button {
padding: 16px;
width: $contextual-sidebar-collapsed-width - 1px;
.collapse-text,
2020-07-28 23:09:34 +05:30
.icon-chevron-double-lg-left {
2019-07-07 11:18:12 +05:30
display: none;
}
2020-07-28 23:09:34 +05:30
.icon-chevron-double-lg-right {
2019-07-07 11:18:12 +05:30
display: block;
margin: 0;
}
}
}
2017-09-10 17:25:29 +05:30
.nav-sidebar {
2018-11-08 19:23:39 +05:30
transition: width $sidebar-transition-duration, left $sidebar-transition-duration;
2017-09-10 17:25:29 +05:30
position: fixed;
2018-12-05 23:21:45 +05:30
z-index: 600;
2018-03-17 18:26:18 +05:30
width: $contextual-sidebar-width;
2017-09-10 17:25:29 +05:30
top: $header-height;
bottom: 0;
left: 0;
2018-03-17 18:26:18 +05:30
background-color: $gray-light;
2018-11-08 19:23:39 +05:30
box-shadow: inset -1px 0 0 $border-color;
2018-03-17 18:26:18 +05:30
transform: translate3d(0, 0, 0);
&:not(.sidebar-collapsed-desktop) {
2018-11-08 19:23:39 +05:30
@media (min-width: map-get($grid-breakpoints, sm)) and (max-width: map-get($grid-breakpoints, sm)) {
2018-12-05 23:21:45 +05:30
box-shadow: inset -1px 0 0 $border-color, 2px 1px 3px $dropdown-shadow-color;
2018-03-17 18:26:18 +05:30
}
}
2017-09-10 17:25:29 +05:30
2019-07-07 11:18:12 +05:30
@mixin collapse-contextual-sidebar {
2018-03-17 18:26:18 +05:30
width: $contextual-sidebar-collapsed-width;
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
.nav-sidebar-inner-scroll {
overflow-x: hidden;
2017-09-10 17:25:29 +05:30
}
2018-11-08 19:23:39 +05:30
.badge.badge-pill:not(.fly-out-badge),
2018-03-17 18:26:18 +05:30
.sidebar-context-title,
2017-09-10 17:25:29 +05:30
.nav-item-name {
2020-06-23 00:09:42 +05:30
@include gl-sr-only;
2018-03-17 18:26:18 +05:30
}
.sidebar-top-level-items > li > a {
2019-12-21 20:55:43 +05:30
min-height: 45px;
2018-03-17 18:26:18 +05:30
}
.fly-out-top-item {
display: block;
}
.avatar-container {
2018-12-05 23:21:45 +05:30
margin: 0 auto;
2017-09-10 17:25:29 +05:30
}
}
2019-07-07 11:18:12 +05:30
&.sidebar-collapsed-desktop {
@include collapse-contextual-sidebar;
}
2018-03-17 18:26:18 +05:30
&.sidebar-expanded-mobile {
2017-09-10 17:25:29 +05:30
left: 0;
}
a {
text-decoration: none;
}
ul {
padding-left: 0;
list-style: none;
}
li {
white-space: nowrap;
a {
2018-03-17 18:26:18 +05:30
transition: padding $sidebar-transition-duration;
2017-09-10 17:25:29 +05:30
display: flex;
align-items: center;
2019-12-21 20:55:43 +05:30
padding: 12px $gl-padding;
2018-03-17 18:26:18 +05:30
color: $gl-text-color-secondary;
2017-09-10 17:25:29 +05:30
}
2018-03-17 18:26:18 +05:30
.nav-item-name {
flex: 1;
2017-09-10 17:25:29 +05:30
}
2018-03-17 18:26:18 +05:30
&.active {
> a {
font-weight: $gl-font-weight-bold;
}
2017-09-10 17:25:29 +05:30
}
}
2019-07-07 11:18:12 +05:30
@include media-breakpoint-down(sm) {
2018-03-17 18:26:18 +05:30
left: (-$contextual-sidebar-width);
2017-09-10 17:25:29 +05:30
}
.nav-icon-container {
display: flex;
margin-right: 8px;
2018-03-17 18:26:18 +05:30
}
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
.fly-out-top-item {
display: none;
}
svg {
height: 16px;
width: 16px;
}
2019-07-07 11:18:12 +05:30
@media (min-width: map-get($grid-breakpoints, md)) and (max-width: map-get($grid-breakpoints, xl) - 1px) {
&:not(.sidebar-expanded-mobile) {
@include collapse-contextual-sidebar;
@include collapse-contextual-sidebar-content;
}
}
2018-03-17 18:26:18 +05:30
}
.nav-sidebar-inner-scroll {
height: 100%;
width: 100%;
overflow: auto;
2017-09-10 17:25:29 +05:30
}
.with-performance-bar .nav-sidebar {
top: $header-height + $performance-bar-height;
}
.sidebar-sub-level-items {
display: none;
padding-bottom: 8px;
> li {
a {
padding: 8px 16px 8px 40px;
&:hover,
&:focus {
2018-03-17 18:26:18 +05:30
background: $link-active-background;
color: $gl-text-color;
2017-09-10 17:25:29 +05:30
}
}
&.active {
a {
&,
&:hover,
&:focus {
2018-03-17 18:26:18 +05:30
background: $link-active-background;
2017-09-10 17:25:29 +05:30
}
}
}
}
}
.sidebar-top-level-items {
margin-bottom: 60px;
> li {
> a {
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(sm) {
margin-right: 1px;
2017-09-10 17:25:29 +05:30
}
&:hover {
color: $gl-text-color;
}
}
&.is-showing-fly-out {
> a {
2018-11-08 19:23:39 +05:30
margin-right: 1px;
2017-09-10 17:25:29 +05:30
}
.sidebar-sub-level-items {
2018-11-08 19:23:39 +05:30
@include media-breakpoint-up(sm) {
2017-09-10 17:25:29 +05:30
position: fixed;
top: 0;
2018-03-17 18:26:18 +05:30
left: 0;
2017-09-10 17:25:29 +05:30
min-width: 150px;
margin-top: -1px;
2018-03-17 18:26:18 +05:30
padding: 4px 1px;
2020-04-22 19:07:51 +05:30
background-color: $white;
2017-09-10 17:25:29 +05:30
box-shadow: 2px 1px 3px $dropdown-shadow-color;
border: 1px solid $gray-darker;
border-left: 0;
border-radius: 0 3px 3px 0;
&::before {
2018-05-09 12:01:36 +05:30
content: '';
2017-09-10 17:25:29 +05:30
position: absolute;
top: -30px;
bottom: -30px;
left: -10px;
right: -30px;
z-index: -1;
}
&.is-above {
margin-top: 1px;
}
2018-03-17 18:26:18 +05:30
.divider {
height: 1px;
margin: 4px -1px;
padding: 0;
2019-02-15 15:39:39 +05:30
background-color: $dropdown-divider-bg;
2018-03-17 18:26:18 +05:30
}
2017-09-10 17:25:29 +05:30
> .active {
box-shadow: none;
> a {
background-color: transparent;
}
}
a {
padding: 8px 16px;
color: $gl-text-color;
&:hover,
&:focus {
background-color: $gray-darker;
}
}
}
}
}
2018-11-08 19:23:39 +05:30
.badge.badge-pill {
2017-09-10 17:25:29 +05:30
background-color: $inactive-badge-background;
2018-03-17 18:26:18 +05:30
color: $gl-text-color-secondary;
2017-09-10 17:25:29 +05:30
}
&.active {
2018-03-17 18:26:18 +05:30
background: $link-active-background;
2017-09-10 17:25:29 +05:30
> a {
margin-left: 4px;
2018-03-17 18:26:18 +05:30
// Subtract width of left border on active element
2019-12-21 20:55:43 +05:30
padding-left: $gl-padding-12;
2017-09-10 17:25:29 +05:30
}
2018-11-08 19:23:39 +05:30
.badge.badge-pill {
2018-03-17 18:26:18 +05:30
font-weight: $gl-font-weight-bold;
2017-09-10 17:25:29 +05:30
}
2018-03-17 18:26:18 +05:30
.sidebar-sub-level-items:not(.is-fly-out-only) {
2017-09-10 17:25:29 +05:30
display: block;
}
}
&.active > a:hover,
&.is-over > a {
2018-03-17 18:26:18 +05:30
background-color: $link-hover-background;
2017-09-10 17:25:29 +05:30
}
}
}
// Collapsed nav
.toggle-sidebar-button,
2021-01-03 14:25:43 +05:30
.close-nav-button,
.toggle-right-sidebar-button {
2018-03-17 18:26:18 +05:30
transition: width $sidebar-transition-duration;
2018-12-13 13:39:08 +05:30
height: $toggle-sidebar-height;
padding: 0 $gl-padding;
2018-03-17 18:26:18 +05:30
background-color: $gray-light;
2017-09-10 17:25:29 +05:30
border: 0;
color: $gl-text-color-secondary;
display: flex;
align-items: center;
2021-01-03 14:25:43 +05:30
&:hover {
background-color: $border-color;
color: $gl-text-color;
}
}
.toggle-sidebar-button,
.close-nav-button {
position: fixed;
bottom: 0;
width: $contextual-sidebar-width - 1px;
border-top: 1px solid $border-color;
2018-03-17 18:26:18 +05:30
svg {
2017-09-10 17:25:29 +05:30
margin-right: 8px;
}
2020-07-28 23:09:34 +05:30
.icon-chevron-double-lg-right {
2017-09-10 17:25:29 +05:30
display: none;
}
2021-01-03 14:25:43 +05:30
}
2017-09-10 17:25:29 +05:30
2021-01-03 14:25:43 +05:30
.toggle-right-sidebar-button {
border-bottom: 1px solid $border-color;
2017-09-10 17:25:29 +05:30
}
2018-03-17 18:26:18 +05:30
.collapse-text {
white-space: nowrap;
overflow: hidden;
}
2017-09-10 17:25:29 +05:30
2018-03-17 18:26:18 +05:30
.sidebar-collapsed-desktop {
2019-07-07 11:18:12 +05:30
@include collapse-contextual-sidebar-content;
2017-09-10 17:25:29 +05:30
}
2018-03-17 18:26:18 +05:30
.fly-out-top-item {
> a {
display: flex;
}
.fly-out-badge {
margin-left: 8px;
}
}
.fly-out-top-item-name {
flex: 1;
}
2017-09-10 17:25:29 +05:30
// Mobile nav
.close-nav-button {
display: none;
}
2019-07-07 11:18:12 +05:30
@include media-breakpoint-down(sm) {
2017-09-10 17:25:29 +05:30
.close-nav-button {
display: flex;
}
2019-07-07 11:18:12 +05:30
.toggle-sidebar-button {
display: none;
}
2019-05-18 00:54:41 +05:30
2019-07-07 11:18:12 +05:30
.mobile-overlay {
display: none;
&.mobile-nav-open {
display: block;
position: fixed;
background-color: $black-transparent;
height: 100%;
width: 100%;
2021-03-11 19:13:27 +05:30
z-index: $zindex-dropdown-menu;
2019-07-07 11:18:12 +05:30
}
2017-09-10 17:25:29 +05:30
}
}