gitlab-org--gitlab-foss/app/assets/stylesheets/framework/nav.scss

476 lines
7.6 KiB
SCSS
Raw Normal View History

@mixin fade($gradient-direction, $gradient-color) {
visibility: hidden;
opacity: 0;
z-index: 1;
position: absolute;
bottom: 12px;
width: 43px;
height: 30px;
transition-duration: .3s;
-webkit-transform: translateZ(0);
background: linear-gradient(to $gradient-direction, $gradient-color 45%, rgba($gradient-color, 0.4));
&.scrolling {
visibility: visible;
opacity: 1;
transition-duration: .3s;
}
2016-06-20 13:11:22 -04:00
.fa {
position: relative;
top: 6px;
font-size: 18px;
2016-06-20 13:11:22 -04:00
}
}
2016-05-25 12:42:43 -04:00
@mixin scrolling-links() {
white-space: nowrap;
overflow-x: auto;
overflow-y: hidden;
-webkit-overflow-scrolling: touch;
2016-05-25 12:42:43 -04:00
&::-webkit-scrollbar {
display: none;
}
}
.nav-links {
padding: 0;
margin: 0;
list-style: none;
height: auto;
border-bottom: 1px solid $border-color;
li {
display: inline-block;
a {
display: inline-block;
2016-06-06 18:01:16 -04:00
padding: $gl-btn-padding;
padding-bottom: 11px;
margin-bottom: -1px;
2016-12-02 14:43:33 -05:00
font-size: 14px;
line-height: 28px;
2016-12-30 15:18:27 -05:00
color: $gl-text-color-secondary;
border-bottom: 2px solid transparent;
&:hover,
&:active,
&:focus {
text-decoration: none;
2016-11-18 14:24:08 -05:00
border-bottom: 2px solid $gray-darkest;
color: $black;
.badge {
color: $black;
}
}
}
&.active a {
2016-05-03 12:44:55 -04:00
border-bottom: 2px solid $link-underline-blue;
color: $black;
2016-11-18 14:24:08 -05:00
font-weight: 600;
.badge {
color: $black;
}
}
}
2016-06-03 11:53:04 -04:00
&.sub-nav {
2016-12-12 17:26:21 -05:00
background-color: $gray-normal;
2016-06-03 11:53:04 -04:00
.container-fluid {
2016-12-12 17:26:21 -05:00
background-color: $gray-normal;
2016-06-13 15:30:40 -04:00
margin-bottom: 0;
2016-06-03 11:53:04 -04:00
}
li {
2016-11-18 14:24:08 -05:00
&.active a {
border-bottom: none;
2016-11-29 13:00:02 -05:00
color: $link-underline-blue;
2016-11-18 14:24:08 -05:00
}
2016-06-03 11:53:04 -04:00
a {
margin: 0;
padding: 11px 10px 9px;
2016-11-18 14:24:08 -05:00
&:hover,
&:active,
&:focus {
border-color: transparent;
2016-11-18 14:24:08 -05:00
}
2016-06-03 11:53:04 -04:00
}
}
}
}
.top-area {
@include clearfix;
2016-12-12 17:26:21 -05:00
border-bottom: 1px solid $white-normal;
.nav-text {
padding-top: 16px;
padding-bottom: 11px;
display: inline-block;
line-height: 28px;
white-space: normal;
/* Small devices (phones, tablets, 768px and lower) */
2016-11-29 20:58:03 -05:00
@media (max-width: $screen-xs-max) {
width: 100%;
}
}
.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%;
}
}
.nav-links {
display: inline-block;
width: 50%;
margin-bottom: 0;
border-bottom: none;
&.wide {
width: 100%;
display: block;
}
2016-06-06 18:01:16 -04:00
li a {
padding: 16px 15px 11px;
2016-06-06 18:01:16 -04:00
}
/* Small devices (phones, tablets, 768px and lower) */
@media (max-width: $screen-xs-max) {
width: 100%;
}
}
.nav-controls {
display: inline-block;
float: right;
text-align: right;
padding: 11px 0;
margin-bottom: 0;
> .btn,
> .btn-container,
> .dropdown,
> input,
> form {
margin-right: $gl-padding-top;
display: inline-block;
vertical-align: top;
&:last-child {
margin-right: 0;
float: right;
}
}
> .btn-grouped {
float: none;
}
2016-03-14 19:30:53 -04:00
.icon-label {
display: none;
}
.btn,
.dropdown,
.dropdown-toggle,
input,
form {
height: 35px;
}
input {
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) {
padding-bottom: 0;
width: 100%;
.btn,
form,
.dropdown,
.dropdown-toggle,
.dropdown-menu-toggle,
.form-control {
margin: 0 0 10px;
2016-03-14 19:30:53 -04:00
display: block;
width: 100%;
2016-03-14 19:30:53 -04:00
}
form {
display: block;
height: auto;
margin-bottom: 14px;
input {
width: 100%;
2016-03-18 16:02:45 -04:00
margin: 0 0 10px;
}
2016-03-14 19:30:53 -04:00
}
2016-03-18 16:02:45 -04:00
.input-short {
2016-03-14 19:30:53 -04:00
width: 100%;
}
.icon-label {
display: inline-block;
}
// Applies on /dashboard/issues
.project-item-select-holder {
display: block;
margin: 0;
}
}
}
2016-06-14 12:48:42 -04:00
&.adjust {
.nav-text,
.nav-controls {
2016-06-14 12:48:42 -04:00
width: auto;
@media (max-width: $screen-xs-max) {
width: 100%;
}
2016-06-14 12:48:42 -04:00
}
}
2016-12-05 13:55:57 -05:00
&.multi-line {
.nav-text {
line-height: 20px;
}
.nav-controls {
padding: 17px 0;
}
}
pre {
width: 100%;
}
}
.layout-nav {
width: 100%;
2016-12-12 17:26:21 -05:00
background: $gray-light;
border-bottom: 1px solid $border-color;
2016-06-15 13:14:20 -04:00
transition: padding $sidebar-transition-duration;
.container-fluid {
position: relative;
.nav-control {
@media (max-width: $screen-sm-max) {
margin-right: 75px;
}
}
}
.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;
2016-12-30 15:18:27 -05:00
color: $gl-text-color-secondary;
}
.dropdown {
position: absolute;
top: 7px;
right: 15px;
2016-06-13 10:58:09 -04:00
z-index: 2;
li.active {
font-weight: bold;
}
}
}
.nav-links {
border-bottom: none;
height: 51px;
li {
a {
padding-top: 10px;
}
}
}
}
2016-06-03 14:39:04 -04:00
.scrolling-tabs-container {
position: relative;
.nav-links {
@include scrolling-links();
}
2016-06-03 14:39:04 -04:00
.fade-right {
2016-12-12 17:26:21 -05:00
@include fade(left, $gray-light);
right: -5px;
.fa {
right: -28px;
2016-06-03 14:39:04 -04:00
}
}
2016-06-03 14:39:04 -04:00
.fade-left {
2016-12-12 17:26:21 -05:00
@include fade(right, $gray-light);
left: -5px;
text-align: center;
.fa {
left: -7px;
2016-06-03 14:39:04 -04:00
}
}
&.sub-nav-scroll {
.fade-right {
2016-12-12 17:26:21 -05:00
@include fade(left, $gray-normal);
right: 0;
.fa {
right: -23px;
}
}
.fade-left {
2016-12-12 17:26:21 -05:00
@include fade(right, $gray-normal);
left: 0;
.fa {
left: -4px;
}
}
}
2016-06-03 14:39:04 -04:00
}
2016-05-25 12:42:43 -04:00
.nav-block {
position: relative;
.nav-links {
@include scrolling-links();
.fade-right {
@include fade(left, $white-light);
right: -5px;
.fa {
right: -7px;
}
2016-05-25 12:42:43 -04:00
}
.fade-left {
@include fade(right, $white-light);
left: -5px;
.fa {
left: -7px;
}
2016-05-25 12:42:43 -04:00
}
}
}
.page-with-layout-nav {
2016-05-19 11:11:54 -04:00
.right-sidebar {
top: ($header-height * 2) + 2;
2016-05-19 11:11:54 -04:00
}
.build-sidebar {
top: ($header-height * 3) + 3;
&.affix {
top: 0;
}
}
}
.activities {
.nav-block {
border-bottom: 1px solid $border-color;
.nav-links {
border-bottom: none;
}
}
}
@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%;
}
}
}
}