Skip to content

Commit 838a242

Browse files
committed
src/style.scss: Fix bug responsiveness
The page was not responive for mobile phones. Use flex box to properly have responsive content. Signed-off-by: Louis Vigneras <louis.vigneras@code.gouv.fr>
1 parent 9b53613 commit 838a242

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/style.scss

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ pre, code {
1616

1717
body:not(.close) {
1818
main {
19-
align-items: start;
20-
display: grid;
21-
grid-gap: 1rem;
22-
grid-template-columns: $mobile-phone-width minmax(10px, 1fr);
19+
display: flex;
20+
flex-direction: row;
21+
22+
@media (max-width: $mobile-phone-width) {
23+
overflow-x: hidden;
24+
}
2325
}
2426

2527
.sidebar {
@@ -29,15 +31,16 @@ body:not(.close) {
2931
overflow-y: scroll;
3032
position: sticky;
3133
top: 0;
34+
width: $mobile-phone-width;
35+
flex-shrink: 0;
3236

3337
@media (max-width: $mobile-phone-width) {
34-
height: 100%;
35-
left: 0;
3638
position: fixed;
3739
top: 0;
38-
z-index: 1000;
39-
position: sticky;
40-
top: 0;
40+
left: 0;
41+
width: 100vw;
42+
height: 100vh;
43+
z-index: 20;
4144
}
4245

4346
.app-name, .sidebar-nav {

0 commit comments

Comments
 (0)