element-web-Github/res/css/views/right_panel/_TimelineCard.scss
Suguru Hirahara 1fc8009109
Fix padding of messages in threads (#8574)
* 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>
2022-05-13 12:04:27 -06:00

154 lines
3.8 KiB
SCSS

/*
Copyright 2021 - 2022 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
.mx_TimelineCard {
.mx_TimelineCard__header {
margin-left: 6px;
span:first-of-type {
font-weight: 600;
font-size: 15px;
line-height: 18px;
color: $secondary-content;
}
}
.mx_BaseCard_header {
margin: 5px 0 9px 0;
.mx_BaseCard_close {
margin: 8px;
right: 0;
}
}
.mx_TimelineCard_timeline {
overflow: hidden;
position: relative; // offset parent for jump to bottom button
flex: 1;
border-radius: 8px;
}
.mx_NewRoomIntro {
margin-inline-start: 36px; // TODO: Use a variable
margin-inline-end: 36px; // TODO: Use a variable
}
.mx_EventTile_content {
margin-right: 0;
}
.mx_EventTile:not([data-layout="bubble"]) {
$left-gutter: 36px;
.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,
.mx_ReactionsRow,
.mx_ThreadSummary {
margin-inline-start: $left-gutter;
}
.mx_ReactionsRow {
padding: 0;
// See margin setting of ReactionsRow on _EventTile.scss
margin-right: 8px;
}
.mx_ThreadSummary {
margin-right: 0;
max-width: min(calc(100% - 36px), 600px);
}
.mx_EventTile_avatar {
position: absolute; // for IRC layout
top: 12px;
left: -3px;
}
.mx_MessageTimestamp {
position: absolute; // for modern layout and IRC layout
right: -4px;
left: auto;
}
.mx_EventTile_msgOption {
margin-right: 2px;
}
&.mx_EventTile_info {
.mx_EventTile_line {
padding-left: $left-gutter;
}
.mx_EventTile_avatar {
left: 18px;
}
}
}
.mx_GroupLayout {
.mx_EventTile {
> .mx_DisambiguatedProfile {
margin-left: 36px;
}
}
}
.mx_CallEvent_wrapper {
justify-content: center;
margin: auto 5px;
.mx_CallEvent {
margin: 4px;
}
}
.mx_GenericEventListSummary:not([data-layout=bubble]) .mx_EventTile_line,
.mx_GenericEventListSummary:not([data-layout=bubble]) > .mx_GenericEventListSummary_unstyledList > .mx_EventTile_info .mx_EventTile_avatar ~ .mx_EventTile_line {
padding-left: 36px;
}
.mx_ReadReceiptGroup {
top: -6px;
}
.mx_WhoIsTypingTile {
margin-left: -12px; // undo padding on the message list
}
.mx_WhoIsTypingTile_avatars {
flex-basis: 48px; // 12 (padding on message list) + 36 (padding on event lines)
}
&.mx_BaseCard {
// For a chat timeline on the right panel when the widget is maximised
// TODO: rename ThreadPanel
&.mx_ThreadPanel {
padding-right: 8px; // .mx_RightPanel padding
}
}
}