fix(canvas-lms): tabs, toggles, equation editor, misc. (#1744)

This commit is contained in:
pynappo authored and GitHub committed 2025-05-12 13:53:19 -07:00
1 parent d0ef1a5631
commit f87ad1cae8
1 file changed
+159 -73
+159 -73
View File
@@ -73,9 +73,6 @@
color: @subtext0 !important; color: @subtext0 !important;
} }
} }
textarea + span[class$="textArea__outline"] {
border-color: @accent;
}
/* GLOBALS/VARIABLES */ /* GLOBALS/VARIABLES */
--ic-brand-primary: @accent; --ic-brand-primary: @accent;
@@ -92,8 +89,6 @@
/* hover colors, used based on whether canvas's css has a blue hover or grayed-out hover color */ /* hover colors, used based on whether canvas's css has a blue hover or grayed-out hover color */
@hover-regular: fade(@surface2, 50%); @hover-regular: fade(@surface2, 50%);
@hover-accent: mix(@base, @accent, 70%); @hover-accent: mix(@base, @accent, 70%);
@hover-button: @surface1;
@hover-flush-button: fade(@surface1, 30%);
/* GENERAL UI CHANGES */ /* GENERAL UI CHANGES */
@@ -229,9 +224,9 @@
} }
/* fullscreen background for modal popups */ /* fullscreen background for modal popups */
body > span > span[class*="mask"] { :where(body > span > span[class*="mask"]) {
background-color: fade(@overlay0, 75%);
/* modals */ /* modals */
background-color: fade(@overlay0, 75%);
> span { > span {
color: @text; color: @text;
background-color: @base; background-color: @base;
@@ -328,7 +323,7 @@
fill: @text !important; fill: @text !important;
} }
/* sidebar trays (e.g. slide in from right side) */ /* sidebar sliding trays */
body > span > [class*="tray"] { body > span > [class*="tray"] {
background-color: @mantle; background-color: @mantle;
fieldset, fieldset,
@@ -347,6 +342,11 @@
} }
} }
div[aria-label="Global Navigation"] [class$="summaryText"] svg {
/* mobile nav menu icons */
color: @blue;
}
#nav-tray-portal { #nav-tray-portal {
> span > span { > span > span {
background-color: @base; background-color: @base;
@@ -378,6 +378,11 @@
} }
} }
.profile-tray button[aria-describedby^="Tooltip"] {
/* info tooltip on high contrast ui checkbox */
.flush-button();
}
/* link sidebar for courses */ /* link sidebar for courses */
.list-view a.active { .list-view a.active {
border-color: @accent; border-color: @accent;
@@ -416,6 +421,7 @@
} }
/* filled-in buttons - this auto-generated class covers a lot of them */ /* filled-in buttons - this auto-generated class covers a lot of them */
@hover-button: @surface1;
.neutral-button() { .neutral-button() {
color: @text; color: @text;
background-color: @surface0; background-color: @surface0;
@@ -442,6 +448,7 @@
} }
/* this is for buttons that are accent-colored */ /* this is for buttons that are accent-colored */
@hover-accent-button: mix(@base, @accent, 20%);
.accent-button() { .accent-button() {
background-color: @accent; background-color: @accent;
border-color: @surface1; border-color: @surface1;
@@ -454,6 +461,13 @@
background-color: @accent; background-color: @accent;
border-color: @surface1; border-color: @surface1;
} }
&:hover {
background-color: @hover-accent-button;
> [class$="baseButton__content"] {
background-color: @hover-accent-button;
}
color: @mantle;
}
} }
span[type="button"] { span[type="button"] {
@@ -461,6 +475,7 @@
} }
/* this is for buttons that have no border/background until hovered */ /* this is for buttons that have no border/background until hovered */
@hover-flush-button: fade(@surface1, 30%);
.flush-button() { .flush-button() {
color: @text; color: @text;
background-color: transparent; background-color: transparent;
@@ -485,7 +500,13 @@
} }
.btn:not(.btn-primary, .btn-link), .btn:not(.btn-primary, .btn-link),
.Button:not(.Button--link, .Button--primary), .Button:not(
.Button--link,
.Button--primary,
.Button--icon-action,
.Button--icon-action-danger,
.Button--icon-action-rev
),
.ui-button { .ui-button {
background-color: @surface0; background-color: @surface0;
color: @text; color: @text;
@@ -605,16 +626,25 @@
background: transparent !important; background: transparent !important;
} }
.Button--icon-action-rev:focus {
box-shadow: inset 0 0 0 2px @text;
}
.btn-primary:focus, .Button--primary:focus { .btn-primary:focus, .Button--primary:focus {
box-shadow: inset 0 0 0 2px @crust; box-shadow: inset 0 0 0 2px @crust;
} }
/* checkboxes */ /* outlines around clicked elements */
[class$="checkboxFacade__facade"] { [class$="__facade"] {
&::before { &::before {
border-color: @accent; border-color: @accent;
} }
} }
textarea + span[class$="textArea__outline"] {
border-color: @accent;
}
/* checkboxes */
input + label span[class$="checkboxFacade__facade"] { input + label span[class$="checkboxFacade__facade"] {
border-color: @surface2; border-color: @surface2;
background-color: @base; background-color: @base;
@@ -624,6 +654,35 @@
background-color: @text; background-color: @text;
color: @base; color: @base;
} }
/* toggle switches */
input + label [class*="toggleFacade__facade"] {
border-color: @surface1;
background-color: @surface0;
span[class$="__iconToggle"] {
&::before {
background-color: @text;
border-color: @surface2;
}
svg {
color: @mantle;
}
}
}
input:checked + label [class*="toggleFacade__facade"] {
border-color: @surface1;
background-color: @green;
span[class$="__iconToggle"] {
&::before {
background-color: @mantle;
border-color: @green;
}
svg {
color: @green;
}
}
}
input + label span[class$="label"] { input + label span[class$="label"] {
color: @text; color: @text;
} }
@@ -636,9 +695,6 @@
input { input {
color: @text !important; color: @text !important;
} }
&::before {
border-color: @accent;
}
} }
select { select {
color: @text; color: @text;
@@ -685,6 +741,59 @@
background-color: @surface0; background-color: @surface0;
} }
/* ui tabs */
.ui-tabs {
.ui-tabs-panel,
.ui-tabs-nav {
border-color: @surface1;
}
.ui-tabs-nav li.ui-state-hover,
.ui-tabs-nav li:hover,
.ui-tabs-nav li.ui-tabs-active,
.ui-tabs-nav li.ui-tabs-active.ui-state-hover,
.ui-tabs-nav li.ui-tabs-active:hover {
background-color: @base;
border-color: @surface1;
a {
color: @text;
}
}
.ui-state-hover {
background-color: mix(@overlay2, @surface1, 20%);
}
.ui-tabs-panel {
background-color: @base;
}
#assignments {
tr .title {
border-color: @surface1;
}
}
}
div[class$="view-tabs__container"] {
background-color: transparent;
div[class$="view-tab"] {
background-color: transparent;
color: @text;
&[aria-selected="true"] {
border-color: @surface2;
border-bottom-color: @base;
}
}
div[role="tabpanel"] > div {
background-color: transparent;
border-color: @surface1;
}
}
div[role="tab"] {
color: @text;
&[aria-selected="true"]::after {
background-color: @accent;
}
}
/* RECENT ACTIVITY/HOME */ /* RECENT ACTIVITY/HOME */
.recent-activity-header, .recent-activity-header,
.stream-category { .stream-category {
@@ -886,23 +995,6 @@
#ColorPicker__Apply { #ColorPicker__Apply {
.accent-button(); .accent-button();
} }
span[data-position-content^="Popover"]:has(
div[class$="view-tabs__container"]
) {
div[class$="view-tab"] {
background-color: @surface1;
border-bottom-color: @surface2;
color: @text;
&[aria-selected="true"] {
border-color: @surface2;
border-bottom-color: transparent;
}
}
div[role="tabpanel"] > div {
border-color: @surface2;
background-color: @surface1;
}
}
.ColorPicker__Container { .ColorPicker__Container {
background-color: @surface1; background-color: @surface1;
border-color: @surface2; border-color: @surface2;
@@ -1611,6 +1703,7 @@
background-color: fade(@overlay2, 50%); background-color: fade(@overlay2, 50%);
color: @subtext0; color: @subtext0;
fill: @subtext0; fill: @subtext0;
box-shadow: 0 0 0 2px @accent;
} }
.tox-tbtn, .tox-tbtn,
.tox-split-button, .tox-split-button,
@@ -1688,11 +1781,35 @@
.tox-collection__item--active { .tox-collection__item--active {
background-color: mix(@accent, @base, 30%); background-color: mix(@accent, @base, 30%);
} }
.tox-collection--list .tox-collection__item--enabled {
background-color: @surface1;
}
.tox-tbtn:focus:not(.tox-tbtn--disabled) svg {
fill: @text;
}
} }
.canvas-rce__skins--root { .canvas-rce__skins--root {
background-color: @base; background-color: @base;
} }
/* equation editor */
span[aria-label="Equation Editor"] {
div[class$="panel"] button {
.neutral-button();
}
textarea,
math-field {
color: @text;
border-color: @surface2 !important;
}
[data-testid="mathml-preview-element"] {
color: @text;
}
button[data-testid="equation-editor-modal-done"] {
.accent-button();
}
}
#rubrics { #rubrics {
.rubric_title { .rubric_title {
background-color: @surface0; background-color: @surface0;
@@ -1703,40 +1820,13 @@
background-color: @surface0; background-color: @surface0;
border-color: @surface1; border-color: @surface1;
} }
table.ratings td { .ratings * {
border-color: @surface1; border-color: @surface1;
} }
} }
} .rubric-footer {
.ui-tabs {
.ui-tabs-panel,
.ui-tabs-nav {
border-color: @surface1; border-color: @surface1;
} }
.ui-tabs-nav li.ui-state-hover,
.ui-tabs-nav li:hover,
.ui-tabs-nav li.ui-tabs-active,
.ui-tabs-nav li.ui-tabs-active.ui-state-hover,
.ui-tabs-nav li.ui-tabs-active:hover {
background-color: @base;
border-color: @surface1;
a {
color: @text;
}
}
.ui-state-hover {
background-color: mix(@overlay2, @surface1, 20%);
}
.ui-tabs-panel {
background-color: @base;
}
#assignments {
tr .title {
border-color: @surface1;
}
}
} }
/* discussions */ /* discussions */
@@ -1844,6 +1934,9 @@
> span > div { > span > div {
border-color: @surface1 !important; border-color: @surface1 !important;
} }
[data-btn-id="rce-editormessage-btn"] {
.neutral-button();
}
} }
button[data-testid="attach-btn"] > span { button[data-testid="attach-btn"] > span {
color: @text; color: @text;
@@ -1989,6 +2082,9 @@
} }
} }
} }
button[id^="webcam"] {
.neutral-button();
}
/* GRADES */ /* GRADES */
.ic-Table th { .ic-Table th {
@@ -2248,6 +2344,9 @@
background-color: @surface0; background-color: @surface0;
border-color: @surface1; border-color: @surface1;
color: @text; color: @text;
&:hover {
background-color: @surface1;
}
svg { svg {
fill: @text; fill: @text;
} }
@@ -2267,19 +2366,6 @@
color: @subtext1; color: @subtext1;
} }
} }
div[class$="view-tabs__container"] {
div[role="tabpanel"] > div {
background-color: transparent;
border-color: @surface1;
}
background-color: transparent;
}
div[role="tab"] {
color: @text;
&[aria-selected="true"]::after {
background-color: @accent;
}
}
/* OUTCOMES */ /* OUTCOMES */
#outcome_management { #outcome_management {