element-web/res/css/views/rooms/_IRCLayout.pcss

80 lines
2.3 KiB
Text
Raw Normal View History

2020-04-29 14:07:41 +00:00
/*
Copyright 2024 New Vector Ltd.
2020-04-29 14:07:41 +00:00
Copyright 2020 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
2020-04-29 14:07:41 +00:00
*/
Merge style rules related to EventTile on IRC layout (#10700) * Manage rules related to EventTile on `_EventTile.pcss` The style rules with the selector "mx_EventTile" should be managed on _EventTile.pcss. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `--EventTile_irc_line_info-margin-inline-start` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_EventTile_msgOption` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_MessageTimestamp` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_EventTileBubble` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_ReplyChain` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_ReplyTile .mx_EventTileBubble` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `&.mx_EventTile_isEditing > .mx_EventTile_line` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `&.mx_EventTile_info` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Convert the variable with a custom property To fix the syntax error "Undefined variable $irc-line-height" because of cascading order. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - '.mx_EventTile_emote' The class is both specified by the const 'classes' (for classNames of mx_EventTile) and const 'lineClasses' (for mx_EventTile_line), but it is irrelevant here because the style rule does not expect mx_EventTile_avatar to be a direct descendant. In other words, both ".mx_EventTile.mx_EventTile_emote" and ".mx_EventTile .mx_EventTile_emote" are accepted. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> --------- Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-03 11:06:51 +00:00
:root {
--irc-line-height: $font-18px;
}
2020-04-29 14:07:41 +00:00
.mx_IRCLayout {
--name-width: 80px; /* cf. ircDisplayNameWidth on Settings.tsx */
Stop using :not() pseudo class for mx_GenericEventListSummary (#8944) * Stop using :not() pseudo class for mx_GenericEventListSummary Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use a CSS variable for mx_GenericEventListSummary on _EventTile.scss - icon-width Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use a CSS variable for mx_GenericEventListSummary on _EventTile.scss - right-padding Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move declarations for EventTile_line of GenericEventListSummary for IRC layout from _IRCLayout.scss to _EventTile.scss Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move mx_EventTile_line out of mx_GenericEventListSummary:not([data-layout=bubble]) Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common style rules up Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Set zero inline start padding to mx_EventTile_line of info tile of mx_GenericEventListSummary_unstyledList on IRC layout There should not be spacing between avatars and info tile line on IRC Layout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Apply the rule to group/modern layout only Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Apply the inline start padding to modern/group layout only Overriding $left-gutter is not necessary for IRC layout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge the style block for mx_EventTile_info .mx_EventTile_line Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove padding from info event tile line from mx_GenericEventListSummary on IRC layout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Add spacing between avatar and a single info event tile line on IRC layout Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Stop using :not() pseudo class for mx_GenericEventListSummary on TimelineCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Fix padding of line with redacted body text Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-06 10:44:23 +00:00
--icon-width: 14px;
Merge style rules related to EventTile on IRC layout (#10700) * Manage rules related to EventTile on `_EventTile.pcss` The style rules with the selector "mx_EventTile" should be managed on _EventTile.pcss. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `--EventTile_irc_line_info-margin-inline-start` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_EventTile_msgOption` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_MessageTimestamp` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_EventTileBubble` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_ReplyChain` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_ReplyTile .mx_EventTileBubble` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `&.mx_EventTile_isEditing > .mx_EventTile_line` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `&.mx_EventTile_info` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Convert the variable with a custom property To fix the syntax error "Undefined variable $irc-line-height" because of cascading order. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - '.mx_EventTile_emote' The class is both specified by the const 'classes' (for classNames of mx_EventTile) and const 'lineClasses' (for mx_EventTile_line), but it is irrelevant here because the style rule does not expect mx_EventTile_avatar to be a direct descendant. In other words, both ".mx_EventTile.mx_EventTile_emote" and ".mx_EventTile .mx_EventTile_emote" are accepted. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> --------- Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-03 11:06:51 +00:00
--line-height: var(--irc-line-height);
--right-padding: 5px;
2020-04-29 14:07:41 +00:00
line-height: var(--line-height) !important;
2020-04-29 14:07:41 +00:00
blockquote {
margin: 0;
}
.mx_NewRoomIntro {
> h2 {
Merge style rules related to EventTile on IRC layout (#10700) * Manage rules related to EventTile on `_EventTile.pcss` The style rules with the selector "mx_EventTile" should be managed on _EventTile.pcss. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `--EventTile_irc_line_info-margin-inline-start` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_EventTile_msgOption` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_MessageTimestamp` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_EventTileBubble` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_ReplyChain` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `mx_ReplyTile .mx_EventTileBubble` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `&.mx_EventTile_isEditing > .mx_EventTile_line` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - `&.mx_EventTile_info` Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Convert the variable with a custom property To fix the syntax error "Undefined variable $irc-line-height" because of cascading order. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge - '.mx_EventTile_emote' The class is both specified by the const 'classes' (for classNames of mx_EventTile) and const 'lineClasses' (for mx_EventTile_line), but it is irrelevant here because the style rule does not expect mx_EventTile_avatar to be a direct descendant. In other words, both ".mx_EventTile.mx_EventTile_emote" and ".mx_EventTile .mx_EventTile_emote" are accepted. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> --------- Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2023-05-03 11:06:51 +00:00
line-height: initial; /* Cancel var(--irc-line-height) */
}
}
.mx_ReplyChain {
.mx_DisambiguatedProfile {
width: unset;
background: transparent;
order: unset;
flex-shrink: unset; /* Unset flex-shrink to prevent long display name blowout */
}
.mx_EventTile_emote {
> .mx_EventTile_avatar {
margin-left: initial;
}
}
.mx_MessageTimestamp {
width: initial;
}
/**
* adding the icon back in the document flow
* if it's not present, there's no unwanted wasted space
*/
.mx_EventTile_e2eIcon {
position: relative;
order: -1;
}
}
.mx_ProfileResizer {
--resizer-width: 15px;
--resizer-a11y: 3px; /* Magic number, to be replaced with something more proper from the perspective of a11y */
position: absolute;
height: 100%;
width: var(--resizer-width);
cursor: col-resize;
z-index: 100;
/* Add width of every element rendered before the resizer (including padding for the avatar and the display
name), subtracting the resizer width itself to prevent the resizer from overlapping the text and moving
the resizer a bit to the left to make it easier to avoid selecting the resizer when highlighting text.
Please note that MessageTimestamp does not have inline padding. */
inset-inline-start: calc(
var(--RoomView_MessageList-padding) + var(--MessageTimestamp-width) + var(--icon-width) +
var(--right-padding) + var(--name-width) + var(--right-padding) - var(--resizer-width) -
var(--resizer-a11y)
);
}
2020-04-29 14:07:41 +00:00
}