Skip to content

Commit 8a22536

Browse files
bencodezenNataliaTepluhina
authored andcommitted
vuejs#2297 - Fix hidden hamburger menu mobile (vuejs#2298)
* fix (vuejs#2297): Fix hidden hamburger menu on mobile * fix (vuejs#2297): Keep icon hidden on home page under side menu * refactor (vuejs#2297): Remove duplicate z-index definition * refactor (vuejs#2297): Setup base z-index manifest * refactor (vuejs#2297): Abstract sidebar z-index baseline * refactor (vuejs#2297): Establish base header z-index * refactor (vuejs#2297): Establish z-index for overlay and modals
1 parent fc7eeac commit 8a22536

File tree

9 files changed

+18
-12
lines changed

9 files changed

+18
-12
lines changed

themes/vue/source/css/_ad.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#ad
33
width 125px
44
position fixed
5-
z-index 99
5+
z-index ($z-header - 1)
66
bottom 10px
77
right 10px
88
padding 10px

themes/vue/source/css/_common.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ input.button
7676

7777
#main
7878
position: relative
79-
z-index: 1
79+
z-index: $z-base
8080
padding: 0 60px 30px
8181
overflow-x: hidden
8282

themes/vue/source/css/_header.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ red-dot-before(leftPos = -8px)
1515
height: $header-height
1616
padding: $heading-padding-vertical 60px
1717
position: relative
18-
z-index: 100
18+
z-index: $z-header
1919

2020
body.docs
2121
#header
@@ -121,7 +121,7 @@ body.docs
121121
width: 100%
122122
height: 40px
123123
background-color: #fff
124-
z-index: 9
124+
z-index: $z-header
125125
display: none
126126
box-shadow: 0 0 2px rgba(0,0,0,.25)
127127
.menu-button

themes/vue/source/css/_modal.styl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,12 @@
77
padding: .5em
88
background-color: #f9f9f9
99
box-shadow: 0 0 10px rgba(0,0,0,.2)
10-
z-index: 11
1110
&.open
1211
display: block
1312
top: 50%
1413
left: 50%
1514
transform: translate(-50%, -50%)
16-
z-index: 1000
15+
z-index: $z-modal
1716
.modal-text
1817
margin-bottom 0.5em
1918
text-align center
@@ -27,7 +26,7 @@
2726
left: 0
2827
right: 0
2928
background: rgba(0,0,0,.2)
30-
z-index: 10
29+
z-index: $z-overlay
3130
.stop-scroll
3231
overflow: hidden
3332
height: 100%

themes/vue/source/css/_settings.styl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,10 @@ $heading-link-padding-top = $header-height + $content-padding-top
3030
$mobile-heading-link-padding-top = $mobile-header-height + $content-padding-top
3131
$h2-margin-top = 45px
3232
$h3-margin-top = 52px
33+
34+
// z-index manifest
35+
$z-base = 1
36+
$z-sidebar = 10
37+
$z-header = 20
38+
$z-overlay = 30
39+
$z-modal = 40

themes/vue/source/css/_sidebar.styl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
.sidebar
44
position: absolute
5-
z-index: 10
5+
z-index: $z-sidebar
66
top: $header-height
77
left: 0
88
bottom: 0
@@ -65,7 +65,6 @@
6565
@media screen and (max-width: 900px)
6666
.sidebar
6767
position: fixed
68-
z-index: 10
6968
background-color: #f9f9f9
7069
height: 100%
7170
top: 0

themes/vue/source/css/_sponsors-sidebar.styl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#sidebar-sponsors-platinum-right
3535
display none
3636
position fixed
37-
z-index 99
37+
z-index ($z-header - 1)
3838
top 90px
3939
right 20px
4040

themes/vue/source/css/index.styl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ body
2424
&.top
2525
background-color: transparent
2626
box-shadow: none
27+
z-index: ($z-sidebar - 1)
2728
.logo
2829
display: none
2930

themes/vue/source/css/page.styl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
margin: 1.2em 0 -1.2em
9898
padding-bottom: 1.2em
9999
position: relative
100-
z-index: 1
100+
z-index: $z-base
101101
ul, ol
102102
padding-left: 1.5em
103103
// FIX: Some link click targets are covered without this
@@ -201,7 +201,7 @@
201201
.content.with-sidebar
202202
margin-left: 290px
203203
#ad
204-
z-index: 1
204+
z-index: $z-base
205205
position: relative
206206
padding: 0
207207
bottom: 0

0 commit comments

Comments
 (0)