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

Commit

Permalink
fix: replace fixed height based styling with flex for invite and dev …
Browse files Browse the repository at this point in the history
…dialogs
  • Loading branch information
justjanne committed May 19, 2022
1 parent 82169ab commit 1a5464c
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 26 deletions.
11 changes: 8 additions & 3 deletions res/css/views/dialogs/_DevtoolsDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ limitations under the License.
}

.mx_Dialog_fixedWidth {
overflow-y: hidden;
height: 100%;
display: flex;
flex-direction: column;
min-height: 0;
max-height: 100%;

.mx_Dialog_buttons button {
margin-bottom: 0;
}
}
}

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

.mx_DevTools_RoomStateExplorer_query {
Expand Down
52 changes: 29 additions & 23 deletions res/css/views/dialogs/_InviteDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ limitations under the License.

.mx_CopyableText {
width: unset; // full width
margin-bottom: 0;

> a {
text-decoration: none;
Expand Down Expand Up @@ -270,44 +271,54 @@ limitations under the License.

.mx_InviteDialog_other {
// Prevent the dialog from jumping around randomly when elements change.
height: 600px;
display: flex;
flex-direction: column;
max-height: 600px;
overflow: hidden;

.mx_InviteDialog_addressBar {
margin-right: 0;
}

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

.mx_InviteDialog_section {
padding-bottom: 0;
margin-top: 12px;
}
}

.mx_InviteDialog_hasFooter {
.mx_InviteDialog_userSections {
height: calc(100% - 175px); // For displaying an invite link on the footer of the dialog
}
}
}

.mx_InviteDialog_content {
height: calc(100% - 36px); // full height minus the size of the header
display: flex;
flex-direction: column;
flex-shrink: 1;
overflow: hidden;
}

.mx_InviteDialog_transfer {
width: 496px;
height: 466px;
flex-direction: column;
width: auto;

.mx_InviteDialog_content {
flex-direction: column;
width: 496px;
height: 430px;

.mx_TabbedView {
height: calc(100% - 60px);
display: flex;
flex-direction: column;
flex-shrink: 1;
flex-grow: 1;
min-height: 0;

.mx_TabbedView_tabPanel {
flex-direction: column;

.mx_TabbedView_tabPanelContent {
display: flex;
flex-direction: column;
}
}
}
overflow: visible;
}
Expand All @@ -327,10 +338,6 @@ limitations under the License.
padding: 0 45px 4px 0;
}

.mx_InviteDialog_hasFooter .mx_InviteDialog_userSections {
height: calc(100% - 175px);
}

.mx_InviteDialog_helpText {
margin: 0;
}
Expand Down Expand Up @@ -380,14 +387,13 @@ limitations under the License.

.mx_InviteDialog_transferConsultConnect {
padding-top: 16px;
/* This wants a drop shadow the full width of the dialog, so relative-position it
* and make it wider, then compensate with padding
/* This wants a drop shadow the full width of the dialog, so use negative margin to make it full width,
* then compensate with padding
*/
position: relative;
width: 496px;
left: -24px;
padding-left: 24px;
padding-right: 24px;
margin-left: -24px;
margin-right: -24px;
border-top: 1px solid $quinary-content;

display: flex;
Expand Down

0 comments on commit 1a5464c

Please sign in to comment.