element-web-Github/res/css/structures/_TabbedView.pcss
Michael Telatynski c05c429803
Absorb the matrix-react-sdk repository (#28192)
Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com>
Co-authored-by: github-merge-queue <github-merge-queue@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Florian Duros <florian.duros@ormaz.fr>
Co-authored-by: Kim Brose <kim.brose@nordeck.net>
Co-authored-by: Florian Duros <florianduros@element.io>
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
Co-authored-by: dbkr <986903+dbkr@users.noreply.github.com>
Co-authored-by: ElementRobot <releases@riot.im>
Co-authored-by: dbkr <dbkr@users.noreply.github.com>
Co-authored-by: David Baker <dbkr@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
Co-authored-by: David Langley <davidl@element.io>
Co-authored-by: Michael Weimann <michaelw@matrix.org>
Co-authored-by: Timshel <Timshel@users.noreply.github.com>
Co-authored-by: Sahil Silare <32628578+sahil9001@users.noreply.github.com>
Co-authored-by: Will Hunt <will@half-shot.uk>
Co-authored-by: Hubert Chathi <hubert@uhoreg.ca>
Co-authored-by: Andrew Ferrazzutti <andrewf@element.io>
Co-authored-by: Robin <robin@robin.town>
Co-authored-by: Tulir Asokan <tulir@maunium.net>
2024-10-16 13:31:55 +01:00

192 lines
4.2 KiB
Plaintext

/*
Copyright 2024 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C.
Copyright 2019 New Vector Ltd
Copyright 2017 Travis Ralston
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
Please see LICENSE files in the repository root for full details.
*/
.mx_TabbedView {
margin: 0;
padding: 0 0 0 var(--cpd-space-8x);
display: flex;
flex-direction: column;
inset: 0;
margin-top: 8px;
}
.mx_TabbedView_tabsOnLeft {
flex-direction: column;
position: absolute;
.mx_TabbedView_tabLabels {
width: 220px;
max-width: 220px;
position: fixed;
margin: 0; /* Remove the default value */
padding: 0; /* Remove the default value */
}
.mx_TabbedView_tabPanel {
margin-left: 280px; /* 220px sidebar + 60px padding */
flex-direction: column;
}
.mx_TabbedView_tabLabel:hover,
.mx_TabbedView_tabLabel_active {
color: $tab-label-active-fg-color;
.mx_TabbedView_maskedIcon::before {
background-color: var(--cpd-color-icon-primary);
}
}
.mx_TabbedView_tabLabel_active {
background-color: var(--cpd-color-bg-subtle-secondary);
}
.mx_TabbedView_maskedIcon {
width: 20px;
height: 20px;
margin-right: var(--cpd-space-3x);
}
.mx_TabbedView_maskedIcon::before {
mask-size: 20px;
width: 20px;
height: 20px;
transition: background-color 0.1s;
}
}
.mx_TabbedView_tabsOnTop {
flex-direction: column;
.mx_TabbedView_tabLabels {
display: flex;
margin-bottom: 8px;
}
.mx_TabbedView_tabLabel {
padding-left: 0px;
padding-right: 52px;
.mx_TabbedView_tabLabel_text {
font-size: 15px;
color: $tertiary-content;
}
}
.mx_TabbedView_tabPanel {
flex-direction: row;
}
.mx_TabbedView_tabLabel_active {
color: $accent;
.mx_TabbedView_tabLabel_text {
color: $accent;
}
}
.mx_TabbedView_tabLabel_active .mx_TabbedView_maskedIcon::before {
background-color: $accent;
}
.mx_TabbedView_maskedIcon {
width: 22px;
height: 22px;
margin-left: 0px;
margin-right: 8px;
}
.mx_TabbedView_maskedIcon::before {
mask-size: 22px;
width: inherit;
height: inherit;
}
}
.mx_TabbedView_tabLabels {
color: $tab-label-fg-color;
}
.mx_TabbedView_tabLabel {
display: flex;
align-items: center;
vertical-align: text-top;
cursor: pointer;
padding-block: var(--cpd-space-2x);
padding-inline: var(--cpd-space-3x) var(--cpd-space-4x);
box-sizing: border-box;
min-block-size: 40px;
min-inline-size: 40px;
border-radius: 24px;
font: var(--cpd-font-body-md-medium);
position: relative;
transition:
color 0.1s,
background-color 0.1s;
svg {
width: 20px;
height: 20px;
margin-right: var(--cpd-space-3x);
}
}
.mx_TabbedView_maskedIcon {
display: inline-block;
}
.mx_TabbedView_maskedIcon::before {
display: inline-block;
background-color: var(--cpd-color-icon-secondary);
mask-repeat: no-repeat;
mask-position: center;
content: "";
}
.mx_TabbedView_tabLabel_text {
vertical-align: middle;
}
.mx_TabbedView_tabPanel {
flex-grow: 1;
display: flex;
min-height: 0; /* firefox */
}
.mx_TabbedView_tabPanelContent {
flex-grow: 1;
overflow: auto;
min-height: 0; /* firefox */
}
/* Hide the labels on tabs, showing only the icons, on narrow viewports. */
@media (max-width: 1024px) {
.mx_TabbedView_tabsOnLeft.mx_TabbedView_responsive {
.mx_TabbedView_tabLabel_text {
display: none;
}
.mx_TabbedView_tabPanel {
margin-left: 72px; /* 40px sidebar + 32px padding */
}
.mx_TabbedView_maskedIcon {
margin-right: auto;
margin-left: auto;
}
.mx_TabbedView_tabLabels {
width: auto;
}
.mx_TabbedView_tabLabel {
padding-inline: 0 0;
justify-content: center;
svg {
margin-right: 0;
}
}
}
}