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

Commit

Permalink
Fix padding of messages in threads (#8574)
Browse files Browse the repository at this point in the history
* Apply the padding setting of EventTile_line of ThreadView to TimelineCard

Set 2px padding-top and padding-bottom property to EventTile_line on IRC/modern layout of TimelineCard.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

f

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Move position property of mx_EventTile_e2eIcon from ThreadPanel to TimelineCard

The E2E icon is available only on TimelineCard.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* yarn run lint:style

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
  • Loading branch information
luixxiul committed May 13, 2022
1 parent b331099 commit 1fc8009
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 19 deletions.
2 changes: 2 additions & 0 deletions res/css/views/right_panel/_BaseCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ limitations under the License.
*/

.mx_BaseCard {
--BaseCard_EventTile_line-padding-block: 2px;

padding: 0 8px;
overflow: hidden;
display: flex;
Expand Down
6 changes: 0 additions & 6 deletions res/css/views/right_panel/_ThreadPanel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,6 @@ limitations under the License.
}
}

.mx_EventTile:not([data-layout=bubble]) {
.mx_EventTile_e2eIcon {
left: 8px;
}
}

.mx_MessageComposer {
background-color: $background;
border-radius: 8px;
Expand Down
10 changes: 6 additions & 4 deletions res/css/views/right_panel/_TimelineCard.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@ limitations under the License.
.mx_EventTile_line {
padding-inline-start: $left-gutter;
padding-inline-end: 36px;
padding-top: var(--BaseCard_EventTile_line-padding-block);
padding-bottom: var(--BaseCard_EventTile_line-padding-block);

.mx_EventTile_e2eIcon {
inset-inline-start: 8px;
}
}

.mx_DisambiguatedProfile,
Expand Down Expand Up @@ -109,10 +115,6 @@ limitations under the License.
> .mx_DisambiguatedProfile {
margin-left: 36px;
}

.mx_EventTile_line {
padding-bottom: 8px;
}
}
}

Expand Down
14 changes: 5 additions & 9 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -869,6 +869,11 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss

&:not([data-layout=bubble]) {
padding-top: $spacing-16;

.mx_EventTile_line {
padding-top: var(--BaseCard_EventTile_line-padding-block);
padding-bottom: var(--BaseCard_EventTile_line-padding-block);
}
}
}

Expand Down Expand Up @@ -980,13 +985,4 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
padding-right: 11px; // align with right edge of input
margin-right: 0; // align with right edge of background
}

.mx_GroupLayout {
.mx_EventTile {
.mx_EventTile_line {
padding-top: 2px;
padding-bottom: 2px;
}
}
}
}

0 comments on commit 1fc8009

Please sign in to comment.