Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit 28cd170

Browse files
committed
fix: replace fixed height based styling with flex for invite and dev dialogs
1 parent ce73b99 commit 28cd170

File tree

2 files changed

+37
-26
lines changed

2 files changed

+37
-26
lines changed

res/css/views/dialogs/_DevtoolsDialog.scss

+8-3
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,19 @@ limitations under the License.
2020
}
2121

2222
.mx_Dialog_fixedWidth {
23-
overflow-y: hidden;
24-
height: 100%;
23+
display: flex;
24+
flex-direction: column;
25+
min-height: 0;
26+
max-height: 100%;
27+
28+
.mx_Dialog_buttons button {
29+
margin-bottom: 0;
30+
}
2531
}
2632
}
2733

2834
.mx_DevTools_content {
2935
overflow-y: auto;
30-
height: calc(100% - 124px); // 58px for buttons + 50px for header + 8px margin around
3136
}
3237

3338
.mx_DevTools_RoomStateExplorer_query {

res/css/views/dialogs/_InviteDialog.scss

+29-23
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ limitations under the License.
130130

131131
.mx_CopyableText {
132132
width: unset; // full width
133+
margin-bottom: 0;
133134

134135
> a {
135136
text-decoration: none;
@@ -270,44 +271,54 @@ limitations under the License.
270271

271272
.mx_InviteDialog_other {
272273
// Prevent the dialog from jumping around randomly when elements change.
273-
height: 600px;
274+
display: flex;
275+
flex-direction: column;
276+
max-height: 600px;
277+
overflow: hidden;
274278

275279
.mx_InviteDialog_addressBar {
276280
margin-right: 0;
277281
}
278282

279283
.mx_InviteDialog_userSections {
280-
height: calc(100% - 115px); // mx_InviteDialog's height minus some for the upper and lower elements
281284
padding-right: 0;
282285

283286
.mx_InviteDialog_section {
284287
padding-bottom: 0;
285288
margin-top: 12px;
286289
}
287290
}
288-
289-
.mx_InviteDialog_hasFooter {
290-
.mx_InviteDialog_userSections {
291-
height: calc(100% - 175px); // For displaying an invite link on the footer of the dialog
292-
}
293-
}
294291
}
295292

296293
.mx_InviteDialog_content {
297-
height: calc(100% - 36px); // full height minus the size of the header
294+
display: flex;
295+
flex-direction: column;
296+
flex-shrink: 1;
298297
overflow: hidden;
299298
}
300299

301300
.mx_InviteDialog_transfer {
302-
width: 496px;
303-
height: 466px;
304-
flex-direction: column;
301+
width: auto;
305302

306303
.mx_InviteDialog_content {
307-
flex-direction: column;
304+
width: 496px;
305+
height: 430px;
308306

309307
.mx_TabbedView {
310-
height: calc(100% - 60px);
308+
display: flex;
309+
flex-direction: column;
310+
flex-shrink: 1;
311+
flex-grow: 1;
312+
min-height: 0;
313+
314+
.mx_TabbedView_tabPanel {
315+
flex-direction: column;
316+
317+
.mx_TabbedView_tabPanelContent {
318+
display: flex;
319+
flex-direction: column;
320+
}
321+
}
311322
}
312323
overflow: visible;
313324
}
@@ -327,10 +338,6 @@ limitations under the License.
327338
padding: 0 45px 4px 0;
328339
}
329340

330-
.mx_InviteDialog_hasFooter .mx_InviteDialog_userSections {
331-
height: calc(100% - 175px);
332-
}
333-
334341
.mx_InviteDialog_helpText {
335342
margin: 0;
336343
}
@@ -380,14 +387,13 @@ limitations under the License.
380387

381388
.mx_InviteDialog_transferConsultConnect {
382389
padding-top: 16px;
383-
/* This wants a drop shadow the full width of the dialog, so relative-position it
384-
* and make it wider, then compensate with padding
390+
/* This wants a drop shadow the full width of the dialog, so use negative margin to make it full width,
391+
* then compensate with padding
385392
*/
386-
position: relative;
387-
width: 496px;
388-
left: -24px;
389393
padding-left: 24px;
390394
padding-right: 24px;
395+
margin-left: -24px;
396+
margin-right: -24px;
391397
border-top: 1px solid $quinary-content;
392398

393399
display: flex;

0 commit comments

Comments
 (0)