1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-08-09 08:42:50 +03:00

Move mx_EventTile_avatar style rules out of ":not([data-layout=bubble])" (#8894)

This commit is contained in:
Suguru Hirahara
2022-06-25 17:22:52 +00:00
committed by GitHub
parent 4cc82548ac
commit 2242a36851
3 changed files with 21 additions and 17 deletions

View File

@@ -32,6 +32,15 @@ limitations under the License.
} }
.mx_EventTile { .mx_EventTile {
&[data-layout=irc],
&[data-layout=group] {
.mx_EventTile_avatar {
position: absolute; // for IRC layout
top: 12px;
left: -3px;
}
}
&[data-layout=bubble] { &[data-layout=bubble] {
&::before { &::before {
z-index: auto; // enable background color on hover z-index: auto; // enable background color on hover
@@ -76,12 +85,6 @@ limitations under the License.
max-width: min(calc(100% - 36px), 600px); max-width: min(calc(100% - 36px), 600px);
} }
.mx_EventTile_avatar {
position: absolute; // for IRC layout
top: 12px;
left: -3px;
}
.mx_MessageTimestamp { .mx_MessageTimestamp {
position: absolute; // for modern layout and IRC layout position: absolute; // for modern layout and IRC layout
inset-inline-start: auto; inset-inline-start: auto;

View File

@@ -21,6 +21,11 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
.mx_EventTile { .mx_EventTile {
flex-shrink: 0; flex-shrink: 0;
.mx_EventTile_avatar {
cursor: pointer;
user-select: none;
}
.mx_EventTile_receiptSent, .mx_EventTile_receiptSent,
.mx_EventTile_receiptSending { .mx_EventTile_receiptSending {
position: relative; position: relative;
@@ -91,6 +96,11 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
z-index: 9; z-index: 9;
} }
.mx_EventTile_avatar {
top: 14px;
left: $spacing-8;
}
.mx_MessageTimestamp { .mx_MessageTimestamp {
position: absolute; // for modern layout position: absolute; // for modern layout
} }
@@ -120,13 +130,6 @@ $threadInfoLineHeight: calc(2 * $font-12px); // See: _commons.scss
font-size: $font-14px; font-size: $font-14px;
position: relative; position: relative;
.mx_EventTile_avatar {
top: 14px;
left: 8px;
cursor: pointer;
user-select: none;
}
&.mx_EventTile_info { &.mx_EventTile_info {
padding-top: 0; padding-top: 0;

View File

@@ -58,11 +58,9 @@ $irc-line-height: $font-18px;
min-width: 0; min-width: 0;
} }
> .mx_EventTile_avatar { .mx_EventTile_avatar {
order: 1; order: 1;
position: relative; position: relative;
top: 0;
left: 0;
flex-shrink: 0; flex-shrink: 0;
height: $irc-line-height; height: $irc-line-height;
display: flex; display: flex;
@@ -118,7 +116,7 @@ $irc-line-height: $font-18px;
} }
.mx_EventTile_emote { .mx_EventTile_emote {
> .mx_EventTile_avatar { .mx_EventTile_avatar {
margin-left: calc(var(--name-width) + $icon-width + $right-padding); margin-left: calc(var(--name-width) + $icon-width + $right-padding);
} }
} }