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:
@@ -40,7 +40,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
}
|
||||
|
||||
.mx_Dropdown_arrow {
|
||||
background: $secondary-content;
|
||||
color: $secondary-content;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,7 +119,7 @@ Please see LICENSE files in the repository root for full details.
|
||||
}
|
||||
|
||||
.mx_Dropdown_arrow {
|
||||
background: $authpage-primary-color;
|
||||
color: $authpage-primary-color;
|
||||
}
|
||||
|
||||
.mx_Dropdown_menu {
|
||||
|
||||
@@ -17,5 +17,5 @@ Please see LICENSE files in the repository root for full details.
|
||||
}
|
||||
|
||||
.mx_AuthBody_language .mx_Dropdown_arrow {
|
||||
background: $authpage-lang-color;
|
||||
color: $authpage-lang-color;
|
||||
}
|
||||
|
||||
@@ -39,12 +39,11 @@ Please see LICENSE files in the repository root for full details.
|
||||
.mx_GenericDropdownMenu_divider {
|
||||
margin-top: $spacing-4;
|
||||
margin-bottom: $spacing-4;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_NetworkDropdown_addServer {
|
||||
font-weight: normal;
|
||||
font-size: $font-15px;
|
||||
& + .mx_GenericDropdownMenu_Option .mx_GenericDropdownMenu_Option--label {
|
||||
font-size: $font-15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mx_NetworkDropdown_removeServer {
|
||||
|
||||
@@ -38,15 +38,11 @@ Please see LICENSE files in the repository root for full details.
|
||||
filter: none;
|
||||
}
|
||||
|
||||
.mx_Dropdown_arrow {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
margin-right: 4px;
|
||||
mask: url("@vector-im/compound-design-tokens/icons/chevron-down.svg");
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
mask-size: 18px;
|
||||
background: $primary-content;
|
||||
svg.mx_Dropdown_arrow {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
margin-right: 3px;
|
||||
color: $primary-content;
|
||||
}
|
||||
|
||||
.mx_Dropdown_option {
|
||||
|
||||
@@ -42,21 +42,17 @@ Please see LICENSE files in the repository root for full details.
|
||||
position: relative;
|
||||
display: block;
|
||||
height: 38px;
|
||||
border-radius: 19px;
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
background: $background;
|
||||
border: 1.3px solid var(--cpd-color-icon-tertiary);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.mx_JumpToBottomButton_scrollDown::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-up.svg");
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: 24px;
|
||||
mask-position: center 6px;
|
||||
transform: rotate(180deg);
|
||||
background: var(--cpd-color-icon-tertiary);
|
||||
svg {
|
||||
height: inherit;
|
||||
width: inherit;
|
||||
box-sizing: border-box;
|
||||
padding: 7px 8px 7px 6px;
|
||||
color: var(--cpd-color-icon-tertiary);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,54 +38,26 @@ Please see LICENSE files in the repository root for full details.
|
||||
vertical-align: middle;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
|
||||
svg {
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
box-sizing: border-box;
|
||||
padding: var(--cpd-space-1x);
|
||||
color: var(--cpd-color-icon-secondary);
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--cpd-color-bg-subtle-secondary);
|
||||
border-radius: 6px;
|
||||
z-index: 1;
|
||||
|
||||
svg {
|
||||
color: var(--cpd-color-icon-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mx_MessageComposerFormatBar_button::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
mask-size: 20px;
|
||||
background-color: var(--cpd-color-icon-secondary);
|
||||
}
|
||||
|
||||
.mx_MessageComposerFormatBar_button:hover::after {
|
||||
background-color: var(--cpd-color-icon-primary);
|
||||
}
|
||||
|
||||
.mx_MessageComposerFormatBar_buttonIconBold::after {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/bold.svg");
|
||||
}
|
||||
|
||||
.mx_MessageComposerFormatBar_buttonIconItalic::after {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/italic.svg");
|
||||
}
|
||||
|
||||
.mx_MessageComposerFormatBar_buttonIconStrikethrough::after {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/strikethrough.svg");
|
||||
}
|
||||
|
||||
.mx_MessageComposerFormatBar_buttonIconQuote::after {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/quote.svg");
|
||||
}
|
||||
|
||||
.mx_MessageComposerFormatBar_buttonIconCode::after {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/inline-code.svg");
|
||||
}
|
||||
|
||||
.mx_MessageComposerFormatBar_buttonIconInsertLink::after {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/link.svg");
|
||||
}
|
||||
}
|
||||
|
||||
.mx_MessageComposerFormatBar_buttonTooltip {
|
||||
|
||||
@@ -27,20 +27,11 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
.mx_SecurityUserSettingsTab_warning {
|
||||
color: $alert;
|
||||
position: relative;
|
||||
padding-left: 40px;
|
||||
|
||||
&::before {
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: 0 center;
|
||||
mask-size: $font-24px;
|
||||
position: absolute;
|
||||
width: $font-24px;
|
||||
height: $font-24px;
|
||||
content: "";
|
||||
top: 0;
|
||||
left: 0;
|
||||
background-color: $alert;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/warning.svg");
|
||||
svg {
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
margin-right: var(--cpd-space-4x);
|
||||
color: $alert;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user