gitlab-org--gitlab-foss/app/assets/stylesheets/framework/contextual-sidebar.scss

475 lines
7.9 KiB
SCSS
Raw Normal View History

.page-with-contextual-sidebar {
2017-08-07 15:41:33 -04:00
@media (min-width: $screen-md-min) {
padding-left: $contextual-sidebar-collapsed-width;
2017-08-07 15:41:33 -04:00
}
2017-08-02 21:19:43 -04:00
@media (min-width: $screen-lg-min) {
padding-left: $contextual-sidebar-width;
}
2017-06-27 16:30:15 -04:00
// Override position: absolute
.right-sidebar {
position: fixed;
height: calc(100% - #{$header-height});
}
2017-07-24 03:47:38 -04:00
.issues-bulk-update.right-sidebar.right-sidebar-expanded .issuable-sidebar-header {
padding: 10px 0 15px;
}
}
2017-08-02 21:19:43 -04:00
.page-with-icon-sidebar {
@media (min-width: $screen-sm-min) {
padding-left: $contextual-sidebar-collapsed-width;
2017-08-02 21:19:43 -04:00
}
}
2017-06-27 16:30:15 -04:00
.context-header {
2017-07-17 18:33:12 -04:00
position: relative;
margin-right: 2px;
2017-06-28 10:52:11 -04:00
2017-07-17 18:33:12 -04:00
a {
font-weight: $gl-font-weight-bold;
2017-07-17 18:33:12 -04:00
display: flex;
align-items: center;
padding: 10px 16px 10px 10px;
color: $gl-text-color;
}
2017-07-07 08:28:06 -04:00
&:hover,
a:hover {
2017-10-20 19:07:48 -04:00
background-color: $link-hover-background;
color: $gl-text-color;
2017-06-28 10:52:11 -04:00
}
2017-07-17 18:33:12 -04:00
.avatar-container {
flex: 0 0 40px;
background-color: $white-light;
}
.sidebar-context-title {
overflow: hidden;
text-overflow: ellipsis;
}
2017-06-27 16:30:15 -04:00
}
.settings-avatar {
background-color: $white-light;
svg {
fill: $gl-text-color-secondary;
margin: auto;
2017-06-27 16:30:15 -04:00
}
}
.nav-sidebar {
position: fixed;
z-index: 400;
width: $contextual-sidebar-width;
2017-07-18 12:40:42 -04:00
transition: left $sidebar-transition-duration;
top: $header-height;
bottom: 0;
left: 0;
background-color: $gray-light;
2017-07-07 08:28:06 -04:00
box-shadow: inset -2px 0 0 $border-color;
transform: translate3d(0, 0, 0);
2017-07-07 08:28:06 -04:00
&:not(.sidebar-icons-only) {
@media (min-width: $screen-sm-min) and (max-width: $screen-md-max) {
box-shadow: inset -2px 0 0 $border-color,
2px 1px 3px $dropdown-shadow-color;
}
}
2017-08-02 21:19:43 -04:00
&.sidebar-icons-only {
width: auto;
min-width: $contextual-sidebar-collapsed-width;
2017-08-02 21:19:43 -04:00
.nav-sidebar-inner-scroll {
overflow-x: hidden;
}
.badge:not(.fly-out-badge),
.sidebar-context-title,
2017-08-08 12:07:16 -04:00
.nav-item-name {
display: none;
}
.sidebar-top-level-items > li > a {
min-height: 44px;
2017-08-08 12:07:16 -04:00
}
.fly-out-top-item {
display: block;
}
.avatar-container {
margin-right: 0;
}
2017-08-02 21:19:43 -04:00
}
2017-07-17 18:33:12 -04:00
&.nav-sidebar-expanded {
2017-07-18 12:40:42 -04:00
left: 0;
2017-07-17 18:33:12 -04:00
}
2017-07-07 08:28:06 -04:00
a {
2017-07-18 14:43:33 -04:00
transition: none;
2017-07-07 08:28:06 -04:00
text-decoration: none;
}
ul {
2017-07-07 08:28:06 -04:00
padding-left: 0;
list-style: none;
}
li {
white-space: nowrap;
a {
2017-08-02 11:20:33 -04:00
display: flex;
align-items: center;
2017-07-07 08:28:06 -04:00
padding: 12px 16px;
2017-10-20 19:07:48 -04:00
color: $gl-text-color-secondary;
}
2017-08-02 11:20:33 -04:00
2017-07-12 05:50:26 -04:00
.nav-item-name {
flex: 1;
}
2017-07-12 05:50:26 -04:00
&.active {
> a {
font-weight: $gl-font-weight-bold;
}
2017-07-07 08:28:06 -04:00
}
}
@media (max-width: $screen-xs-max) {
left: (-$contextual-sidebar-width);
}
2017-08-02 11:20:33 -04:00
.nav-icon-container {
display: flex;
margin-right: 8px;
}
.fly-out-top-item {
display: none;
}
svg {
height: 16px;
width: 16px;
}
}
.nav-sidebar-inner-scroll {
height: 100%;
width: 100%;
overflow: auto;
@media (min-width: $screen-sm-min) {
overflow: hidden;
}
}
.with-performance-bar .nav-sidebar {
top: $header-height + $performance-bar-height;
}
.sidebar-sub-level-items {
display: none;
2017-07-07 08:28:06 -04:00
padding-bottom: 8px;
> li {
a {
2017-08-08 15:47:47 -04:00
padding: 8px 16px 8px 40px;
2017-07-07 08:28:06 -04:00
&:hover,
&:focus {
2017-10-20 19:07:48 -04:00
background: $link-active-background;
color: $gl-text-color;
}
}
&.active {
2017-07-07 08:28:06 -04:00
a {
&,
&:hover,
&:focus {
2017-10-20 19:07:48 -04:00
background: $link-active-background;
2017-07-07 08:28:06 -04:00
}
}
}
}
}
.sidebar-top-level-items {
2017-08-02 21:19:43 -04:00
margin-bottom: 60px;
> li {
2017-07-19 11:57:00 -04:00
> a {
@media (min-width: $screen-sm-min) {
margin-right: 2px;
}
&:hover {
color: $gl-text-color;
}
2017-07-19 11:57:00 -04:00
}
&.is-showing-fly-out {
2017-07-28 10:56:08 -04:00
> a {
margin-right: 2px;
}
.sidebar-sub-level-items {
@media (min-width: $screen-sm-min) {
position: fixed;
top: 0;
left: 0;
min-width: 150px;
margin-top: -1px;
padding: 4px 1px;
background-color: $white-light;
box-shadow: 2px 1px 3px $dropdown-shadow-color;
border: 1px solid $gray-darker;
border-left: 0;
2017-07-19 11:57:00 -04:00
border-radius: 0 3px 3px 0;
&::before {
content: "";
position: absolute;
top: -30px;
bottom: -30px;
left: -10px;
right: -30px;
z-index: -1;
}
&.is-above {
margin-top: 1px;
}
.divider {
height: 1px;
margin: 4px -1px;
padding: 0;
background-color: $dropdown-divider-color;
}
> .active {
box-shadow: none;
> a {
background-color: transparent;
}
}
a {
padding: 8px 16px;
color: $gl-text-color;
&:hover,
&:focus {
background-color: $gray-darker;
}
}
}
}
}
.badge {
2017-07-07 08:28:06 -04:00
background-color: $inactive-badge-background;
2017-10-20 19:07:48 -04:00
color: $gl-text-color-secondary;
}
&.active {
2017-10-20 19:07:48 -04:00
background: $link-active-background;
> a {
margin-left: 4px;
2017-08-08 15:47:47 -04:00
padding-left: 12px;
}
.badge {
font-weight: $gl-font-weight-bold;
}
.sidebar-sub-level-items:not(.is-fly-out-only) {
display: block;
}
}
&.active > a:hover,
2017-08-01 03:49:03 -04:00
&.is-over > a {
2017-10-20 19:07:48 -04:00
background-color: $link-hover-background;
}
}
}
2017-08-02 21:19:43 -04:00
// Collapsed nav
2017-08-07 15:41:33 -04:00
.toggle-sidebar-button,
.close-nav-button {
width: $contextual-sidebar-width - 2px;
2017-08-02 21:19:43 -04:00
position: fixed;
bottom: 0;
padding: 16px;
background-color: $gray-light;
2017-08-07 15:41:33 -04:00
border: 0;
2017-08-02 21:19:43 -04:00
border-top: 2px solid $border-color;
color: $gl-text-color-secondary;
display: flex;
align-items: center;
svg {
2017-08-02 21:19:43 -04:00
margin-right: 8px;
}
.icon-angle-double-right {
2017-08-02 21:19:43 -04:00
display: none;
}
&:hover {
background-color: $border-color;
color: $gl-text-color;
}
}
2017-08-07 15:41:33 -04:00
.toggle-sidebar-button {
@media (max-width: $screen-xs-max) {
display: none;
}
}
2017-08-02 21:19:43 -04:00
.sidebar-icons-only {
.context-header {
2017-08-08 12:07:16 -04:00
height: 61px;
2017-08-02 21:19:43 -04:00
a {
padding: 10px 4px;
}
}
li a {
padding: 12px 15px;
}
.sidebar-top-level-items > li {
&.active a {
padding-left: 12px;
}
.sidebar-sub-level-items {
&:not(.flyout-list) {
display: none;
}
}
}
.nav-icon-container {
margin-right: 0;
}
2017-08-02 21:19:43 -04:00
.toggle-sidebar-button {
width: $contextual-sidebar-collapsed-width - 2px;
2017-09-28 13:31:33 -04:00
padding: 16px;
2017-08-02 21:19:43 -04:00
.collapse-text,
.icon-angle-double-left {
2017-08-02 21:19:43 -04:00
display: none;
}
.icon-angle-double-right {
2017-08-02 21:19:43 -04:00
display: block;
margin: 0;
2017-08-02 21:19:43 -04:00
}
}
}
.fly-out-top-item {
> a {
display: flex;
}
.fly-out-badge {
margin-left: 8px;
}
}
.fly-out-top-item-name {
flex: 1;
}
2017-08-02 21:19:43 -04:00
// Mobile nav
2017-08-07 15:41:33 -04:00
.close-nav-button {
display: none;
}
2017-07-17 18:33:12 -04:00
.toggle-mobile-nav {
display: none;
background-color: transparent;
border: 0;
padding: 6px 16px;
2017-09-18 12:21:04 -04:00
margin: 0 0 0 -15px;
2017-07-17 18:33:12 -04:00
height: 46px;
i {
font-size: 20px;
color: $gl-text-color-secondary;
}
@media (max-width: $screen-xs-max) {
2017-09-18 12:21:04 -04:00
display: flex;
align-items: center;
i {
font-size: 18px;
}
2017-07-17 18:33:12 -04:00
}
@media (max-width: $screen-xs-max) {
+ .breadcrumbs-links {
padding-left: $gl-padding;
border-left: 1px solid $gl-text-color-quaternary;
}
}
2017-07-17 18:33:12 -04:00
}
2017-08-07 15:41:33 -04:00
@media (max-width: $screen-xs-max) {
.close-nav-button {
display: flex;
}
}
2017-07-18 12:40:42 -04:00
.mobile-overlay {
display: none;
&.mobile-nav-open {
display: block;
position: fixed;
2017-07-18 12:40:42 -04:00
background-color: $black-transparent;
height: 100%;
width: 100%;
z-index: 300;
}
}
// Make issue boards full-height now that sub-nav is gone
.boards-list {
height: calc(100vh - #{$header-height});
@media (min-width: $screen-sm-min) {
height: calc(100vh - 180px);
}
}
2017-07-07 08:28:06 -04:00
.with-performance-bar .boards-list {
height: calc(100vh - #{$header-height} - #{$performance-bar-height});
}