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>
This commit is contained in:
@@ -13,6 +13,12 @@ Please see LICENSE files in the repository root for full details.
|
||||
user-select: none;
|
||||
font-size: $font-12px;
|
||||
color: $secondary-content;
|
||||
|
||||
svg {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_GenericDropdownMenu_button:hover,
|
||||
@@ -20,17 +26,6 @@ Please see LICENSE files in the repository root for full details.
|
||||
background: $quinary-content;
|
||||
}
|
||||
|
||||
.mx_GenericDropdownMenu_button::before {
|
||||
content: "";
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: currentColor;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-down.svg");
|
||||
mask-size: 100%;
|
||||
mask-repeat: no-repeat;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.mx_ContextualMenu_wrapper.mx_GenericDropdownMenu_wrapper {
|
||||
.mx_ContextualMenu {
|
||||
position: initial;
|
||||
@@ -97,16 +92,12 @@ Please see LICENSE files in the repository root for full details.
|
||||
background-color: $menu-selected-color;
|
||||
}
|
||||
|
||||
&[aria-checked="true"]::before {
|
||||
content: "";
|
||||
.mx_GenericDropdownMenu_Option--checkIcon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-left: -22px;
|
||||
margin-right: 6px;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
|
||||
mask-size: 100%;
|
||||
mask-repeat: no-repeat;
|
||||
background-color: $primary-content;
|
||||
color: $primary-content;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@@ -7,39 +7,54 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
.mx_QuickSettingsButton {
|
||||
flex: 0 0 auto;
|
||||
border-radius: 8px;
|
||||
position: relative;
|
||||
margin: 12px auto;
|
||||
color: $secondary-content;
|
||||
min-width: 32px;
|
||||
min-height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 12px auto 12px;
|
||||
|
||||
&.expanded {
|
||||
margin-left: 20px;
|
||||
padding-left: 44px; /* align with toggle collapse button text */
|
||||
padding-right: 8px;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
left: 0;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/settings-solid.svg");
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
mask-size: 24px;
|
||||
background: $secondary-content;
|
||||
svg {
|
||||
fill: $secondary-content;
|
||||
}
|
||||
|
||||
&:not(.expanded):hover {
|
||||
background-color: $quaternary-content;
|
||||
/**
|
||||
* 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;
|
||||
|
||||
&::before {
|
||||
background-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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,10 +26,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
.mx_RoomSearch_icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/search.svg");
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: contain;
|
||||
background-color: $secondary-content;
|
||||
color: $secondary-content;
|
||||
margin-left: var(--cpd-space-2x);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
@@ -90,7 +87,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
}
|
||||
|
||||
.mx_RoomSearch_icon {
|
||||
background-color: $background;
|
||||
color: $background;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -109,22 +109,14 @@ Please see LICENSE files in the repository root for full details.
|
||||
border-radius: 4px;
|
||||
background-color: $background;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
background-color: $tertiary-content;
|
||||
mask-size: 16px;
|
||||
svg {
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
color: $tertiary-content;
|
||||
transform: rotate(270deg);
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-down.svg");
|
||||
}
|
||||
|
||||
&.mx_SpaceHierarchy_subspace_toggle_shown::before {
|
||||
&.mx_SpaceHierarchy_subspace_toggle_shown svg {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
@@ -196,22 +188,14 @@ Please see LICENSE files in the repository root for full details.
|
||||
}
|
||||
|
||||
.mx_SpaceHierarchy_roomTile_joined {
|
||||
display: inline;
|
||||
position: relative;
|
||||
padding-left: 16px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
vertical-align: middle;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
svg {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
top: -2px;
|
||||
left: -4px;
|
||||
position: absolute;
|
||||
mask-position: center;
|
||||
mask-size: contain;
|
||||
mask-repeat: no-repeat;
|
||||
background-color: $accent;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/check.svg");
|
||||
color: $accent;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user