element-web/res/css/views/right_panel/_BaseCard.scss
Suguru Hirahara 67b0078b33
Integrate thread panel's header style declarations with those of BaseCard (#8651)
* Variable on mx_BaseCard_Header

- Use a variable for margin of buttons on mx_BaseCard_header
- Reduce default margin instead of setting negative left and right values
- Set margin to span in order to ensure spacing between the back button and the span (6px: 30px - 24px)

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use the same variable to the mask button

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Use spacing variables

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>

* Remove obsolete declarations - mx_ThreadPanel_button

mx_ThreadPanel_button does not seem to be used anywhere.

Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2022-05-23 09:42:48 +02:00

169 lines
4.2 KiB
SCSS

/*
Copyright 2020 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_BaseCard {
--BaseCard_EventTile_line-padding-block: 2px;
--BaseCard_EventTile-spacing-horizontal: 36px;
padding: 0 8px;
overflow: hidden;
display: flex;
flex-direction: column;
flex: 1;
.mx_BaseCard_header {
--BaseCard_header_button-margin: $spacing-12;
margin: $spacing-4 0;
> h2 {
margin: 0 44px;
font-size: $font-18px;
font-weight: $font-semi-bold;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.mx_BaseCard_back,
.mx_BaseCard_close {
position: absolute;
background-color: rgba(141, 151, 165, 0.2);
height: 20px;
width: 20px;
margin: var(--BaseCard_header_button-margin);
top: 0;
border-radius: 50%;
&::before {
content: "";
position: absolute;
height: inherit;
width: inherit;
top: 0;
left: 0;
mask-repeat: no-repeat;
mask-position: center;
background-color: $header-panel-text-primary-color;
}
}
.mx_BaseCard_back {
left: 0;
&::before {
transform: rotate(90deg);
mask-size: 22px;
mask-image: url('$(res)/img/feather-customised/chevron-down.svg');
}
}
.mx_BaseCard_close {
right: 0;
&::before {
mask-image: url('$(res)/img/icons-close.svg');
mask-size: 8px;
}
}
}
.mx_AutoHideScrollbar {
// collapse the margin into a padding to move the scrollbar into the right gutter
margin-right: -8px;
padding-right: 8px;
min-height: 0;
width: 100%;
height: 100%;
}
.mx_BaseCard_Group {
margin: 20px 0 16px;
& > * {
margin-left: 12px;
margin-right: 12px;
}
> h1 {
color: $tertiary-content;
font-size: $font-12px;
font-weight: 500;
}
.mx_BaseCard_Button {
padding: 10px 10px 10px 12px;
margin: 0;
position: relative;
font-size: $font-13px;
height: 20px;
line-height: 20px;
border-radius: 8px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
display: flex;
.mx_BaseCard_Button_sublabel {
color: $tertiary-content;
margin-left: auto;
}
&:hover {
background-color: rgba(141, 151, 165, 0.1);
}
&.mx_AccessibleButton_disabled {
padding-right: 12px;
&::after {
content: unset;
}
}
}
}
.mx_BaseCard_footer {
padding-top: 4px;
text-align: center;
display: flex;
justify-content: space-around;
.mx_AccessibleButton_kind_secondary {
color: $secondary-content;
background-color: rgba(141, 151, 165, 0.2);
font-weight: $font-semi-bold;
font-size: $font-14px;
}
.mx_AccessibleButton_disabled {
cursor: not-allowed;
}
}
}
.mx_FilePanel,
.mx_UserInfo,
.mx_NotificationPanel,
.mx_MemberList {
&.mx_BaseCard {
padding: 32px 0 0;
.mx_AutoHideScrollbar {
margin-right: unset;
padding-right: unset;
}
}
}