Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Revert "Use Compound primary colors for most actions" (#12264)
Browse files Browse the repository at this point in the history
* Revert ed5ef02

* Update failing snapshots

* Update snapshots after develop merge
  • Loading branch information
florianduros authored Feb 20, 2024
1 parent d20e9e4 commit 96a33b8
Show file tree
Hide file tree
Showing 87 changed files with 99 additions and 104 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 14 additions & 13 deletions res/css/_common.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@ legend {
border-radius: 8px;
font: var(--cpd-font-body-md-regular);
color: $button-fg-color;
background-color: var(--cpd-color-bg-action-primary-rest);
background-color: $accent;
width: auto;
padding: 7px;
padding-left: 1.5em;
Expand Down Expand Up @@ -595,8 +595,8 @@ legend {

/* flip colours for the secondary ones */
font-weight: var(--cpd-font-weight-semibold);
border: 1px solid var(--cpd-color-border-interactive-secondary);
color: var(--cpd-color-text-primary);
border: 1px solid currentColor;
color: $accent;
background-color: transparent;
font-family: inherit;
}
Expand All @@ -616,25 +616,24 @@ 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: 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);
color: $accent-fg-color;
background-color: $accent;
min-width: 156px;
}

.mx_Dialog button.danger:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]),
.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: var(--cpd-color-bg-critical-primary);
border: solid 1px var(--cpd-color-bg-critical-primary);
color: var(--cpd-color-text-on-solid-primary);
background-color: $alert;
border: solid 1px $alert;
color: $accent-fg-color;
}

.mx_Dialog button.warning:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]),
.mx_Dialog input[type="submit"].warning {
border: solid 1px var(--cpd-color-border-critical-primary);
color: var(--cpd-color-text-critical-primary);
border: solid 1px $alert;
color: $alert;
}

.mx_Dialog button:not(.mx_Dialog_nonDialogButton):not([class|="maplibregl"]):not(.mx_AccessibleButton):disabled,
Expand Down Expand Up @@ -816,9 +815,11 @@ legend {
}

@define-mixin composerButtonHighLight {
background: var(--cpd-color-bg-subtle-primary);
/* 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 */
&::before {
background-color: var(--cpd-color-icon-primary) !important;
background-color: $accent !important;
}
}

Expand Down
12 changes: 6 additions & 6 deletions res/css/components/views/polls/_PollOption.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,26 @@ limitations under the License.
.mx_PollOption_winnerIcon {
height: 12px;
width: 12px;
color: var(--cpd-color-icon-accent-tertiary);
color: $accent;
margin-right: $spacing-4;
vertical-align: middle;
}

