Update the way we render icons for accessibility (#31731)
* Switch to Compound icons to replace old icons Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Apply same treatment to missed icons Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove duplicated icon Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update icon Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from css masks to rendering svg in ImageView Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from css masks to rendering svg in ExtensionsCard Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from css masks to rendering svg in LegacyRoomListHeader Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from css masks to rendering svg in ImageSizePanel Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from css masks to rendering svg in LegacyRoomList Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove icon from CreateSecretStorageDialog title Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from css masks to rendering svg in LiveContentSummary Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from css masks to rendering svg in RoomCallBanner Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from css masks to rendering svg in NonUrgentEchoFailureToast Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from css masks to rendering svg in LegacyCallViewHeader Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Switch from css masks to rendering svg in CallEvent 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> * Update screenshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Replace dark-light-mode.svg with Compound Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Draw stop icon using svg rather than square mask Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Replace masks in RoomSublist with SVG icons Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Replace masks with SVG icons in LegacyCall views Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Replace masks with SVG icons in EventTile Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Replace masks with SVG icons in ForwardDialog Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove redundant css style The `::before` has no content so is never rendered Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update playwright tests & screenshots Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Iterate Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Update snapshot Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Remove snapshot as it causes issues Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Delint Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * More tests Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
@@ -134,35 +134,17 @@ Please see LICENSE files in the repository root for full details.
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.mx_ForwardList_sendIcon,
|
||||
.mx_NotificationBadge {
|
||||
& > svg {
|
||||
position: absolute;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
color: $accent;
|
||||
}
|
||||
|
||||
.mx_NotificationBadge {
|
||||
/* Match the failed to send indicator's color with the disabled button */
|
||||
background-color: $button-danger-disabled-fg-color;
|
||||
}
|
||||
|
||||
&.mx_ForwardList_sending .mx_ForwardList_sendIcon {
|
||||
background-color: $accent;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/circle.svg");
|
||||
mask-position: center;
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: 14px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
|
||||
&.mx_ForwardList_sent .mx_ForwardList_sendIcon {
|
||||
background-color: $accent;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/check-circle.svg");
|
||||
mask-position: center;
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: 14px;
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,11 +13,3 @@ Please see LICENSE files in the repository root for full details.
|
||||
margin: 0 auto;
|
||||
padding-right: 80px;
|
||||
}
|
||||
|
||||
/* show a different AvatarSetting placeholder for RoomProfileSettings which is basically a clone of ProfileSettings */
|
||||
.mx_RoomSettingsDialog .mx_AvatarSetting_avatar .mx_AvatarSetting_avatarPlaceholder::before {
|
||||
mask: url("@vector-im/compound-design-tokens/icons/image.svg");
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: 36px;
|
||||
mask-position: center;
|
||||
}
|
||||
|
||||
@@ -30,26 +30,13 @@ Please see LICENSE files in the repository root for full details.
|
||||
.mx_LegacyCallEvent_iconButton {
|
||||
display: inline-flex;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
|
||||
svg {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
background-color: $secondary-content;
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: contain;
|
||||
mask-position: center;
|
||||
color: $secondary-content;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_LegacyCallEvent_silence::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/volume-on-solid.svg");
|
||||
}
|
||||
|
||||
.mx_LegacyCallEvent_unSilence::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/volume-off-solid.svg");
|
||||
}
|
||||
|
||||
&.mx_LegacyCallEvent_voice {
|
||||
.mx_LegacyCallEvent_type_icon::before,
|
||||
.mx_LegacyCallEvent_content_button_callBack span::before,
|
||||
|
||||
@@ -38,34 +38,11 @@ $left-gutter: 64px;
|
||||
text-align: start;
|
||||
}
|
||||
|
||||
.mx_EventTile_receiptSent,
|
||||
.mx_EventTile_receiptSending {
|
||||
position: relative;
|
||||
.mx_ReadReceiptGroup_container svg {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
|
||||
&::before {
|
||||
background-color: var(--cpd-color-icon-tertiary);
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
mask-size: 16px;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_EventTile_receiptSent::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/check-circle.svg");
|
||||
}
|
||||
|
||||
.mx_EventTile_receiptSending::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/circle.svg");
|
||||
color: var(--cpd-color-icon-tertiary);
|
||||
}
|
||||
|
||||
.mx_EventTile_content {
|
||||
|
||||
@@ -246,21 +246,9 @@ Please see LICENSE files in the repository root for full details.
|
||||
height: 18px;
|
||||
margin-left: 12px;
|
||||
margin-right: 16px;
|
||||
mask-position: center;
|
||||
mask-size: contain;
|
||||
mask-repeat: no-repeat;
|
||||
background: $tertiary-content;
|
||||
color: $tertiary-content;
|
||||
left: -1px; /* adjust for image position */
|
||||
}
|
||||
|
||||
.mx_RoomSublist_showMoreButtonChevron,
|
||||
.mx_RoomSublist_showLessButtonChevron {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-down.svg");
|
||||
}
|
||||
|
||||
.mx_RoomSublist_showLessButtonChevron {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
}
|
||||
|
||||
&.mx_RoomSublist_hasMenuOpen,
|
||||
|
||||
@@ -7,23 +7,18 @@ Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
.mx_VoiceRecordComposerTile_stop {
|
||||
/* 28px plus a 2px border makes this a 32px square (as intended) */
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
/* 20px + 4px padding + 2px border makes this a 32px square (as intended) */
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
padding: var(--cpd-space-1x);
|
||||
border: 2px solid $voice-record-stop-border-color;
|
||||
border-radius: 32px;
|
||||
margin-right: 2px; /* between us and the waveform component */
|
||||
position: relative;
|
||||
|
||||
&::after {
|
||||
content: "";
|
||||
width: 14px;
|
||||
height: 14px;
|
||||
position: absolute;
|
||||
top: 7px;
|
||||
left: 7px;
|
||||
border-radius: 2px;
|
||||
background-color: $voice-record-stop-symbol-color;
|
||||
svg {
|
||||
width: inherit;
|
||||
height: inherit;
|
||||
color: $voice-record-stop-symbol-color;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -114,23 +114,10 @@ Please see LICENSE files in the repository root for full details.
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
|
||||
svg {
|
||||
height: inherit;
|
||||
width: inherit;
|
||||
background-color: $tertiary-content;
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: contain;
|
||||
mask-position: center;
|
||||
color: $tertiary-content;
|
||||
}
|
||||
}
|
||||
|
||||
.mx_IncomingLegacyCallToast_silence::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/volume-on-solid.svg");
|
||||
}
|
||||
|
||||
.mx_IncomingLegacyCallToast_unSilence::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/volume-off-solid.svg");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -44,15 +44,10 @@ Please see LICENSE files in the repository root for full details.
|
||||
|
||||
box-shadow: 0px 4px 4px 0px #00000026; /* Same on both themes */
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
svg {
|
||||
display: inline-block;
|
||||
|
||||
mask-repeat: no-repeat;
|
||||
mask-size: contain;
|
||||
mask-position: center;
|
||||
|
||||
background-color: $call-view-button-on-foreground;
|
||||
color: $call-view-button-on-foreground;
|
||||
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
@@ -66,103 +61,60 @@ Please see LICENSE files in the repository root for full details.
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
|
||||
&::before {
|
||||
svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/chevron-up.svg");
|
||||
}
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_dropdownButton_collapsed::before {
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
&.mx_LegacyCallViewButtons_button_mic svg {
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
/* State buttons */
|
||||
&.mx_LegacyCallViewButtons_button_on {
|
||||
background-color: $call-view-button-on-background;
|
||||
|
||||
&::before {
|
||||
background-color: $call-view-button-on-foreground;
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_mic::before {
|
||||
height: 20px;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/mic-on-solid.svg");
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_vid::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/video-call-solid.svg");
|
||||
svg {
|
||||
color: $call-view-button-on-foreground;
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_screensharing {
|
||||
background-color: $accent;
|
||||
|
||||
&::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/share-screen-solid.svg");
|
||||
background-color: white; /* Same on both themes */
|
||||
svg {
|
||||
color: white; /* Same on both themes */
|
||||
}
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_sidebar::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/list-view.svg");
|
||||
}
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_off {
|
||||
background-color: $call-view-button-off-background;
|
||||
|
||||
&::before {
|
||||
background-color: $call-view-button-off-foreground;
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_mic::before {
|
||||
height: 20px;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/mic-off-solid.svg");
|
||||
width: 20px;
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_vid::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/video-call-off-solid.svg");
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_screensharing {
|
||||
background-color: $call-view-button-on-background;
|
||||
|
||||
&::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/share-screen-solid.svg");
|
||||
background-color: $call-view-button-on-foreground;
|
||||
}
|
||||
svg {
|
||||
color: $call-view-button-off-foreground;
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_screensharing,
|
||||
&.mx_LegacyCallViewButtons_button_sidebar {
|
||||
background-color: $call-view-button-on-background;
|
||||
|
||||
&::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/spotlight-view.svg");
|
||||
background-color: $call-view-button-on-foreground;
|
||||
svg {
|
||||
color: $call-view-button-on-foreground;
|
||||
}
|
||||
}
|
||||
}
|
||||
/* State buttons */
|
||||
|
||||
/* Stateless buttons */
|
||||
&.mx_LegacyCallViewButtons_dialpad::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/dial-pad.svg");
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_hangup {
|
||||
background-color: $alert;
|
||||
|
||||
&::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/end-call.svg");
|
||||
background-color: white; /* Same on both themes */
|
||||
svg {
|
||||
color: white; /* Same on both themes */
|
||||
}
|
||||
}
|
||||
|
||||
&.mx_LegacyCallViewButtons_button_more::before {
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/overflow-horizontal.svg");
|
||||
}
|
||||
/* Stateless buttons */
|
||||
|
||||
/* Invisible state */
|
||||
|
||||
Reference in New Issue
Block a user