Skip to content

Commit a209d56

Browse files
committed
fix: Improve mobile layout and responsiveness in Layout and PrimaryNavigation styles
1 parent 2fe73f5 commit a209d56

2 files changed

Lines changed: 15 additions & 16 deletions

File tree

app/client/src/components/Layout.css

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@
7575
@media (max-width: 900px) {
7676
.layoutRoot {
7777
flex-direction: column;
78-
min-height: 100vh;
78+
height: 100vh;
79+
height: 100dvh;
80+
overflow: hidden;
7981
}
8082

8183
.primary-nav-container {
@@ -91,16 +93,17 @@
9193

9294
.layout-right {
9395
width: 100%;
94-
height: auto;
96+
height: 100%;
9597
flex: 1;
9698
/* Add padding at bottom for fixed nav */
97-
padding-bottom: 56px;
99+
padding-bottom: calc(50px + env(safe-area-inset-bottom, 0px));
100+
overflow: hidden;
98101
}
99102

100103
.content-area {
101104
flex-direction: column;
102-
height: auto;
103-
overflow: visible;
105+
height: 100%;
106+
overflow: hidden;
104107
}
105108

106109
/* Hide secondary sidebar on mobile - will be shown as popup */
@@ -109,7 +112,9 @@
109112
}
110113

111114
.main-content {
112-
overflow: visible;
115+
overflow-y: auto;
116+
height: 100%;
117+
-webkit-overflow-scrolling: touch;
113118
}
114119

115120
/* Old sidebar compatibility */

app/client/src/components/Navigation/PrimaryNavigation.css

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,27 +136,21 @@
136136
backdrop-filter: saturate(180%) blur(20px);
137137
-webkit-backdrop-filter: saturate(180%) blur(20px);
138138
border-top: 1px solid rgba(60, 60, 67, 0.18);
139+
justify-content: space-evenly;
139140
}
140141

141142
.primary-nav-logo {
142143
display: none;
143144
}
144145

145146
.primary-nav-items {
146-
flex: 1;
147-
flex-direction: row;
148-
align-items: stretch;
149-
justify-content: space-evenly;
150-
gap: 0;
151-
overflow-x: visible;
152-
padding: 0 4px;
153-
height: 100%;
147+
display: contents;
154148
}
155149

156150
.primary-nav-item {
157151
flex: 0 1 auto;
158152
margin: 0;
159-
padding: 5px 8px 4px;
153+
padding: 5px 4px 4px;
160154
min-width: 44px;
161155
border-radius: 0;
162156
position: relative;
@@ -229,7 +223,7 @@
229223
display: flex;
230224
flex: 0 1 auto;
231225
margin: 0;
232-
padding: 5px 8px 4px;
226+
padding: 5px 4px 4px;
233227
min-width: 44px;
234228
flex-direction: column;
235229
align-items: center;

0 commit comments

Comments
 (0)