.mx_PollOption_checked {
border-color: var(--cpd-color-border-interactive-hovered);
border-color: $accent;

.mx_PollOption_popularityBackground {
.mx_PollOption_popularityAmount {
background-color: var(--cpd-color-icon-accent-tertiary);
background-color: $accent;
}
}

/* override checked radio button styling to show checkmark instead */
.mx_StyledRadioButton_checked {
input[type="radio"]:checked + div {
input[type="radio"] + div {
border-width: 2px;
border-color: var(--cpd-color-icon-accent-tertiary);
background-color: var(--cpd-color-icon-accent-tertiary);
border-color: $accent;
background-color: $accent;
background-image: url("$(res)/img/element-icons/check-white.svg");
background-size: 12px;
background-repeat: no-repeat;
Expand Down
12 changes: 5 additions & 7 deletions res/css/structures/_SpaceRoomView.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ limitations under the License.
}

&:hover {
border-color: var(--cpd-color-bg-interactive-primary-rest);
border-color: $accent;

&::before {
background-color: var(--cpd-color-icon-primary);
background-color: $accent;
}

> span {
Expand Down Expand Up @@ -212,7 +212,7 @@ limitations under the License.
left: 8px;
height: 16px;
width: 16px;
background: var(--cpd-color-icon-on-solid-primary);
background: #fff; /* white icon fill */
mask-size: 16px;
mask-image: url("$(res)/img/element-icons/room/invite.svg");
}
Expand Down Expand Up @@ -293,13 +293,11 @@ limitations under the License.
}

.mx_SpaceRoomView_inviteTeammates_inviteDialogButton {
color: var(--cpd-color-text-primary);
font-weight: var(--cpd-font-weight-semibold);
text-decoration: underline;
color: $accent;

&::before {
mask-image: url("$(res)/img/element-icons/room/invite.svg");
background-color: var(--cpd-color-icon-primary);
background-color: $accent;
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions res/css/structures/_TabbedView.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,12 @@ limitations under the License.
}

.mx_TabbedView_tabLabel_active {
background-color: var(--cpd-color-bg-action-primary-rest);
color: var(--cpd-color-text-on-solid-primary);
background-color: $accent;
color: $tab-label-active-fg-color;
}

.mx_TabbedView_tabLabel_active .mx_TabbedView_maskedIcon::before {
background-color: var(--cpd-color-icon-on-solid-primary);
background-color: $tab-label-active-fg-color;
}

.mx_TabbedView_maskedIcon {
Expand Down
3 changes: 1 addition & 2 deletions res/css/views/dialogs/_CreateRoomDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ limitations under the License.
list-style: none;
font-weight: var(--cpd-font-weight-semibold);
cursor: pointer;
color: var(--cpd-color-text-primary);
text-decoration: underline;
color: $accent;
width: fit-content;

/* list-style doesn't do it for webkit */
Expand Down
3 changes: 2 additions & 1 deletion res/css/views/dialogs/_FeedbackDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ limitations under the License.

a,
.mx_AccessibleButton_kind_link {
color: $accent;
text-decoration: underline;
}

Expand Down Expand Up @@ -131,7 +132,7 @@ limitations under the License.

.mx_StyledRadioButton_checked {
font-size: 24px;
border-color: var(--cpd-color-bg-action-primary-rest);
border-color: $accent;
}

&::after {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/dialogs/_SpaceSettingsDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ limitations under the License.

.mx_AccessibleButton_hasKind {
&.mx_AccessibleButton_kind_link {
font: var(--cpd-font-body-md-semibold);
font: var(--cpd-font-body-md-regular);
margin: 7px 18px;

&.mx_SettingsTab_showAdvanced {
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/dialogs/_SpotlightDialog.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ limitations under the License.
left: $spacing-8;
width: 16px;
height: 16px;
background: var(--cpd-color-icon-primary);
background: $accent;
}
}
}
Expand Down
63 changes: 32 additions & 31 deletions res/css/views/elements/_AccessibleButton.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ limitations under the License.
display: inline-flex;
align-items: center;
justify-content: center;
font: var(--cpd-font-body-md-semibold);
font: var(--cpd-font-body-md-regular);
border: none; /* override default <button /> styles */
word-break: keep-all; /* prevent button text in Chinese/Japanese/Korean (CJK) from being collapsed */

Expand All @@ -53,31 +53,29 @@ limitations under the License.
}

&.mx_AccessibleButton_kind_primary_sm {
color: var(--cpd-color-text-on-solid-primary);
background-color: var(--cpd-color-bg-action-primary-rest);
color: $button-primary-fg-color;
background-color: $accent;
}

&.mx_AccessibleButton_kind_danger_sm {
color: var(--cpd-color-text-on-solid-primary);
background-color: var(--cpd-color-bg-critical-primary);
color: $button-danger-fg-color;
background-color: $alert;
}

&.mx_AccessibleButton_kind_link_sm {
color: var(--cpd-color-text-primary);
text-decoration: underline;
font-weight: var(--cpd-font-weight-semibold);
color: $accent;
}

&.mx_AccessibleButton_kind_confirm_sm {
background-color: var(--cpd-color-bg-action-primary-rest);
background-color: $accent;

&::before {
mask-image: url("$(res)/img/feather-customised/check.svg");
}
}

&.mx_AccessibleButton_kind_cancel_sm {
background-color: var(--cpd-color-bg-critical-primary);
background-color: $alert;

&::before {
mask-image: url("$(res)/img/feather-customised/x.svg");
Expand All @@ -101,53 +99,57 @@ limitations under the License.
font-weight: var(--cpd-font-weight-semibold);
}

&.mx_AccessibleButton_kind_icon_primary,
&.mx_AccessibleButton_kind_icon_primary_outline,
&.mx_AccessibleButton_kind_primary,
&.mx_AccessibleButton_kind_primary_outline {
border: 1px solid $accent;
}

&.mx_AccessibleButton_kind_icon_primary,
&.mx_AccessibleButton_kind_primary {
border: 1px solid var(--cpd-color-bg-action-primary-rest);
color: var(--cpd-color-text-on-solid-primary);
background-color: var(--cpd-color-bg-action-primary-rest);
color: $button-primary-fg-color;
background-color: $accent;
}

&.mx_AccessibleButton_kind_icon_primary_outline,
&.mx_AccessibleButton_kind_primary_outline {
border: 1px solid var(--cpd-color-border-interactive-secondary);
color: var(--cpd-color-text-primary);
color: $accent;
}

&.mx_AccessibleButton_kind_secondary {
color: var(--cpd-color-text-primary);
text-decoration: underline;
color: $accent;
}

&.mx_AccessibleButton_kind_secondary_content {
color: $secondary-content;
}

&.mx_AccessibleButton_kind_danger {
color: var(--cpd-color-text-on-solid-primary);
background-color: var(--cpd-color-bg-critical-primary);
color: $button-danger-fg-color;
background-color: $alert;

&.mx_AccessibleButton_disabled {
color: var(--cpd-color-text-on-solid-primary);
background-color: var(--cpd-color-bg-critical-primary);
color: $button-danger-disabled-fg-color;
background-color: $button-danger-disabled-bg-color;
}
}

&.mx_AccessibleButton_kind_danger_outline {
color: var(--cpd-color-text-critical-primary);
color: $alert;
background-color: transparent;
border: 1px solid var(--cpd-color-border-critical-primary);
border: 1px solid $alert;

&.mx_AccessibleButton_disabled {
color: var(--cpd-color-text-disabled);
border-color: var(--cpd-color-border-disabled);
color: $button-danger-disabled-bg-color;
border-color: $button-danger-disabled-bg-color;
}
}

&.mx_AccessibleButton_kind_danger_sm {
&.mx_AccessibleButton_disabled {
color: var(--cpd-color-text-disabled);
background-color: var(--cpd-color-bg-subtle-primary);
color: $button-danger-disabled-fg-color;
background-color: $button-danger-disabled-bg-color;
}
}

Expand All @@ -156,19 +158,18 @@ limitations under the License.
&.mx_AccessibleButton_kind_danger_inline,
&.mx_AccessibleButton_kind_content_inline {
font-size: inherit;
font-weight: var(--cpd-font-weight-semibold);
font-weight: normal;
line-height: inherit;
padding: 0;
text-decoration: underline;
}

&.mx_AccessibleButton_kind_link,
&.mx_AccessibleButton_kind_link_inline {
color: var(--cpd-color-text-primary);
color: $accent;
}

&.mx_AccessibleButton_kind_danger_inline {
color: var(--cpd-color-text-critical-primary);
color: $alert;
}

&.mx_AccessibleButton_kind_content_inline {
Expand Down
4 changes: 2 additions & 2 deletions res/css/views/elements/_ProgressBar.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ progress.mx_ProgressBar {
width: 60px;
overflow: hidden;
appearance: none;
border: var(--cpd-border-width-1) solid var(--cpd-color-gray-400);
border: none;

@mixin ProgressBarBorderRadius 6px;
@mixin ProgressBarColour var(--cpd-color-icon-accent-tertiary);
@mixin ProgressBarColour $accent;
@mixin ProgressBarBgColour $progressbar-bg-color;
::-webkit-progress-value {
transition: width 1s;
Expand Down
2 changes: 0 additions & 2 deletions res/css/views/elements/_ReplyChain.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ limitations under the License.
white-space: nowrap; /* Enforce 'In reply to' to be a single line */
color: $secondary-content;
transition: color ease 0.15s;
font-weight: var(--cpd-font-weight-normal);
text-decoration: inherit;

&:hover {
color: $primary-content;
Expand Down
2 changes: 1 addition & 1 deletion res/css/views/elements/_Slider.pcss
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ limitations under the License.
background: none;
font-size: 1em; /* set base multiplier for em units applied later */

--active-color: var(--cpd-color-bg-action-primary-rest);
--active-color: $accent;
--selection-dot-size: 2.4em;

&:disabled {
Expand Down
Loading

0 comments on commit 96a33b8

Please sign in to comment.