Refine menu, toast, and popover colors (#12247)
So that they use Compound semantic colors correctly and appear more similar to the real components now found in Compound.
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 5.5 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.6 KiB |
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
Before Width: | Height: | Size: 49 KiB After Width: | Height: | Size: 49 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 5.7 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 20 KiB |
|
@ -30,9 +30,10 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_ContextualMenu {
|
.mx_ContextualMenu {
|
||||||
border-radius: 8px;
|
border-radius: 12px;
|
||||||
box-shadow: 4px 4px 12px 0 $menu-box-shadow-color;
|
box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.1);
|
||||||
background-color: $menu-bg-color;
|
background-color: var(--cpd-color-bg-canvas-default);
|
||||||
|
border: var(--cpd-border-width-1) solid var(--cpd-color-border-interactive-secondary);
|
||||||
color: $primary-content;
|
color: $primary-content;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 5001;
|
z-index: 5001;
|
||||||
|
|
|
@ -62,7 +62,7 @@ limitations under the License.
|
||||||
font-weight: var(--cpd-font-weight-semibold);
|
font-weight: var(--cpd-font-weight-semibold);
|
||||||
font-size: $font-15px;
|
font-size: $font-15px;
|
||||||
line-height: $font-24px;
|
line-height: $font-24px;
|
||||||
color: $primary-content;
|
color: var(--cpd-color-text-secondary);
|
||||||
margin: 0 0 16px;
|
margin: 0 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ limitations under the License.
|
||||||
font-size: $font-12px;
|
font-size: $font-12px;
|
||||||
line-height: $font-15px;
|
line-height: $font-15px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
color: $tertiary-content;
|
color: var(--cpd-color-text-secondary);
|
||||||
margin: 20px 0 12px;
|
margin: 20px 0 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@ limitations under the License.
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
font-size: $font-15px;
|
font-size: $font-15px;
|
||||||
line-height: $font-24px;
|
line-height: $font-24px;
|
||||||
color: $secondary-content;
|
color: var(--cpd-color-text-primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@ limitations under the License.
|
||||||
margin-left: 22px;
|
margin-left: 22px;
|
||||||
font-size: $font-15px;
|
font-size: $font-15px;
|
||||||
line-height: $font-24px;
|
line-height: $font-24px;
|
||||||
color: $secondary-content;
|
color: var(--cpd-color-text-primary);
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-bottom: 16px;
|
margin-bottom: 16px;
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,16 +36,17 @@ limitations under the License.
|
||||||
.mx_Toast_toast {
|
.mx_Toast_toast {
|
||||||
grid-row: 1 / 3;
|
grid-row: 1 / 3;
|
||||||
grid-column: 1;
|
grid-column: 1;
|
||||||
background-color: $system;
|
background-color: var(--cpd-color-bg-canvas-default);
|
||||||
color: $primary-content;
|
color: $primary-content;
|
||||||
box-shadow: 0px 4px 20px rgba(0, 0, 0, 0.5);
|
box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.1);
|
||||||
border-radius: 8px;
|
border: var(--cpd-border-width-1) solid var(--cpd-color-border-interactive-secondary);
|
||||||
|
border-radius: 12px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 22px 1fr;
|
grid-template-columns: 22px 1fr;
|
||||||
column-gap: 8px;
|
column-gap: 8px;
|
||||||
row-gap: 4px;
|
row-gap: 4px;
|
||||||
padding: 8px;
|
padding: var(--cpd-space-3x);
|
||||||
|
|
||||||
&.mx_Toast_hasIcon {
|
&.mx_Toast_hasIcon {
|
||||||
&::before,
|
&::before,
|
||||||
|
|
|
@ -36,26 +36,7 @@ limitations under the License.
|
||||||
/* the notFirst class is for cases where the optionList might be under a header of sorts. */
|
/* the notFirst class is for cases where the optionList might be under a header of sorts. */
|
||||||
&:nth-child(n + 2),
|
&:nth-child(n + 2),
|
||||||
.mx_IconizedContextMenu_optionList_notFirst {
|
.mx_IconizedContextMenu_optionList_notFirst {
|
||||||
/* This is a bit of a hack when we could just use a simple border-top property, */
|
border-top: var(--cpd-border-width-1) solid var(--cpd-color-gray-400);
|
||||||
/* however we have a (kinda) good reason for doing it this way: we need opacity. */
|
|
||||||
/* To get the right color, we need an opacity modifier which means we have to work */
|
|
||||||
/* around the problem. PostCSS doesn't support the opacity() function, and if we */
|
|
||||||
/* use something like postcss-functions we quickly run into an issue where the */
|
|
||||||
/* function we would define gets passed a CSS variable for custom themes, which */
|
|
||||||
/* can't be converted easily even when considering https://stackoverflow.com/a/41265350/7037379 */
|
|
||||||
//
|
|
||||||
/* Therefore, we just hack in a line and border the thing ourselves */
|
|
||||||
&::before {
|
|
||||||
border-top: 1px solid $primary-content;
|
|
||||||
opacity: 0.1;
|
|
||||||
content: "";
|
|
||||||
|
|
||||||
/* Counteract the padding problems (width: 100% ignores the 40px padding, */
|
|
||||||
/* unless we position it absolutely then it does the right thing). */
|
|
||||||
width: 100%;
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* round the top corners of the top button for the hover effect to be bounded */
|
/* round the top corners of the top button for the hover effect to be bounded */
|
||||||
|
@ -87,7 +68,7 @@ limitations under the License.
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus-visible {
|
&:focus-visible {
|
||||||
background-color: $menu-selected-color;
|
background-color: var(--cpd-color-bg-action-secondary-hovered);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.mx_AccessibleButton_disabled {
|
&.mx_AccessibleButton_disabled {
|
||||||
|
@ -137,7 +118,7 @@ limitations under the License.
|
||||||
mask-position: center;
|
mask-position: center;
|
||||||
mask-size: contain;
|
mask-size: contain;
|
||||||
mask-repeat: no-repeat;
|
mask-repeat: no-repeat;
|
||||||
background-color: $icon-button-color;
|
background-color: var(--cpd-color-icon-primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -147,7 +128,7 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_IconizedContextMenu_icon::before {
|
.mx_IconizedContextMenu_icon::before {
|
||||||
background-color: $alert;
|
background-color: var(--cpd-color-icon-critical-primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -172,7 +153,7 @@ limitations under the License.
|
||||||
|
|
||||||
&.mx_IconizedContextMenu_compact {
|
&.mx_IconizedContextMenu_compact {
|
||||||
.mx_IconizedContextMenu_optionList > * {
|
.mx_IconizedContextMenu_optionList > * {
|
||||||
padding: 8px 16px 8px 11px;
|
padding: 8px 16px 8px 12px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,6 @@ limitations under the License.
|
||||||
mask-position: center;
|
mask-position: center;
|
||||||
mask-size: contain;
|
mask-size: contain;
|
||||||
mask-repeat: no-repeat;
|
mask-repeat: no-repeat;
|
||||||
background: $icon-button-color;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -136,7 +136,7 @@ limitations under the License.
|
||||||
&.mx_AccessibleButton_kind_danger_outline {
|
&.mx_AccessibleButton_kind_danger_outline {
|
||||||
color: var(--cpd-color-text-critical-primary);
|
color: var(--cpd-color-text-critical-primary);
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
border: 1px solid var(--cpd-color-border-critical-primary);
|
border: 1px solid var(--cpd-color-border-critical-subtle);
|
||||||
|
|
||||||
&.mx_AccessibleButton_disabled {
|
&.mx_AccessibleButton_disabled {
|
||||||
color: var(--cpd-color-text-disabled);
|
color: var(--cpd-color-text-disabled);
|
||||||
|
|
|
@ -18,7 +18,7 @@ limitations under the License.
|
||||||
.mx_MessageActionBar {
|
.mx_MessageActionBar {
|
||||||
--MessageActionBar-size-button: 28px;
|
--MessageActionBar-size-button: 28px;
|
||||||
--MessageActionBar-size-box: 32px; /* 28px + 2px (margin) * 2 */
|
--MessageActionBar-size-box: 32px; /* 28px + 2px (margin) * 2 */
|
||||||
--MessageActionBar-item-hover-background: $panel-actions;
|
--MessageActionBar-item-hover-background: var(--cpd-color-bg-subtle-secondary);
|
||||||
--MessageActionBar-item-hover-borderRadius: 6px;
|
--MessageActionBar-item-hover-borderRadius: 6px;
|
||||||
--MessageActionBar-item-hover-zIndex: 1;
|
--MessageActionBar-item-hover-zIndex: 1;
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ limitations under the License.
|
||||||
line-height: $font-24px;
|
line-height: $font-24px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background: $background;
|
background: $background;
|
||||||
border: 1px solid $input-border-color;
|
border: var(--cpd-border-width-1) solid var(--cpd-color-border-disabled);
|
||||||
top: -32px;
|
top: -32px;
|
||||||
right: 8px;
|
right: 8px;
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
@ -96,7 +96,7 @@ limitations under the License.
|
||||||
--MessageActionBar-icon-size: 18px;
|
--MessageActionBar-icon-size: 18px;
|
||||||
width: var(--MessageActionBar-size-button);
|
width: var(--MessageActionBar-size-button);
|
||||||
height: var(--MessageActionBar-size-button);
|
height: var(--MessageActionBar-size-button);
|
||||||
color: $secondary-content;
|
color: var(--cpd-color-icon-secondary);
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
@ -114,7 +114,7 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
color: $primary-content;
|
color: var(--cpd-color-icon-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
&.mx_MessageActionBar_downloadButton {
|
&.mx_MessageActionBar_downloadButton {
|
||||||
|
|
|
@ -214,19 +214,19 @@ limitations under the License.
|
||||||
padding-top: 10px;
|
padding-top: 10px;
|
||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
|
|
||||||
border: 1px solid $quinary-content;
|
border: var(--cpd-border-width-1) solid var(--cpd-color-border-interactive-secondary);
|
||||||
box-shadow: 0px 1px 3px rgba(23, 25, 28, 0.05);
|
box-shadow: 0px 4px 24px rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_ContextualMenu_chevron_top {
|
.mx_ContextualMenu_chevron_top {
|
||||||
left: auto;
|
left: auto;
|
||||||
right: 22px;
|
right: 22px;
|
||||||
border-bottom-color: $quinary-content;
|
border-bottom-color: var(--cpd-color-border-interactive-secondary);
|
||||||
|
|
||||||
&::after {
|
&::after {
|
||||||
content: "";
|
content: "";
|
||||||
border: inherit;
|
border: inherit;
|
||||||
border-bottom-color: $menu-bg-color;
|
border-bottom-color: var(--cpd-color-bg-canvas-default);
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 1px;
|
top: 1px;
|
||||||
left: -8px;
|
left: -8px;
|
||||||
|
|
|
@ -42,7 +42,7 @@ limitations under the License.
|
||||||
background: var(--MessageActionBar-item-hover-background);
|
background: var(--MessageActionBar-item-hover-background);
|
||||||
border-radius: var(--MessageActionBar-item-hover-borderRadius);
|
border-radius: var(--MessageActionBar-item-hover-borderRadius);
|
||||||
z-index: var(--MessageActionBar-item-hover-zIndex);
|
z-index: var(--MessageActionBar-item-hover-zIndex);
|
||||||
color: $primary-content;
|
color: var(--cpd-color-icon-primary);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -314,74 +314,6 @@ limitations under the License.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_MessageComposer_formatting {
|
|
||||||
cursor: pointer;
|
|
||||||
margin: 0 11px;
|
|
||||||
width: 24px;
|
|
||||||
height: 18px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MessageComposer_formatbar_wrapper {
|
|
||||||
width: 100%;
|
|
||||||
background-color: $menu-bg-color;
|
|
||||||
box-shadow: inset 0 1px 0 0 rgba(0, 0, 0, 0.08);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MessageComposer_formatbar {
|
|
||||||
margin: auto;
|
|
||||||
display: flex;
|
|
||||||
|
|
||||||
height: 30px;
|
|
||||||
|
|
||||||
box-sizing: border-box;
|
|
||||||
padding-left: 62px;
|
|
||||||
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
font-size: $font-10px;
|
|
||||||
color: $info-plinth-fg-color;
|
|
||||||
|
|
||||||
* {
|
|
||||||
margin-right: 4px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MessageComposer_format_button,
|
|
||||||
.mx_MessageComposer_formatbar_cancel,
|
|
||||||
.mx_MessageComposer_formatbar_markdown {
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MessageComposer_formatbar_cancel {
|
|
||||||
margin-right: 22px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MessageComposer_formatbar_markdown {
|
|
||||||
height: 17px;
|
|
||||||
width: 30px;
|
|
||||||
margin-right: 64px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MessageComposer_input_markdownIndicator {
|
|
||||||
height: 10px;
|
|
||||||
width: 12px;
|
|
||||||
padding: 4px 4px 4px 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MessageComposer_formatbar_markdown,
|
|
||||||
.mx_MessageComposer_input_markdownIndicator {
|
|
||||||
cursor: pointer;
|
|
||||||
mask-image: url("$(res)/img/markdown.svg");
|
|
||||||
mask-size: contain;
|
|
||||||
mask-position: center;
|
|
||||||
mask-repeat: no-repeat;
|
|
||||||
background-color: $icon-button-color;
|
|
||||||
|
|
||||||
&.mx_MessageComposer_markdownDisabled {
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mx_MatrixChat_useCompactLayout {
|
.mx_MatrixChat_useCompactLayout {
|
||||||
.mx_MessageComposer_input {
|
.mx_MessageComposer_input {
|
||||||
min-height: 50px;
|
min-height: 50px;
|
||||||
|
|
|
@ -22,7 +22,7 @@ limitations under the License.
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background-color: $background;
|
background-color: $background;
|
||||||
border: 1px solid $input-border-color;
|
border: var(--cpd-border-width-1) solid var(--cpd-color-border-disabled);
|
||||||
user-select: none;
|
user-select: none;
|
||||||
/* equal to z-index of mx_ReplyPreview and mx_RoomView_statusArea (1000) */
|
/* equal to z-index of mx_ReplyPreview and mx_RoomView_statusArea (1000) */
|
||||||
/* but as it appears after them in the DOM, will appear on top. */
|
/* but as it appears after them in the DOM, will appear on top. */
|
||||||
|
@ -48,7 +48,7 @@ limitations under the License.
|
||||||
border: none;
|
border: none;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
background: $panel-actions;
|
background: var(--cpd-color-bg-subtle-secondary);
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
@ -63,11 +63,11 @@ limitations under the License.
|
||||||
width: 100%;
|
width: 100%;
|
||||||
mask-repeat: no-repeat;
|
mask-repeat: no-repeat;
|
||||||
mask-position: center;
|
mask-position: center;
|
||||||
background-color: $secondary-content;
|
background-color: var(--cpd-color-icon-secondary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_MessageComposerFormatBar_button:hover::after {
|
.mx_MessageComposerFormatBar_button:hover::after {
|
||||||
background-color: $primary-content;
|
background-color: var(--cpd-color-icon-primary);
|
||||||
}
|
}
|
||||||
|
|
||||||
.mx_MessageComposerFormatBar_buttonIconBold::after {
|
.mx_MessageComposerFormatBar_buttonIconBold::after {
|
||||||
|
|