Fix composer button visibility in contrast colour mode (#31255)

* Fix composer button visibility in contrast colour mode

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>

* Iterate

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

* Iterate

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

* Update test

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

* Simplify

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

* Update snapshots

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

* Update screenshots

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

* Update screenshots

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

* Update screenshot

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski
2025-12-09 13:59:01 +00:00
committed by GitHub
parent d30e6f25d3
commit 4fda167c11
46 changed files with 428 additions and 214 deletions

View File

@@ -14,28 +14,16 @@ Please see LICENSE files in the repository root for full details.
min-height: 32px; /* for when the button is used in a flexbox */
border-radius: 32px;
background-color: $system;
padding: var(--cpd-space-1-5x);
box-sizing: border-box;
&::before {
content: "";
position: absolute; /* sizing varies by icon */
background-color: $secondary-content;
mask-repeat: no-repeat;
mask-size: contain;
top: 6px; /* center */
left: 6px; /* center */
svg {
color: $secondary-content;
width: 20px;
height: 20px;
}
&.mx_PlayPauseButton_disabled::before {
&[disabled] svg {
opacity: 0.5;
}
&.mx_PlayPauseButton_play::before {
mask-image: url("@vector-im/compound-design-tokens/icons/play-solid.svg");
}
&.mx_PlayPauseButton_pause::before {
mask-image: url("@vector-im/compound-design-tokens/icons/pause-solid.svg");
}
}

View File

@@ -69,11 +69,16 @@ Please see LICENSE files in the repository root for full details.
}
img,
svg,
.mx_IconizedContextMenu_icon {
/* icons */
width: 16px;
min-width: 16px;
max-width: 16px;
& + .mx_IconizedContextMenu_label {
padding-left: 14px;
}
}
span.mx_IconizedContextMenu_label {
@@ -87,10 +92,6 @@ Please see LICENSE files in the repository root for full details.
white-space: nowrap;
}
.mx_IconizedContextMenu_icon + .mx_IconizedContextMenu_label {
padding-left: 14px;
}
.mx_BetaCard_betaPill {
margin-left: 16px;
}
@@ -99,8 +100,6 @@ Please see LICENSE files in the repository root for full details.
.mx_IconizedContextMenu_icon {
position: relative;
width: 16px;
height: 16px;
&::before {
content: "";
@@ -119,6 +118,10 @@ Please see LICENSE files in the repository root for full details.
color: $alert !important;
}
svg {
color: var(--cpd-color-icon-critical-primary);
}
.mx_IconizedContextMenu_icon::before {
background-color: var(--cpd-color-icon-critical-primary);
}
@@ -127,6 +130,10 @@ Please see LICENSE files in the repository root for full details.
.mx_IconizedContextMenu_option_red {
color: $alert !important;
svg {
color: $alert;
}
.mx_IconizedContextMenu_icon::before {
background-color: $alert;
}
@@ -138,6 +145,10 @@ Please see LICENSE files in the repository root for full details.
color: $accent !important;
}
svg {
color: $accent;
}
.mx_IconizedContextMenu_icon::before {
background-color: $accent;
}

View File

@@ -14,10 +14,6 @@ Please see LICENSE files in the repository root for full details.
@mixin composerButtonHighLight;
}
.mx_EmojiButton_icon::before {
mask-image: url("@vector-im/compound-design-tokens/icons/reaction.svg");
}
.mx_MessageComposer_wysiwyg {
.mx_EmojiButton {
@mixin composerButton 5px, $tertiary-content, $panels;

View File

@@ -140,6 +140,9 @@ Please see LICENSE files in the repository root for full details.
.mx_MessageComposer_button {
@mixin composerButton 50%, var(--cpd-color-icon-primary), var(--cpd-color-bg-subtle-primary);
padding: 3px;
height: 20px;
width: 20px;
&:last-child {
margin-right: auto;
@@ -155,6 +158,11 @@ Please see LICENSE files in the repository root for full details.
z-index: 2;
}
}
svg {
width: inherit;
height: inherit;
}
}
.mx_MessageComposer_wysiwyg {
.mx_MessageComposer_wrapper {
@@ -193,60 +201,31 @@ Please see LICENSE files in the repository root for full details.
}
}
.mx_MessageComposer_upload::before {
mask-image: url("@vector-im/compound-design-tokens/icons/attachment.svg");
}
.mx_MessageComposer_buttonMenu {
width: 24px;
height: 24px;
padding: 1px;
.mx_MessageComposer_poll::before {
mask-image: url("@vector-im/compound-design-tokens/icons/polls.svg");
}
.mx_MessageComposer_voiceMessage::before {
mask-image: url("@vector-im/compound-design-tokens/icons/mic-on-solid.svg");
}
.mx_MessageComposer_plain_text::before {
mask-image: url("@vector-im/compound-design-tokens/icons/text-formatting.svg");
}
.mx_MessageComposer_rich_text::before {
mask-image: url("@vector-im/compound-design-tokens/icons/text-formatting.svg");
}
.mx_MessageComposer_location::before {
mask-image: url("@vector-im/compound-design-tokens/icons/location-pin-solid.svg");
}
.mx_MessageComposer_stickers::before {
mask-image: url("$(res)/img/element-icons/room/composer/sticker.svg");
}
.mx_MessageComposer_buttonMenu::before {
mask-image: url("@vector-im/compound-design-tokens/icons/overflow-horizontal.svg");
svg {
width: 24px;
height: 24px;
}
}
.mx_MessageComposer_sendMessage {
cursor: pointer;
position: relative;
width: 32px;
height: 32px;
padding: var(--cpd-space-2x);
border-radius: 100%;
background-color: var(--cpd-color-icon-accent-tertiary);
height: 16px;
width: 16px;
&::before {
position: absolute;
height: 16px;
width: 16px;
top: 8px;
left: 9px;
svg {
height: inherit;
width: inherit;
mask-image: url("@vector-im/compound-design-tokens/icons/send-solid.svg");
mask-repeat: no-repeat;
mask-size: contain;
mask-position: center;
background-color: var(--cpd-color-icon-on-solid-primary);
content: "";
color: var(--cpd-color-icon-on-solid-primary);
}
}

View File

@@ -32,10 +32,12 @@ Please see LICENSE files in the repository root for full details.
height: 24px;
vertical-align: middle;
margin-right: 2px; /* distance from left edge of waveform container (container has some margin too) */
background-color: $voice-record-icon-color;
mask-repeat: no-repeat;
mask-size: contain;
mask-image: url("@vector-im/compound-design-tokens/icons/delete.svg");
svg {
width: inherit;
height: inherit;
color: $voice-record-icon-color;
}
}
.mx_VoiceRecordComposerTile_uploadingState {
@@ -115,3 +117,9 @@ Please see LICENSE files in the repository root for full details.
opacity: 1;
}
}
@media (forced-colors: active) {
.mx_VoiceMessagePrimaryContainer {
outline: 1px solid transparent;
}
}