Skip to content

Commit 36d7d87

Browse files
authored
Merge pull request #3546 from Vizzuality/feature/scroll-legend-fixed
data menu scrolable with fixed header
2 parents 087621c + a21c6ad commit 36d7d87

File tree

2 files changed

+11
-12
lines changed

2 files changed

+11
-12
lines changed

app/javascript/components/map/components/legend/legend-styles.scss

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33

44
.c-legend {
55
font-family: $font-family-1;
6+
width: 100%;
67

78
> div {
89
border: 0;

app/javascript/pages/map/data-analysis-menu/styles.scss

+10-12
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,7 @@
55
box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.25);
66
background: $white;
77
transition: transform 0.3s linear;
8-
z-index: 2;
9-
overflow-y: scroll;
10-
max-height: 80%;
11-
height: auto;
8+
position: relative;
129

1310
&.-relocate {
1411
transform: translateX(292px);
@@ -19,18 +16,19 @@
1916
}
2017

2118
.nav {
22-
box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16);
23-
}
24-
25-
.legend {
19+
border-bottom: solid 1px $border;
2620
position: relative;
21+
z-index: 2;
22+
height: auto;
2723
}
2824

25+
.legend,
2926
.analysis {
3027
position: relative;
31-
width: 100%;
32-
max-height: 70vh;
33-
overflow: auto;
34-
background: $white;
28+
overflow-y: scroll;
29+
display: flex;
30+
flex: 1;
31+
max-height: calc(100vh - 200px);
32+
z-index: 1;
3533
}
3634
}

0 commit comments

Comments
 (0)