Skip to content

Commit 272cf80

Browse files
Ryan Wilsonchasenlehara
authored andcommitted
Fix scrolling issues
Fixes #507
1 parent 919796a commit 272cf80

File tree

6 files changed

+39
-78
lines changed

6 files changed

+39
-78
lines changed

static/base.less

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
body {
22
height: 100%;
3-
overflow: hidden;
43
margin: 0px;
54
}
65
html {

static/header.less

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88
}
99
}
1010
.header {
11+
position: fixed;
12+
background-color: #FFFFFF;
13+
width: 100%;
14+
box-shadow: 0 0 5px 0 rgba(0,0,0,0.25);
1115
display: flex;
1216
align-items: center;
1317
flex-shrink: 0;
1418
padding: 0 @gutter*2;
1519
@media screen and (max-width: 499px){
1620
padding: 0 @gutter;
1721
}
18-
background-color: #FFFFFF;
19-
z-index: 1;
20-
box-shadow: 0 0 5px 0 rgba(0,0,0,0.25);
22+
z-index: 101;
2123
}
2224
.brand {
2325
display: flex;
@@ -47,7 +49,6 @@
4749
display: none;
4850
}
4951
}
50-
5152
// ----- CANJS LOGO AND VERSION DESKTOP -----
5253
@media screen and (min-width: @breakpoint) {
5354
.brand {

static/layout.less

Lines changed: 12 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,22 @@
1-
#everything {
2-
.flex;
3-
-webkit-flex-flow: row wrap;
4-
justify-content: flex-start;
5-
align-items: stretch;
6-
flex-wrap: nowrap;
7-
box-sizing: border-box;
8-
height: 100%;
9-
-webkit-overflow-scrolling: touch;
10-
padding-bottom: 0;
11-
transition: padding-bottom @transition-speed ease;
12-
}
131
#left {
142
position: fixed;
15-
scroll-behavior: smooth;
3+
float: left;
164
width: @sidebar-width;
17-
min-width: 0;
18-
transition: min-width @transition-speed ease;
19-
border-right: 3px solid #F4F4F4;
20-
@media screen and (min-width: @breakpoint){
21-
flex-shrink: 0;
22-
padding: 0px;
23-
position: relative;
24-
width: auto;
25-
}
5+
height: 100%;
6+
margin-top: @brand-height;
7+
padding-bottom: @gutter*2;
8+
z-index: 51;
9+
overflow-y: auto;
2610
}
2711
#right {
28-
height: 100%;
29-
min-height: 100%;
30-
max-height: 100%;
31-
background: white;
32-
overflow-x: hidden;
33-
// z-index: 90;
3412
position: relative;
35-
left: 0;
36-
.transition-left;
37-
flex-grow: 1;
38-
@media screen and (min-width: @breakpoint){
39-
display: flex;
40-
flex-grow: 1;
41-
}
42-
}
43-
.column {
44-
height: 100%;
45-
overflow-y: auto;
46-
box-sizing: border-box;
47-
.flex;
48-
justify-content: flex-start;
49-
align-items: stretch;
50-
flex-wrap: nowrap;
51-
flex-direction: column;
13+
float: right;
14+
width: ~"calc(100% - " @sidebar-width ~")";
15+
margin-top: @brand-height;
16+
z-index: 1;
5217
}
53-
54-
@media screen and (min-width: @breakpoint){
55-
.top-left {
18+
@media screen and (max-width: @breakpoint){
19+
#right {
5620
width: 100%;
57-
height: auto;
58-
}
59-
}
60-
.top-right {
61-
flex-shrink: 0;
62-
flex-wrap: nowrap;
63-
height: auto;
64-
width: 100%;
65-
.border-bottom;
66-
@media screen and (min-width: @breakpoint){
67-
border: none;
6821
}
6922
}

static/mobile.less

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,21 +24,26 @@ label[for="nav-trigger"] {
2424
label:hover{
2525
background: @border-color;
2626
}
27-
.nav-trigger ~ #everything #right {
28-
width: 100%;
29-
}
30-
.nav-trigger:checked ~ #everything #right {
31-
@media screen and (max-width: @breakpoint){
32-
flex-shrink: 0;
33-
width: auto;
34-
position: fixed;
35-
left: @sidebar-width;
27+
28+
@media screen and (max-width: @breakpoint){
29+
.nav-trigger:not(:checked) ~ #everything #left {
30+
left: -@sidebar-width;
3631
overflow-x: hidden;
32+
transition: left .5s ease-in-out;
3733
}
38-
}
39-
@media screen and (max-width: 999px) {
40-
.nav-trigger:not(:checked) ~ #everything #left {
41-
visibility: hidden;
34+
.nav-trigger:checked ~ #everything #left {
35+
left: 0;
36+
transition: left .5s ease-in-out;
37+
}
38+
.nav-trigger:not(:checked) ~ #everything #right {
39+
left: 0;
40+
overflow-x: hidden;
41+
transition: left .5s ease-in-out;
42+
}
43+
.nav-trigger:checked ~ #everything #right {
44+
left: @sidebar-width;
45+
overflow-x: hidden;
46+
transition: left .5s ease-in-out;
4247
}
4348
}
4449
.nav-trigger + label {

static/sidebar.less

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ img.social-icon-small{
5656
#left {
5757
display: none;
5858
}
59+
#right {
60+
width: 100%;
61+
}
5962
}
6063
}
6164
#left {

static/variables.less

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
@brand-height: 53px;
1515
@breakpoint: 1000px;
1616
@gutter: 15px;
17-
@sidebar-width: 274px;
17+
@sidebar-width: 275px;
1818
@transition-speed: .25s;
1919

2020
/*----- TYPE -----*/

0 commit comments

Comments
 (0)