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

Commit a413e3a

Browse files
committed
Horizontal: spacing
Signed-off-by: Suguru Hirahara <[email protected]>
1 parent 3ab6c70 commit a413e3a

File tree

2 files changed

+4
-46
lines changed

2 files changed

+4
-46
lines changed

res/css/views/right_panel/_ThreadPanel.scss

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ limitations under the License.
2020
height: 100px;
2121
overflow: visible;
2222

23-
&:not(.mx_ThreadView).mx_BaseCard {
24-
padding-right: 2px;
25-
}
26-
2723
.mx_BaseCard_header {
2824
margin-bottom: 12px;
2925

@@ -111,15 +107,11 @@ limitations under the License.
111107
.mx_AutoHideScrollbar {
112108
background-color: $background;
113109
border-radius: 8px;
114-
width: calc(100% - 6px); // 6px: 8px - 2px (&:not(.mx_ThreadView).mx_BaseCard)
115110
padding-inline-end: 0;
111+
overflow-y: scroll; // set gap between the thread tile and the right border
116112
}
117113

118114
&.mx_ThreadView .mx_ThreadView_timelinePanelWrapper {
119-
/* the scrollbar is 8px wide, and we want a 12px gap with the side of the
120-
panel. Hence the magic number, 8+4=12 */
121-
width: calc(100% + 6px);
122-
padding-right: 4px;
123115
position: relative;
124116
min-height: 0; // don't displace the composer
125117
flex-grow: 1;
@@ -131,7 +123,7 @@ limitations under the License.
131123

132124
.mx_RoomView_messagePanel { // To avoid the rule from being applied to .mx_ThreadPanel_empty
133125
.mx_RoomView_messageListWrapper {
134-
width: calc(100% + $spacing-8); // 8px: scroll bar width
126+
width: calc(100% + 6px); // 8px - 2px
135127
}
136128
}
137129

@@ -292,7 +284,6 @@ limitations under the License.
292284
top: 0;
293285
bottom: 0;
294286
left: 0;
295-
right: 6px;
296287
padding: 20px;
297288

298289
h2 {

res/css/views/rooms/_EventTile.scss

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -710,33 +710,7 @@ $eventTileZIndex: 10;
710710
}
711711

712712
.mx_GroupLayout {
713-
&[data-scrollbar=true] {
714-
.mx_EventTile[data-shape=ThreadsList],
715-
.mx_RoomView_MessageList {
716-
// If scroll bar is enabled, its area creates 8px spacing
717-
margin-inline-end: 0;
718-
}
719-
720-
.mx_RoomView_messageListWrapper {
721-
width: calc(100% + 6px); // 6px: .mx_ThreadPanel .mx_AutoHideScrollbar
722-
}
723-
}
724-
725-
&[data-scrollbar=false] {
726-
.mx_EventTile[data-shape=ThreadsList] {
727-
// Remove default margin
728-
margin-inline-end: 0;
729-
}
730-
731-
.mx_RoomView_MessageList {
732-
// Set 8px spacing between the thread list and the right border
733-
margin-inline-end: $spacing-8;
734-
}
735-
}
736-
737713
.mx_EventTile[data-shape=ThreadsList] {
738-
padding-inline-end: $spacing-24; // 24px: 32px - 8px (create a 24px gap when a thread on the list is hovered)
739-
740714
.mx_EventTile_line {
741715
padding-bottom: 0; // Override mx_EventTile_line on _GroupLayout.scss
742716
}
@@ -758,8 +732,8 @@ $eventTileZIndex: 10;
758732
$borderRadius: 8px;
759733
$padding: $spacing-8;
760734

761-
margin: var(--topOffset) 14px var(--topOffset) 0; // 14px: 32px - 18px (padding of mx_AutoHideScrollbar)
762-
padding: $padding;
735+
margin: var(--topOffset) 0;
736+
padding: $padding $spacing-24 $padding $padding;
763737
border-radius: $borderRadius;
764738

765739
display: flex;
@@ -889,13 +863,6 @@ $eventTileZIndex: 10;
889863
padding-top: 14px; // due to layout differences, this odd number matches the 18px padding-top of main tl events
890864
}
891865

892-
.mx_RoomView_messagePanel[data-scrollbar=false] {
893-
.mx_EventTile[data-layout="bubble"] {
894-
// Create 8px gap between the avatar and the right border
895-
margin-inline-end: 44px; // 44px: 36px + 8px (scroll bar area width)
896-
}
897-
}
898-
899866
.mx_EventTile[data-layout=bubble] {
900867
margin-left: 36px;
901868
margin-right: 36px;

0 commit comments

Comments
 (0)