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

Apply padding values to event tiles on MessageEditHistoryDialog with variables #8955

Merged
merged 2 commits into from
Jul 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions res/css/views/dialogs/_MessageEditHistoryDialog.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ limitations under the License.
}

.mx_EventTile_line {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block could be moved to _EventTile.scss by setting mx_MessageEditHistoryDialog_edits &, but that should not be applied yet before analysis because that way _EventTile.scss would possibly become much larger than it is, when you apply the same policy to other files such as _TimelineCard.scss.

padding-top: 1px;
padding-bottom: 3px;

line-height: $font-22px;
padding-top: var(--EventTile_group_line-spacing-block-start);
padding-bottom: var(--EventTile_group_line-spacing-block-end);
padding-left: var(--EventTile_group_line-spacing-inline-start);
line-height: var(--EventTile_group_line-line-height);

.mx_EventTile_content {
margin-right: 0px;
Expand Down
12 changes: 7 additions & 5 deletions res/css/views/rooms/_EventTile.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss

.mx_EventTile {
--EventTile_content-margin-inline-end: 34px; // TODO: Use a spacing variable
--EventTile_group_line-spacing-block-start: 1px;
--EventTile_group_line-spacing-block-end: 3px;
--EventTile_group_line-spacing-inline-start: $left-gutter;
--EventTile_group_line-line-height: $font-22px;

flex-shrink: 0;

Expand Down Expand Up @@ -127,8 +131,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
}

&[data-layout=group] {
--EventTile_group_line-line-height: $font-22px;

> .mx_DisambiguatedProfile {
line-height: $font-20px;
margin-left: $left-gutter;
Expand All @@ -151,9 +153,9 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss

.mx_EventTile_line,
.mx_EventTile_reply {
padding-top: 1px;
padding-bottom: 3px;
padding-left: $left-gutter;
padding-top: var(--EventTile_group_line-spacing-block-start);
padding-bottom: var(--EventTile_group_line-spacing-block-end);
padding-left: var(--EventTile_group_line-spacing-inline-start);
line-height: var(--EventTile_group_line-line-height);
}

Expand Down