element-web/res/css/structures/_QuickSettingsButton.pcss
Michael Telatynski 5869c519ed
Tweak rendering of icons for accessibility (#31346)
* Tweak rendering of icons in dropdowns

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Tweak rendering of icons in composer format bar

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Tweak rendering of icons in jump to bottom button

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Tweak rendering of icons in quick settings button

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Tweak rendering of icons in left panel search

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Delint

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix margin

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Tweak rendering of icons in security user settings tab

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Tweak rendering of icons in space hierarchy

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update screenshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Delint

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Simplify

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Tidy

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Add test

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Update snapshots

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2025-11-27 16:03:19 +00:00

124 lines
3.1 KiB
Plaintext

/*
Copyright 2024,2025 New Vector Ltd.
Copyright 2021 The Matrix.org Foundation C.I.C.
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
Please see LICENSE files in the repository root for full details.
*/
.mx_QuickSettingsButton {
border-radius: 8px;
margin: 12px auto 12px;
svg {
fill: $secondary-content;
}
&:not(.expanded):hover {
/**
* override compound default background color when hovered
* should disappear when the space panel will be migrated to compound
*/
background-color: $quaternary-content !important;
color: $primary-content;
svg {
fill: $primary-content;
}
}
&.expanded {
/**
* override compound default background color when hovered
* should disappear when the space panel will be migrated to compound
*/
background-color: transparent !important;
/* align with settings icon */
margin-left: 21px;
/**
* modify internal css of the compound component
* dirty but we need to add the label into the indicator icon button
**/
& > div {
display: flex;
align-items: center;
}
svg {
/* align with settings label */
margin-right: 14px;
/* required to set the icon width when into a flex container */
min-width: 24px;
}
& .mx_QuickSettingsButton_label {
color: $secondary-content;
}
}
}
.mx_QuickSettingsButton_ContextMenuWrapper .mx_ContextualMenu {
padding: 16px;
width: max-content;
min-width: 200px;
contain: unset; /* let the dropdown paint beyond the context menu */
> div > h2 {
font-weight: var(--cpd-font-weight-semibold);
font-size: $font-15px;
line-height: $font-24px;
color: var(--cpd-color-text-secondary);
margin: 0 0 16px;
}
.mx_AccessibleButton_hasKind {
display: block;
margin-top: 4px;
}
> div > h4 {
font-weight: var(--cpd-font-weight-semibold);
font-size: $font-12px;
line-height: $font-15px;
text-transform: uppercase;
color: var(--cpd-color-text-secondary);
margin: 20px 0 12px;
position: relative;
display: flex;
}
.mx_QuickSettingsButton_moreOptionsButton {
margin-left: var(--cpd-space-7x);
font-size: $font-15px;
line-height: $font-24px;
color: var(--cpd-color-text-primary);
position: relative;
margin-bottom: 16px;
}
.mx_QuickSettingsButton_option {
margin-bottom: var(--cpd-space-3x);
label {
/* Correctly line up icons and text. */
display: flex;
}
}
}
.mx_QuickSettingsButton_ContextMenuWrapper_new_room_list {
.mx_QuickThemeSwitcher {
margin-top: var(--cpd-space-2x);
}
}
.mx_QuickSettingsButton_icon {
margin-right: var(--cpd-space-1x);
color: $secondary-content;
width: 18px;
height: 18px;
margin-top: auto;
margin-bottom: auto;
}