Refine styles of controls to match Compound (#12299)
This changes the styles of buttons, other form controls, and tabs in settings to: 1. Improve their usage of semantic colors, so that they adapt correctly to custom themes 2. Make them more visually coherent with the new Compound design system, as we integrate more of it into the app This is a re-introduction of https://github.com/matrix-org/matrix-react-sdk/pull/12241 with the difference that we're now using our branding colors again on form colors, and buttons have become rounded to match the appearance of new Compound buttons.
This commit is contained in:
parent
5c8b14c53e
commit
6eafe0e5a8
119 changed files with 225 additions and 201 deletions
|
@ -501,23 +501,34 @@ legend {
|
|||
}
|
||||
|
||||
@define-mixin customisedCancelButton {
|
||||
mask: url("$(res)/img/cancel.svg");
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
mask-size: cover;
|
||||
background-color: $dialog-close-fg-color;
|
||||
cursor: pointer;
|
||||
position: unset;
|
||||
width: unset;
|
||||
height: unset;
|
||||
position: relative;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
border-radius: 14px;
|
||||
background-color: var(--cpd-color-bg-subtle-secondary);
|
||||
|
||||
&:hover {
|
||||
background-color: var(--cpd-color-bg-subtle-primary);
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
position: absolute;
|
||||
mask-image: url("@vector-im/compound-design-tokens/icons/close.svg");
|
||||
mask-repeat: no-repeat;
|
||||
mask-position: center;
|
||||
mask-size: 20px;
|
||||
background-color: var(--cpd-color-icon-secondary);
|
||||
}
|
||||
}
|
||||
|
||||
.mx_Dialog_cancelButton {
|
||||
@mixin customisedCancelButton;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
top: 4px;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
|
@ -559,10 +570,10 @@ legend {
|
|||
/* align images in buttons (eg spinners) */
|
||||
vertical-align: middle;
|
||||
border: 0px;
|
||||
border-radius: 8px;
|
||||
border-radius: 24px;
|
||||
font: var(--cpd-font-body-md-regular);
|
||||
color: $button-fg-color;
|
||||
background-color: $accent;
|
||||
background-color: var(--cpd-color-bg-action-primary-rest);
|
||||
width: auto;
|
||||
padding: 7px;
|
||||
padding-left: 1.5em;
|
||||
|
@ -595,8 +606,8 @@ legend {
|
|||
|
||||
/* flip colours for the secondary ones */
|
||||
font-weight: var(--cpd-font-weight-semibold);
|
||||
border: 1px solid currentColor;
|
||||
color: $accent;
|
||||
border: 1px solid var(--cpd-color-border-interactive-secondary);
|
||||
color: var(--cpd-color-text-primary);
|
||||
background-color: transparent;
|
||||
font-family: inherit;
|
||||
}
|
||||
|
@ -616,8 +627,9 @@ legend {
|
|||
.mx_Dialog input[type="submit"].mx_Dialog_primary,
|
||||
.mx_Dialog_buttons button.mx_Dialog_primary:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton),
|
||||
.mx_Dialog_buttons input[type="submit"].mx_Dialog_primary {
|
||||
color: $accent-fg-color;
|
||||
background-color: $accent;
|
||||
color: var(--cpd-color-text-on-solid-primary);
|
||||
background-color: var(--cpd-color-bg-action-primary-rest);
|
||||
border-color: var(--cpd-color-bg-action-primary-rest);
|
||||
min-width: 156px;
|
||||
}
|
||||
|
||||
|
@ -625,15 +637,15 @@ legend {
|
|||
.mx_Dialog input[type="submit"].danger,
|
||||
.mx_Dialog_buttons button.danger:not(.mx_Dialog_nonDialogButton):not(.mx_AccessibleButton),
|
||||
.mx_Dialog_buttons input[type="submit"].danger {
|
||||
background-color: $alert;
|
||||
border: solid 1px $alert;
|
||||
color: $accent-fg-color;
|
||||
background-color: var(--cpd-color-bg-critical-primary);
|
||||
border: solid 1px var(--cpd-color-bg-critical-primary);
|
||||
color: var(--cpd-color-text-on-solid-primary);
|
||||
}
|
||||
|
||||
.mx_Dialog button.warning:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]),
|
||||
.mx_Dialog input[type="submit"].warning {
|
||||
border: solid 1px $alert;
|
||||
color: $alert;
|
||||
border: solid 1px var(--cpd-color-border-critical-primary);
|
||||
color: var(--cpd-color-text-critical-primary);
|
||||
}
|
||||
|
||||
.mx_Dialog button:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]):not(.mx_AccessibleButton):disabled,
|
||||
|
@ -815,11 +827,9 @@ legend {
|
|||
}
|
||||
|
||||
@define-mixin composerButtonHighLight {
|
||||
/* TODO: Refactor as this will break for apps that override the accent color */
|
||||
background: var(--cpd-color-green-300);
|
||||
/* make the icon the accent color too */
|
||||
background: var(--cpd-color-bg-subtle-primary);
|
||||
&::before {
|
||||
background-color: $accent !important;
|
||||
background-color: var(--cpd-color-icon-primary) !important;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue