riot-web/res/css/views/right_panel/_ThreadPanel.pcss

254 lines
6.1 KiB
Plaintext
Raw Normal View History

/*
Copyright 2021 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_ThreadPanel {
height: 100px;
overflow: visible;
.mx_BaseCard_header {
Create a common header on right panel cards on BaseCard (#8808) * Remove duplicate declarations and add height and overflow properties Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move mx_TimelineCard__header under mx_BaseCard_header for normalization Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Normalize mx_BaseCard_close position Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Normalize className of header - mx_BaseCard_header__ThreadPanel - mx_BaseCard_header__TimelineCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Normalize header's button size Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Normalize inline start header margin Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * normalize header bottom margin for PinnedMessagesCard and TimelineCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Normalize header declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Add mixin RightPanelCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common declarations - top level Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common declarations - mx_BaseCard_header Remove specific declarations on PinnedMessagesCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common declarations - mx_BaseCard_back and mx_BaseCard_close Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Create a common class name - mx_BaseCard_header_title Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Create a common class name - mx_BaseCard_header_title - ThreadPanel Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common declarations - mx_BaseCard_header_title Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common declarations - span:first-of-type Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove redundant declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename a variable to remove --ThreadPanel_header-button-size Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove class name - mx_BaseCard_header_title Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove mx_BaseCard_header_title--ThreadPanel and h2 declarations from PinnedMessagesCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Headers need Heading Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common style rules of mx_ContextualMenu inside mx_BaseCard_header_title to BaseCard leaving style rules specific to ThreadPanel. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Hide long header title with ellipsis Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules - BaseCard_header-button-size Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules - BaseCard_header margin-bottom Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules - BaseCard back and close margin Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules - BaseCard back ~ mx_BaseCard_header_title Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules - mx_BaseCard_header_title Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Return special declarations to _ThreadPanel.scss Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove the mixin Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Add mx_BaseCard_header_title_button--option Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove redundant margin from AppTileFullWidth Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Header on mx_RoomSummaryCard - remove default declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove default declarations from mx_UserInfo Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use variables - _BaseCard.scss Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-06-16 09:22:45 +02:00
.mx_BaseCard_header_title {
.mx_AccessibleButton {
font-size: 12px;
color: $secondary-content;
}
.mx_ThreadPanel_dropdown {
padding: 3px $spacing-4 3px $spacing-8; // TODO: Use a spacing variable
border-radius: 4px;
line-height: 1.5;
user-select: none;
&:hover,
&[aria-expanded="true"] {
background: $quinary-content;
}
&::before {
content: "";
width: 18px;
height: 18px;
background: currentColor;
mask-image: url("$(res)/img/feather-customised/chevron-down.svg");
mask-size: 100%;
mask-repeat: no-repeat;
float: right;
}
}
}
}
.mx_AutoHideScrollbar,
.mx_RoomView_messagePanelSpinner {
background-color: $background;
border-radius: 8px;
padding-inline-end: 0;
overflow-y: scroll; // set gap between the thread tile and the right border
height: 100%;
}
.mx_EventTile[data-layout="group"] {
.mx_MessageActionBar {
right: 0;
top: -36px; // 2px above EventTile
z-index: 10; // See _EventTile.pcss
}
}
// For style rules of EventTile in a thread, see _EventTile.pcss
&.mx_ThreadView {
max-height: 100%;
.mx_ThreadView_timelinePanelWrapper {
position: relative;
min-height: 0; // don't displace the composer
flex-grow: 1;
.mx_FileDropTarget {
border-radius: 8px;
}
}
.mx_MessageComposer_sendMessage {
margin-right: 0;
}
}
.mx_RoomView_messagePanel { // To avoid the rule from being applied to .mx_ThreadPanel_empty
.mx_RoomView_messageListWrapper {
width: calc(100% + 6px); // 8px - 2px
}
}
.mx_RoomView_MessageList {
padding-inline-start: $spacing-8;
padding-inline-end: $spacing-8;
2022-04-05 19:07:34 +02:00
content-visibility: visible;
}
.mx_EventTile,
.mx_GenericEventListSummary {
// Account for scrollbar when hovering
2021-11-02 14:18:51 +01:00
padding-top: 0;
.mx_DateSeparator {
display: none;
}
&.mx_EventTile_clamp:hover {
cursor: pointer;
}
}
2021-11-02 14:18:51 +01:00
.mx_MessageComposer {
background-color: $background;
border-radius: 8px;
margin-top: 8px;
padding: 0 8px;
box-sizing: border-box;
}
.mx_MessageTimestamp {
color: $secondary-content;
}
.mx_BaseCard_footer {
text-align: left;
font-size: $font-12px;
align-items: center;
justify-content: flex-end;
gap: 4px;
position: relative;
top: 2px;
2022-04-05 19:07:34 +02:00
padding-right: 8px;
.mx_AccessibleButton_kind_link_inline {
color: $secondary-content;
}
}
}
2021-11-02 14:18:51 +01:00
.mx_ThreadPanel_viewInRoom::before {
mask-image: url('$(res)/img/element-icons/view-in-room.svg');
}
.mx_ThreadPanel_copyLinkToThread::before {
mask-image: url('$(res)/img/element-icons/link.svg');
}
2021-11-11 14:56:44 +01:00
.mx_ThreadPanel_empty {
border-radius: 8px;
background: $background;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
position: absolute;
top: 0;
bottom: 0;
left: 0;
2021-11-11 14:56:44 +01:00
padding: 20px;
box-sizing: border-box; // Include padding and border
width: 100%;
2021-11-11 14:56:44 +01:00
h2 {
color: $primary-content;
font-weight: $font-semi-bold;
2021-11-11 14:56:44 +01:00
font-size: $font-18px;
margin-top: 24px;
margin-bottom: 10px;
2021-11-11 14:56:44 +01:00
}
p {
font-size: $font-15px;
color: $secondary-content;
margin: 10px 0;
2021-11-11 14:56:44 +01:00
}
button {
border: none;
background: none;
color: $accent;
font-size: $font-15px;
2021-11-11 14:56:44 +01:00
&:hover,
&:active {
text-decoration: underline;
cursor: pointer;
}
}
.mx_ThreadPanel_empty_tip {
font-size: $font-12px;
line-height: $font-15px;
>b {
font-weight: $font-semi-bold;
}
}
2021-11-11 14:56:44 +01:00
}
.mx_ThreadPanel_largeIcon {
width: 28px;
height: 28px;
padding: 18px;
background: $system;
border-radius: 50%;
&::after {
Improve style rules for thread summary (#8868) * Use mixin ThreadSummaryIcon Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Tidy mx_ThreadSummary Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move style blocks from _EventTile.scss to _ThreadSummary.scss Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge mx_ThreadSummaryIcon::before Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * From threads amount to replies amount Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove obsolete declaration and class names mixin ThreadSummaryIcon has "background-color: $secondary-content !important" Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move mx_ThreadPanel_replies::before from _ThreadSummary to _EventTile.scss Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename mx_ThreadSummaryIcon to mx_ThreadSummary_icon Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use variables and remove obsolete one Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules, renaming a variable Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_MessagePanel_narrow in mx_ThreadSummary Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove a redundant declaration Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use a variable Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Include mx_ThreadSummary_sender and mx_ThreadSummary_content in mx_ThreadSummary Expected according to tests Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove a variable used only once Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Ensure the same line-height is applied Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove !important Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-07-04 21:07:50 +02:00
@mixin ThreadSummaryIcon;
2021-11-11 14:56:44 +01:00
width: inherit;
height: inherit;
}
}
Create a common header on right panel cards on BaseCard (#8808) * Remove duplicate declarations and add height and overflow properties Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move mx_TimelineCard__header under mx_BaseCard_header for normalization Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Normalize mx_BaseCard_close position Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Normalize className of header - mx_BaseCard_header__ThreadPanel - mx_BaseCard_header__TimelineCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Normalize header's button size Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Normalize inline start header margin Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * normalize header bottom margin for PinnedMessagesCard and TimelineCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Normalize header declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Add mixin RightPanelCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common declarations - top level Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common declarations - mx_BaseCard_header Remove specific declarations on PinnedMessagesCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common declarations - mx_BaseCard_back and mx_BaseCard_close Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Create a common class name - mx_BaseCard_header_title Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Create a common class name - mx_BaseCard_header_title - ThreadPanel Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common declarations - mx_BaseCard_header_title Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common declarations - span:first-of-type Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove redundant declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Rename a variable to remove --ThreadPanel_header-button-size Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove class name - mx_BaseCard_header_title Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove mx_BaseCard_header_title--ThreadPanel and h2 declarations from PinnedMessagesCard Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Headers need Heading Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use spacing variables Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Move common style rules of mx_ContextualMenu inside mx_BaseCard_header_title to BaseCard leaving style rules specific to ThreadPanel. Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Hide long header title with ellipsis Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules - BaseCard_header-button-size Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules - BaseCard_header margin-bottom Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules - BaseCard back and close margin Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules - BaseCard back ~ mx_BaseCard_header_title Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Merge style rules - mx_BaseCard_header_title Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Return special declarations to _ThreadPanel.scss Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove the mixin Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Add mx_BaseCard_header_title_button--option Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove redundant margin from AppTileFullWidth Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Header on mx_RoomSummaryCard - remove default declarations Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Remove default declarations from mx_UserInfo Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com> * Use variables - _BaseCard.scss Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-06-16 09:22:45 +02:00
.mx_ContextualMenu_wrapper {
.mx_ThreadPanel_Header_FilterOptionItem {
display: flex;
flex-grow: 1;
justify-content: space-between;
flex-direction: column;
padding: 10px 20px 10px 30px;
position: relative;
&:hover {
background-color: $event-selected-color;
}
&[aria-checked="true"] {
:first-child {
margin-left: -20px;
}
:first-child::before {
content: "";
width: 12px;
height: 12px;
margin-right: 8px;
mask-image: url("$(res)/img/feather-customised/check.svg");
mask-size: 100%;
mask-repeat: no-repeat;
background-color: $primary-content;
display: inline-block;
vertical-align: middle;
}
}
:last-child {
color: $secondary-content;
}
}
}