summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2016-03-23 20:10:00 +0000
committerRémy Coutable <remy@rymai.me>2016-03-29 12:11:09 +0200
commit329fd857b06bcc44cdfa6942db7a6f3a9fc6e2b6 (patch)
tree9b2a54b63301474a5f6b5fe6c4b0ec5d0d5b181c
parent9dc8f3d40c898910375ecdee4c89e09cdcdef5e7 (diff)
downloadgitlab-ce-329fd857b06bcc44cdfa6942db7a6f3a9fc6e2b6.tar.gz
Merge branch 'issue-sidebar-overlap' into 'master'
Issue sidebar overlaps on tablet Closes #14180 ![Screen_Shot_2016-03-18_at_13.10.53](/uploads/d1e81778740a034aa98c881a70e55254/Screen_Shot_2016-03-18_at_13.10.53.png) See merge request !3299
-rw-r--r--CHANGELOG1
-rw-r--r--app/assets/javascripts/sidebar.js.coffee1
-rw-r--r--app/assets/stylesheets/framework/sidebar.scss140
3 files changed, 59 insertions, 83 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 216928aefe9..27cf08a398c 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -4,6 +4,7 @@ v 8.6.3 (unreleased)
v 8.6.2
- Fix dropdown alignment. !3298
+ - Fix issuable sidebar overlaps on tablet. !3299
v 8.6.1
- Add option to reload the schema before restoring a database backup. !2807
diff --git a/app/assets/javascripts/sidebar.js.coffee b/app/assets/javascripts/sidebar.js.coffee
index eea3f5ee910..860d4f438d0 100644
--- a/app/assets/javascripts/sidebar.js.coffee
+++ b/app/assets/javascripts/sidebar.js.coffee
@@ -4,7 +4,6 @@ expanded = 'page-sidebar-expanded'
toggleSidebar = ->
$('.page-with-sidebar').toggleClass("#{collapsed} #{expanded}")
$('header').toggleClass("header-collapsed header-expanded")
- $('.sidebar-wrapper').toggleClass("sidebar-collapsed sidebar-expanded")
$('.toggle-nav-collapse i').toggleClass("fa-angle-right fa-angle-left")
$.cookie("collapsed_nav", $('.page-with-sidebar').hasClass(collapsed), { path: '/' })
diff --git a/app/assets/stylesheets/framework/sidebar.scss b/app/assets/stylesheets/framework/sidebar.scss
index 6107c8a6d0a..9d188317783 100644
--- a/app/assets/stylesheets/framework/sidebar.scss
+++ b/app/assets/stylesheets/framework/sidebar.scss
@@ -1,3 +1,10 @@
+#logo {
+ z-index: 2;
+ position: absolute;
+ width: 58px;
+ cursor: pointer;
+}
+
.page-with-sidebar {
padding-top: $header-height;
transition-duration: .3s;
@@ -18,24 +25,6 @@
position: absolute;
left: 0;
}
-
- #logo {
- z-index: 2;
- position: absolute;
- width: 58px;
- cursor: pointer;
- }
-
- &.right-sidebar-expanded {
- /* Extra small devices (phones, less than 768px) */
- /* No media query since this is the default in Bootstrap */
- padding-right: 0;
- /* Small devices (tablets, 768px and up) */
- @media (min-width: $screen-sm-min) {
- padding-right: $gutter_width;
- }
-
- }
}
.sidebar-wrapper {
@@ -202,53 +191,27 @@
}
}
-@mixin expanded-sidebar {
- padding-left: $sidebar_collapsed_width;
-
- @media (min-width: $screen-md-min) {
- padding-left: $sidebar_width;
- }
-
- &.right-sidebar-collapsed {
- /* Extra small devices (phones, less than 768px) */
- padding-right: 0;
- /* Small devices (tablets, 768px and up) */
- @media (min-width: $screen-sm-min) {
- padding-right: $sidebar_collapsed_width;
- }
- }
-
- .sidebar-wrapper {
- width: $sidebar_width;
-
- .nav-sidebar {
- width: $sidebar_width;
- }
-
- .nav-sidebar li a{
- width: 230px;
+.collapse-nav a {
+ width: $sidebar_width;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ font-size: 13px;
+ background: transparent;
+ height: 40px;
+ text-align: center;
+ line-height: 40px;
+ transition-duration: .3s;
+ outline: none;
- &.back-link {
- i {
- opacity: 0;
- }
- }
- }
+ &:hover {
+ text-decoration: none;
}
}
-@mixin collapsed-sidebar {
+.page-sidebar-collapsed {
padding-left: $sidebar_collapsed_width;
- &.right-sidebar-collapsed {
- /* Extra small devices (phones, less than 768px) */
- padding-right: 0;
- /* Small devices (tablets, 768px and up) */
- @media (min-width: $screen-sm-min) {
- padding-right: $sidebar_collapsed_width;
- }
- }
-
.sidebar-wrapper {
width: $sidebar_collapsed_width;
@@ -293,35 +256,48 @@
}
}
-.collapse-nav a {
- width: $sidebar_width;
- position: fixed;
- bottom: 0;
- left: 0;
- font-size: 13px;
- background: transparent;
- height: 40px;
- text-align: center;
- line-height: 40px;
- transition-duration: .3s;
- outline: none;
-}
+.page-sidebar-expanded {
+ padding-left: $sidebar_collapsed_width;
+
+ @media (min-width: $screen-md-min) {
+ padding-left: $sidebar_width;
+ }
+
+ .sidebar-wrapper {
+ width: $sidebar_width;
+
+ .nav-sidebar {
+ width: $sidebar_width;
+ }
+
+ .nav-sidebar li a {
+ width: 230px;
-.collapse-nav a:hover {
- text-decoration: none;
- background: #f2f6f7;
+ &.back-link {
+ i {
+ opacity: 0;
+ }
+ }
+ }
+ }
}
-.page-sidebar-collapsed {
- /* Extra small devices (phones, less than 768px) */
- @include collapsed-sidebar;
+.right-sidebar-collapsed {
padding-right: 0;
- /* Small devices (tablets, 768px and up) */
+
@media (min-width: $screen-sm-min) {
- @include collapsed-sidebar;
+ padding-right: $sidebar_collapsed_width;
}
}
-.page-sidebar-expanded {
- @include expanded-sidebar;
+.right-sidebar-expanded {
+ padding-right: 0;
+
+ @media (min-width: $screen-sm-min) and (max-width: $screen-sm-max) {
+ padding-right: $sidebar_collapsed_width;
+ }
+
+ @media (min-width: $screen-md-min) {
+ padding-right: $gutter_width;
+ }
}