feat(canvas-lms): theme new dashboard (#2324)
This commit is contained in:
1 parent
5307c4e5e9
commit
2a6bb04c03
1 file changed
+277
-44
@@ -83,11 +83,7 @@
|
|||||||
background-color: @base;
|
background-color: @base;
|
||||||
border-color: @surface2;
|
border-color: @surface2;
|
||||||
}
|
}
|
||||||
img:not(
|
img:not([src^="/"], [src*="cloudfront.net/dist"], [src*="instructuremedia.com/build"]) {
|
||||||
[src^="/"],
|
|
||||||
[src*="cloudfront.net/dist"],
|
|
||||||
[src*="instructuremedia.com/build"]
|
|
||||||
) {
|
|
||||||
/* force a white background for user-uploaded images */
|
/* force a white background for user-uploaded images */
|
||||||
background-color: #fffd;
|
background-color: #fffd;
|
||||||
}
|
}
|
||||||
@@ -133,8 +129,7 @@
|
|||||||
|
|
||||||
.user_content {
|
.user_content {
|
||||||
/* for highlighted non-links in user-created content, revert to regular-ish text color */
|
/* for highlighted non-links in user-created content, revert to regular-ish text color */
|
||||||
[style~="background-color:"]:not([style~="color:"])
|
[style~="background-color:"]:not([style~="color:"]) :not(a.external span) {
|
||||||
:not(a.external span) {
|
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
/* just a special exception for pure black text and pure white backgrounds */
|
/* just a special exception for pure black text and pure white backgrounds */
|
||||||
@@ -380,14 +375,18 @@
|
|||||||
|
|
||||||
/* 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;
|
@hover-button: @surface1;
|
||||||
.neutral-button() {
|
.neutral-button(@bg: @surface0, @border-color: @surface1) {
|
||||||
color: @text;
|
color: @text;
|
||||||
background-color: @surface0;
|
background-color: @bg;
|
||||||
border-color: @surface1;
|
border-color: @border-color;
|
||||||
&:hover {
|
&:focus {
|
||||||
background-color: @hover-button;
|
outline-color: @accent !important;
|
||||||
|
}
|
||||||
|
@hover: if(@bg = @surface0, @hover-button, lighten(@bg, 10%));
|
||||||
|
&:hover:not(:disabled) {
|
||||||
|
background-color: @hover;
|
||||||
> [class$="baseButton__content"] {
|
> [class$="baseButton__content"] {
|
||||||
background-color: @hover-button;
|
background-color: @hover;
|
||||||
}
|
}
|
||||||
color: @text;
|
color: @text;
|
||||||
}
|
}
|
||||||
@@ -396,8 +395,8 @@
|
|||||||
}
|
}
|
||||||
> [class$="baseButton__content"] {
|
> [class$="baseButton__content"] {
|
||||||
color: @text;
|
color: @text;
|
||||||
background-color: @surface0;
|
background-color: @bg;
|
||||||
border-color: @surface1;
|
border-color: @border-color;
|
||||||
transition-property: background, transform, filter;
|
transition-property: background, transform, filter;
|
||||||
}
|
}
|
||||||
[class$="text"] {
|
[class$="text"] {
|
||||||
@@ -428,6 +427,31 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@hover-accent-button-hollow: fadeout(@accent, 80%);
|
||||||
|
/* this represents buttons which do not have a solid background and are accent-colored. */
|
||||||
|
.accent-button-hollow() {
|
||||||
|
color: @accent;
|
||||||
|
border-color: @accent;
|
||||||
|
&:hover {
|
||||||
|
background-color: @hover-accent-button-hollow;
|
||||||
|
> [class$="baseButton__content"] {
|
||||||
|
background-color: @hover-accent-button-hollow;
|
||||||
|
}
|
||||||
|
color: @accent;
|
||||||
|
}
|
||||||
|
path[fill="#000000"] {
|
||||||
|
fill: @accent;
|
||||||
|
}
|
||||||
|
> [class$="baseButton__content"] {
|
||||||
|
color: @accent;
|
||||||
|
border-color: @accent;
|
||||||
|
transition-property: background, transform, filter;
|
||||||
|
}
|
||||||
|
[class$="text"] {
|
||||||
|
color: @accent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
span[type="button"] {
|
span[type="button"] {
|
||||||
.neutral-button();
|
.neutral-button();
|
||||||
}
|
}
|
||||||
@@ -458,13 +482,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.btn:not(.btn-primary, .btn-link),
|
.btn:not(.btn-primary, .btn-link),
|
||||||
.Button:not(
|
.Button:not(.Button--link, .Button--primary, .Button--icon-action, .Button--icon-action-danger, .Button--icon-action-rev),
|
||||||
.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;
|
||||||
@@ -484,7 +502,8 @@
|
|||||||
&:active {
|
&:active {
|
||||||
background-color: darken(@hover-button, 3%);
|
background-color: darken(@hover-button, 3%);
|
||||||
}
|
}
|
||||||
&.active, &.Button--active {
|
&.active,
|
||||||
|
&.Button--active {
|
||||||
background-color: @subtext0;
|
background-color: @subtext0;
|
||||||
border-color: lighten(@surface1, 10%);
|
border-color: lighten(@surface1, 10%);
|
||||||
color: @mantle;
|
color: @mantle;
|
||||||
@@ -493,10 +512,15 @@
|
|||||||
|
|
||||||
.btn-link,
|
.btn-link,
|
||||||
.Button--link {
|
.Button--link {
|
||||||
&.active, &.Button--active, &.ui-button.ui-state-active, &:active {
|
&.active,
|
||||||
|
&.Button--active,
|
||||||
|
&.ui-button.ui-state-active,
|
||||||
|
&:active {
|
||||||
background: @surface0;
|
background: @surface0;
|
||||||
}
|
}
|
||||||
&.disabled, &.ui-button.ui-state-disabled, &[disabled] {
|
&.disabled,
|
||||||
|
&.ui-button.ui-state-disabled,
|
||||||
|
&[disabled] {
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -566,8 +590,8 @@
|
|||||||
}
|
}
|
||||||
/* end of copy-pasted styles */
|
/* end of copy-pasted styles */
|
||||||
|
|
||||||
span[role="button"]::before, /* drag handle */
|
span[role="button"]::before,
|
||||||
:is(button, a)[class$="baseButton"]::before {
|
/* drag handle */ :is(button, a)[class$="baseButton"]::before {
|
||||||
border-color: @accent;
|
border-color: @accent;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -588,7 +612,8 @@
|
|||||||
box-shadow: inset 0 0 0 2px @text;
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -787,14 +812,232 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* DASHBOARD */
|
/* DASHBOARD */
|
||||||
|
|
||||||
|
/* customizable one: https://community.instructure.com/en/discussion/665850/empowering-learners-introducing-the-new-customizable-dashboard */
|
||||||
|
button[data-testid="switch-to-old-dashboard-button"],
|
||||||
|
button[data-testid="switch-to-new-dashboard-button"] {
|
||||||
|
.neutral-button();
|
||||||
|
}
|
||||||
|
.responsive_student_grades_page {
|
||||||
|
/* color picker */
|
||||||
|
div[role="dialog"] > div {
|
||||||
|
background-color: @surface1;
|
||||||
|
border-color: @surface2;
|
||||||
|
h4,
|
||||||
|
label span {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
button[data-testid="color-picker-cancel"] {
|
||||||
|
.neutral-button();
|
||||||
|
}
|
||||||
|
button[data-testid="color-picker-apply"] {
|
||||||
|
.accent-button();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
span[data-cid="Modal"] {
|
||||||
|
label span[class$="formFieldLayout__label"] {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
fieldset[data-cid="DateTimeInput"] {
|
||||||
|
span[class$="formFieldMessage"] {
|
||||||
|
color: @green;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span[data-testid="add-widget-modal"] {
|
||||||
|
[data-testid^="widget"] {
|
||||||
|
background-color: @surface0;
|
||||||
|
border-color: @surface1;
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
div:has(> button) {
|
||||||
|
border-color: @surface1;
|
||||||
|
}
|
||||||
|
button {
|
||||||
|
.neutral-button(@surface1, @surface2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span[data-testid="loading-overlay"] > span {
|
||||||
|
background-color: fade(@base, 40%);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#content > div > div[data-widget-dashboard-dark-root] > div {
|
||||||
|
background-color: @base;
|
||||||
|
|
||||||
|
button[data-testid^="add-widget-placeholder"],
|
||||||
|
button[data-testid="customize-dashboard-button"] {
|
||||||
|
.accent-button-hollow();
|
||||||
|
}
|
||||||
|
|
||||||
|
button[data-testid="cancel-customize-button"] {
|
||||||
|
.neutral-button();
|
||||||
|
}
|
||||||
|
|
||||||
|
button[data-testid="save-customize-button"] {
|
||||||
|
.accent-button();
|
||||||
|
}
|
||||||
|
|
||||||
|
svg {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
#dashboard section {
|
||||||
|
background-color: @surface0;
|
||||||
|
|
||||||
|
[data-cid*="BaseButton"]:not([data-testid*="hide"]):not([data-testid^="color-picker"]) {
|
||||||
|
.neutral-button();
|
||||||
|
&[aria-current="page"] {
|
||||||
|
color: black;
|
||||||
|
.accent-button();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
span[title] {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
|
||||||
|
[style="all: unset;"] {
|
||||||
|
color: @text !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&[data-testid="widget-course-work-combined-widget"] {
|
||||||
|
[data-testid^="statistics-card"] {
|
||||||
|
background-color: @surface1;
|
||||||
|
}
|
||||||
|
[data-testid="statistics-card-Due"] span {
|
||||||
|
color: @blue !important;
|
||||||
|
}
|
||||||
|
[data-testid="statistics-card-Missing"] span {
|
||||||
|
color: @red !important;
|
||||||
|
}
|
||||||
|
[data-testid="statistics-card-Submitted"] span {
|
||||||
|
color: @green !important;
|
||||||
|
}
|
||||||
|
/* individual assignment cards */
|
||||||
|
li > [data-testid^="listed-course-work-item"] > div {
|
||||||
|
background-color: @surface1;
|
||||||
|
div:has(> span > svg) {
|
||||||
|
background-color: fade(@blue, 40%);
|
||||||
|
}
|
||||||
|
a > span {
|
||||||
|
color: @blue !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
span[data-testid^="due_soon-status-pill"] {
|
||||||
|
background-color: fade(@blue, 40%);
|
||||||
|
> span {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
span[data-testid^="submitted-status-pill"] {
|
||||||
|
background-color: fade(@green, 40%);
|
||||||
|
> span {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/* not sure if this is the right id because i don't have missing work... */
|
||||||
|
span[data-testid^="missing-status-pill"] {
|
||||||
|
background-color: fade(@red, 40%);
|
||||||
|
> span {
|
||||||
|
background-color: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[data-testid^="widget-todo_list"] {
|
||||||
|
div:has(> span[data-cid="Select SimpleSelect"]) {
|
||||||
|
border-color: @surface2;
|
||||||
|
}
|
||||||
|
li > div {
|
||||||
|
background-color: @surface1;
|
||||||
|
border-color: @surface2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[data-testid^="widget-inbox-widget"] {
|
||||||
|
label span[class$="formFieldLayout__label"] {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
li > div {
|
||||||
|
border-color: @surface1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[data-testid^="widget-progress_overview"] {
|
||||||
|
color: @text;
|
||||||
|
> span > div > div {
|
||||||
|
&:first-child {
|
||||||
|
/* legend for child below */
|
||||||
|
li {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
/* contains course progress */
|
||||||
|
[color="primary-inverse"] {
|
||||||
|
color: @crust;
|
||||||
|
}
|
||||||
|
> div {
|
||||||
|
/* data-testid="course-progress-item-xxxxxx" */
|
||||||
|
ul li {
|
||||||
|
color: @text;
|
||||||
|
[class$="delimiter"] {
|
||||||
|
color: @surface2;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
div[data-testid^="progress-segment-submitted"] {
|
||||||
|
background-color: @peach;
|
||||||
|
}
|
||||||
|
div[data-testid^="progress-segment-remaining"] {
|
||||||
|
background-color: @subtext1;
|
||||||
|
}
|
||||||
|
div[data-testid^="progress-segment-no-assignments"] {
|
||||||
|
background-color: @subtext1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[data-testid="widget-people-widget"] {
|
||||||
|
ul[data-cid="List"] span {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[data-testid="widget-course-grades-widget"] {
|
||||||
|
span[data-testid$="name"] {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
div[data-testid^="course-grade"] {
|
||||||
|
background-color: @surface1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&[data-testid="widget-announcements-widget"] {
|
||||||
|
[data-testid^="announcement-item"] {
|
||||||
|
border-color: @surface1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[color="primary-inverse"] {
|
||||||
|
color: @text;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.StickyButton-styles__root {
|
.StickyButton-styles__root {
|
||||||
background-color: @accent;
|
background-color: @accent;
|
||||||
span {
|
span {
|
||||||
color: @mantle;
|
color: @mantle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.NotificationBadge-styles__activityIndicator.NotificationBadge-styles__hasBadge
|
.NotificationBadge-styles__activityIndicator.NotificationBadge-styles__hasBadge [class$="badge"] {
|
||||||
[class$="badge"] {
|
|
||||||
background-color: @accent;
|
background-color: @accent;
|
||||||
}
|
}
|
||||||
.Day-styles__root {
|
.Day-styles__root {
|
||||||
@@ -1252,10 +1495,7 @@
|
|||||||
border-color: @surface1;
|
border-color: @surface1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
:is(.calendar, #calendar-drag-and-drop-container)
|
:is(.calendar, #calendar-drag-and-drop-container) .fc-row :is(.fc-content-skeleton, .fc-helper-skeleton) td {
|
||||||
.fc-row
|
|
||||||
:is(.fc-content-skeleton, .fc-helper-skeleton)
|
|
||||||
td {
|
|
||||||
border-color: @surface1;
|
border-color: @surface1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1493,11 +1733,7 @@
|
|||||||
#questions.assessment_results .question .answers .answer.wrong_answer {
|
#questions.assessment_results .question .answers .answer.wrong_answer {
|
||||||
border-color: @red;
|
border-color: @red;
|
||||||
}
|
}
|
||||||
#questions.assessment_results
|
#questions.assessment_results .question .answers .answer.wrong_answer .ui-selectmenu-status {
|
||||||
.question
|
|
||||||
.answers
|
|
||||||
.answer.wrong_answer
|
|
||||||
.ui-selectmenu-status {
|
|
||||||
color: @red;
|
color: @red;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1732,10 +1968,7 @@
|
|||||||
.tox-collection--list .tox-collection__group {
|
.tox-collection--list .tox-collection__group {
|
||||||
border-color: @surface1;
|
border-color: @surface1;
|
||||||
}
|
}
|
||||||
.tox-collection--list
|
.tox-collection--list .tox-collection__item--active:not(.tox-collection__item--state-disabled),
|
||||||
.tox-collection__item--active:not(
|
|
||||||
.tox-collection__item--state-disabled
|
|
||||||
),
|
|
||||||
.tox-collection__item--active {
|
.tox-collection__item--active {
|
||||||
background-color: mix(@accent, @base, 30%);
|
background-color: mix(@accent, @base, 30%);
|
||||||
}
|
}
|
||||||
@@ -1947,7 +2180,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* author profile picture placeholder */
|
/* author profile picture placeholder */
|
||||||
[data-testid="author_avatar"] {
|
[data-testid*="avatar"]:has(img) {
|
||||||
background-color: @surface0;
|
background-color: @surface0;
|
||||||
border-color: @overlay2;
|
border-color: @overlay2;
|
||||||
span {
|
span {
|
||||||
|
|||||||
Reference in new issue
Block a user