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

528 lines
8.3 KiB
SCSS
Raw Normal View History

2016-09-29 09:46:39 +05:30
@mixin fade($gradient-direction, $gradient-color) {
2016-08-24 12:49:21 +05:30
visibility: hidden;
opacity: 0;
z-index: 2;
position: absolute;
bottom: 12px;
width: 43px;
height: 30px;
transition-duration: .3s;
-webkit-transform: translateZ(0);
2016-09-29 09:46:39 +05:30
background: linear-gradient(to $gradient-direction, $gradient-color 45%, rgba($gradient-color, 0.4));
2016-08-24 12:49:21 +05:30
&.scrolling {
visibility: visible;
opacity: 1;
transition-duration: .3s;
}
2016-06-22 15:30:34 +05:30
.fa {
position: relative;
2016-08-24 12:49:21 +05:30
top: 5px;
font-size: 18px;
2016-06-22 15:30:34 +05:30
}
}
@mixin scrolling-links() {
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
2017-08-17 22:00:37 +05:30
display: flex;
2016-08-24 12:49:21 +05:30
&::-webkit-scrollbar {
display: none;
}
}
.nav-links {
2017-08-17 22:00:37 +05:30
display: flex;
padding: 0;
margin: 0;
list-style: none;
height: auto;
border-bottom: 1px solid $border-color;
li {
2017-08-17 22:00:37 +05:30
display: flex;
a {
padding: $gl-btn-padding;
padding-bottom: 11px;
2017-08-17 22:00:37 +05:30
font-size: 14px;
line-height: 28px;
2017-08-17 22:00:37 +05:30
color: $gl-text-color-secondary;
border-bottom: 2px solid transparent;
2017-08-17 22:00:37 +05:30
white-space: nowrap;
2017-08-17 22:00:37 +05:30
&:hover,
&:active,
&:focus {
text-decoration: none;
2017-08-17 22:00:37 +05:30
border-bottom: 2px solid $gray-darkest;
color: $black;
.badge {
color: $black;
}
}
}
&.active a {
2016-06-02 11:05:42 +05:30
border-bottom: 2px solid $link-underline-blue;
color: $black;
2017-08-17 22:00:37 +05:30
font-weight: 600;
2017-08-17 22:00:37 +05:30
.badge {
color: $black;
}
}
}
&.sub-nav {
text-align: center;
2017-08-17 22:00:37 +05:30
background-color: $gray-normal;
.container-fluid {
2017-08-17 22:00:37 +05:30
background-color: $gray-normal;
margin-bottom: 0;
2017-08-17 22:00:37 +05:30
display: flex;
}
li {
2017-08-17 22:00:37 +05:30
&.active a {
border-bottom: none;
color: $link-underline-blue;
}
a {
margin: 0;
padding: 11px 10px 9px;
2017-08-17 22:00:37 +05:30
&:hover,
&:active,
&:focus {
border-color: transparent;
}
}
}
}
}
2016-04-02 18:10:28 +05:30
.top-area {
@include clearfix;
2017-08-17 22:00:37 +05:30
border-bottom: 1px solid $border-color;
2016-04-02 18:10:28 +05:30
.nav-text {
padding-top: 16px;
padding-bottom: 11px;
display: inline-block;
line-height: 28px;
2017-08-17 22:00:37 +05:30
white-space: normal;
2016-04-02 18:10:28 +05:30
/* Small devices (phones, tablets, 768px and lower) */
2017-08-17 22:00:37 +05:30
@media (max-width: $screen-xs-max) {
2016-04-02 18:10:28 +05:30
width: 100%;
}
}
2016-06-02 11:05:42 +05:30
.nav-search {
display: inline-block;
width: 100%;
padding: 11px 0;
/* Small devices (phones, tablets, 768px and lower) */
@media (min-width: $screen-sm-min) {
width: 50%;
}
}
2016-04-02 18:10:28 +05:30
.nav-links {
2016-06-02 11:05:42 +05:30
margin-bottom: 0;
2016-04-02 18:10:28 +05:30
border-bottom: none;
2017-08-17 22:00:37 +05:30
float: left;
2016-04-02 18:10:28 +05:30
2016-08-24 12:49:21 +05:30
&.wide {
width: 100%;
display: block;
}
2017-08-17 22:00:37 +05:30
&.scrolling-tabs {
float: left;
}
li a {
2016-09-29 09:46:39 +05:30
padding: 16px 15px 11px;
}
2016-04-02 18:10:28 +05:30
/* Small devices (phones, tablets, 768px and lower) */
2016-06-22 15:30:34 +05:30
@media (max-width: $screen-xs-max) {
2016-04-02 18:10:28 +05:30
width: 100%;
}
}
.nav-controls {
display: inline-block;
float: right;
text-align: right;
padding: 11px 0;
2016-06-02 11:05:42 +05:30
margin-bottom: 0;
2016-04-02 18:10:28 +05:30
2017-08-17 22:00:37 +05:30
> .btn,
> .btn-container,
> .dropdown,
> input,
> form {
2016-04-02 18:10:28 +05:30
margin-right: $gl-padding-top;
display: inline-block;
2016-08-24 12:49:21 +05:30
vertical-align: top;
2016-04-02 18:10:28 +05:30
&:last-child {
margin-right: 0;
2017-08-17 22:00:37 +05:30
float: right;
2016-04-02 18:10:28 +05:30
}
}
> .btn-grouped {
float: none;
}
2016-06-02 11:05:42 +05:30
.icon-label {
display: none;
2016-04-02 18:10:28 +05:30
}
2017-08-17 22:00:37 +05:30
.btn,
.dropdown,
.dropdown-toggle,
input,
form {
height: 35px;
2017-08-17 22:00:37 +05:30
}
input {
2016-04-02 18:10:28 +05:30
display: inline-block;
position: relative;
/* Medium devices (desktops, 992px and up) */
@media (min-width: $screen-md-min) { width: 200px; }
/* Large devices (large desktops, 1200px and up) */
@media (min-width: $screen-lg-min) { width: 250px; }
&.input-short {
/* Medium devices (desktops, 992px and up) */
@media (min-width: $screen-md-min) { width: 170px; }
/* Large devices (large desktops, 1200px and up) */
@media (min-width: $screen-lg-min) { width: 210px; }
}
}
@media (max-width: $screen-xs-max) {
2016-06-02 11:05:42 +05:30
padding-bottom: 0;
width: 100%;
2016-11-03 12:29:30 +05:30
2017-08-17 22:00:37 +05:30
.btn,
form,
.dropdown,
.dropdown-toggle,
.dropdown-menu-toggle,
.form-control {
2016-06-02 11:05:42 +05:30
margin: 0 0 10px;
display: block;
width: 100%;
}
form {
display: block;
height: auto;
2016-06-22 15:30:34 +05:30
margin-bottom: 14px;
2016-06-02 11:05:42 +05:30
input {
width: 100%;
margin: 0 0 10px;
}
}
.input-short {
width: 100%;
}
.icon-label {
display: inline-block;
}
// Applies on /dashboard/issues
.project-item-select-holder {
display: block;
margin: 0;
}
2016-04-02 18:10:28 +05:30
}
}
2016-06-22 15:30:34 +05:30
&.adjust {
2017-08-17 22:00:37 +05:30
.nav-text,
.nav-controls {
2016-06-22 15:30:34 +05:30
width: auto;
2017-08-17 22:00:37 +05:30
@media (max-width: $screen-xs-max) {
width: 100%;
}
}
}
&.multi-line {
.nav-text {
line-height: 20px;
2016-06-22 15:30:34 +05:30
}
2017-08-17 22:00:37 +05:30
.nav-controls {
padding: 17px 0;
}
}
pre {
width: 100%;
2016-06-22 15:30:34 +05:30
}
2016-04-02 18:10:28 +05:30
}
2016-06-02 11:05:42 +05:30
.layout-nav {
width: 100%;
2017-08-17 22:00:37 +05:30
background: $gray-light;
2016-06-02 11:05:42 +05:30
border-bottom: 1px solid $border-color;
2016-06-22 15:30:34 +05:30
transition: padding $sidebar-transition-duration;
text-align: center;
2016-06-02 11:05:42 +05:30
.container-fluid {
position: relative;
2017-08-17 22:00:37 +05:30
.nav-control {
@media (max-width: $screen-sm-max) {
margin-right: 2px;
}
}
2016-06-02 11:05:42 +05:30
}
.controls {
float: right;
padding: 7px 0 0;
i {
color: $layout-link-gray;
}
.fa-rss,
.fa-cog {
font-size: 16px;
}
.fa-caret-down {
margin-left: 5px;
2017-08-17 22:00:37 +05:30
color: $gl-text-color-secondary;
2016-06-02 11:05:42 +05:30
}
.dropdown {
position: absolute;
top: 7px;
right: 15px;
z-index: 2;
2016-06-02 11:05:42 +05:30
li.active {
font-weight: bold;
2016-06-02 11:05:42 +05:30
}
}
}
.nav-links {
border-bottom: none;
height: 51px;
2017-08-17 22:00:37 +05:30
@media (min-width: $screen-sm-min) {
justify-content: center;
}
2016-06-02 11:05:42 +05:30
2017-08-17 22:00:37 +05:30
li {
2016-06-02 11:05:42 +05:30
a {
padding-top: 10px;
}
}
}
}
.scrolling-tabs-container {
position: relative;
2017-08-17 22:00:37 +05:30
.merge-request-tabs-container & {
overflow: hidden;
}
.nav-links {
@include scrolling-links();
2016-08-24 12:49:21 +05:30
}
.fade-right {
2017-08-17 22:00:37 +05:30
@include fade(left, $gray-light);
2016-08-24 12:49:21 +05:30
right: -5px;
.fa {
right: -7px;
}
}
.fade-left {
2017-08-17 22:00:37 +05:30
@include fade(right, $gray-light);
2016-08-24 12:49:21 +05:30
left: -5px;
2017-08-17 22:00:37 +05:30
text-align: center;
2016-08-24 12:49:21 +05:30
.fa {
left: -7px;
}
}
&.sub-nav-scroll {
.fade-right {
2017-08-17 22:00:37 +05:30
@include fade(left, $gray-normal);
right: 0;
2016-08-24 12:49:21 +05:30
.fa {
right: -23px;
}
}
.fade-left {
2017-08-17 22:00:37 +05:30
@include fade(right, $gray-normal);
left: 0;
2016-08-24 12:49:21 +05:30
.fa {
left: 10px;
}
}
}
}
.nav-block {
position: relative;
.nav-links {
@include scrolling-links();
.fade-right {
2016-09-29 09:46:39 +05:30
@include fade(left, $white-light);
2016-08-24 12:49:21 +05:30
right: -5px;
.fa {
right: -7px;
}
}
.fade-left {
2016-09-29 09:46:39 +05:30
@include fade(right, $white-light);
2016-08-24 12:49:21 +05:30
left: -5px;
2016-08-24 12:49:21 +05:30
.fa {
left: -7px;
}
}
}
2016-06-02 11:05:42 +05:30
}
.page-with-layout-nav {
.right-sidebar {
2017-08-17 22:00:37 +05:30
top: ($header-height + 1) * 2;
}
&.page-with-sub-nav {
.right-sidebar {
top: ($header-height + 1) * 3;
&.affix {
top: 0;
}
}
}
}
.activities {
.nav-block {
border-bottom: 1px solid $border-color;
2016-06-02 11:05:42 +05:30
.nav-links {
border-bottom: none;
2016-06-02 11:05:42 +05:30
}
}
}
2017-08-17 22:00:37 +05:30
@media (max-width: $screen-xs-max) {
.top-area {
flex-flow: row wrap;
.nav-controls {
$controls-margin: $btn-xs-side-margin - 2px;
flex: 0 0 100%;
&.controls-flex {
display: flex;
flex-flow: row wrap;
align-items: center;
justify-content: center;
padding: 0 0 $gl-padding-top;
}
.controls-item,
.controls-item-full,
.controls-item:last-child {
flex: 1 1 35%;
display: block;
width: 100%;
margin: $controls-margin;
.btn,
.dropdown {
margin: 0;
}
}
.controls-item-full {
flex: 1 1 100%;
}
}
}
}
.inner-page-scroll-tabs {
position: relative;
.fade-right {
@include fade(left, $white-light);
right: 0;
text-align: right;
.fa {
right: 5px;
}
}
.fade-left {
@include fade(right, $white-light);
left: 0;
text-align: left;
.fa {
left: 5px;
}
}
.fade-right,
.fade-left {
top: 16px;
bottom: auto;
}
&.is-smaller {
.fade-right,
.fade-left {
top: 11px;
}
}
}