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

Commit 95e8a9e

Browse files
authored
Fix keyboard shortcuts on settings tab being wrapped (#8825)
* Fix keyboard shortcuts being wrapped Setting $spacing-8 gap between the labels and the shortcuts Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Add the block margin to the rows, not to the keys Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Add the inline margin to the shortcuts, not to the keys Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
1 parent f10d35c commit 95e8a9e

File tree

2 files changed

+17
-7
lines changed

2 files changed

+17
-7
lines changed

res/css/views/settings/_KeyboardShortcut.scss

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,11 @@ limitations under the License.
2020
padding: 5px;
2121
border-radius: 4px;
2222
background-color: $header-panel-bg-color;
23-
margin-right: 5px;
2423
min-width: 20px;
2524
text-align: center;
2625
display: inline-block;
2726
border: 1px solid $kbd-border-color;
2827
box-shadow: 0 2px $kbd-border-color;
29-
margin-bottom: 4px;
3028
text-transform: capitalize;
31-
32-
& + kbd {
33-
margin-left: 5px;
34-
}
3529
}
3630
}

res/css/views/settings/tabs/user/_KeyboardUserSettingsTab.scss

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,25 @@ limitations under the License.
1616
*/
1717

1818
.mx_KeyboardUserSettingsTab .mx_SettingsTab_section {
19-
.mx_KeyboardShortcut_shortcutRow {
19+
.mx_KeyboardShortcut_shortcutRow,
20+
.mx_KeyboardShortcut {
2021
display: flex;
2122
justify-content: space-between;
2223
align-items: center;
2324
}
25+
26+
.mx_KeyboardShortcut_shortcutRow {
27+
column-gap: $spacing-8;
28+
margin-bottom: $spacing-4;
29+
30+
// TODO: Use flexbox
31+
&:last-of-type {
32+
margin-bottom: 0;
33+
}
34+
35+
.mx_KeyboardShortcut {
36+
flex-wrap: nowrap;
37+
column-gap: 5px; // TODO: Use a spacing variable
38+
}
39+
}
2440
}

0 commit comments

Comments
 (0)