MOBILE-3752 a11y: Fix darkmode on some screens

main
Pau Ferrer Ocaña 2021-05-13 11:48:54 +02:00
parent 8542e3c279
commit 9c2a235745
6 changed files with 27 additions and 39 deletions

View File

@ -34,8 +34,6 @@ export class AddonBlockLearningPlansHandlerService extends CoreBlockBaseHandler
* @return Data or promise resolved with the data. * @return Data or promise resolved with the data.
*/ */
getDisplayData(): CoreBlockHandlerData { getDisplayData(): CoreBlockHandlerData {
// @todo
return { return {
title: 'addon.block_learningplans.pluginname', title: 'addon.block_learningplans.pluginname',
class: 'addon-block-learning-plans', class: 'addon-block-learning-plans',

View File

@ -65,7 +65,7 @@
</ion-card> </ion-card>
<ion-card *ngIf="plan"> <ion-card *ngIf="plan">
<ion-card-header class="ion-text-wrap"> <ion-card-header class="ion-text-wrap">
<h2>{{ 'addon.competency.learningplancompetencies' | translate }}</h2> <ion-card-title>{{ 'addon.competency.learningplancompetencies' | translate }}</ion-card-title>
</ion-card-header> </ion-card-header>
<ion-list> <ion-list>
<ion-item class="ion-text-wrap" *ngIf="plan.competencycount == 0"> <ion-item class="ion-text-wrap" *ngIf="plan.competencycount == 0">

View File

@ -49,8 +49,6 @@ declare module '@singletons/events' {
/** /**
* Service that provides some features for forums. * Service that provides some features for forums.
*
* @todo Add all content.
*/ */
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })
export class AddonModForumProvider { export class AddonModForumProvider {

View File

@ -23,8 +23,8 @@
<ion-card *ngIf="attempt"> <ion-card *ngIf="attempt">
<ion-card-header class="ion-text-wrap"> <ion-card-header class="ion-text-wrap">
<ion-card-title> <ion-card-title>
<span *ngIf="attempt.preview">{{ 'addon.mod_quiz.reviewofpreview' | translate }}</span> <ng-container *ngIf="attempt.preview">{{ 'addon.mod_quiz.reviewofpreview' | translate }}</ng-container>
<span *ngIf="!attempt.preview">{{ 'addon.mod_quiz.reviewofattempt' | translate:{$a: attempt.attempt} }}</span> <ng-container *ngIf="!attempt.preview">{{ 'addon.mod_quiz.reviewofattempt' | translate:{$a: attempt.attempt} }}</ng-container>
</ion-card-title> </ion-card-title>
</ion-card-header> </ion-card-header>
<ion-list lines="none"> <ion-list lines="none">

View File

@ -35,7 +35,7 @@ const routes: Routes = [
canDeactivate: [CanLeaveGuard], canDeactivate: [CanLeaveGuard],
}, },
{ {
path: ':courseId/:cmId/:submissionId/edit', // @todo path: ':courseId/:cmId/:submissionId/edit',
component: AddonModWorkshopEditSubmissionPage, component: AddonModWorkshopEditSubmissionPage,
canDeactivate: [CanLeaveGuard], canDeactivate: [CanLeaveGuard],
}, },

View File

@ -1,7 +1,18 @@
@import "~theme/globals"; @import "~theme/globals";
// @todo darkmode :host {
// @todo RTL layout --header-background: var(--white);
--odd-cell-background: var(--gray-lighter);
--even-cell-background: var(--white);
--icon-color: #999999;
}
:host-context(body.dark) {
--header-background: var(--black);
--odd-cell-background: var(--gray-darker);
--even-cell-background: var(--black);
--icon-color: #eeeeee;
}
:host-context(ion-app.md) { :host-context(ion-app.md) {
--border-color: var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, .13)))); --border-color: var(--ion-item-border-color, var(--ion-border-color, var(--ion-color-step-150, rgba(0, 0, 0, .13))));
@ -18,16 +29,12 @@
font-size: 16px; font-size: 16px;
color: var(--ion-text-color); color: var(--ion-text-color);
// @include darkmode() {
// color: $core-dark-text-color;
// }
tr { tr {
border-bottom: 1px solid var(--border-color); border-bottom: 1px solid var(--border-color);
} }
th, td { th, td {
padding: 10px 0 10px 10px; @include padding(10px, 10px, 10px, null);
vertical-align: top; vertical-align: top;
white-space: normal; white-space: normal;
text-align: start; text-align: start;
@ -36,11 +43,7 @@
thead th { thead th {
vertical-align: bottom; vertical-align: bottom;
font-weight: bold; font-weight: bold;
background-color: var(--white); background-color: var(--header-background);
// @include darkmode() {
// background-color: $black;
// }
} }
tbody th { tbody th {
@ -48,15 +51,15 @@
} }
#gradeitem { #gradeitem {
padding-left: 5px; @include padding(null, null, null, 5px);
} }
.core-grades-table-gradeitem { .core-grades-table-gradeitem {
padding-left: 5px; @include padding(null, null, null, 5px);
font-weight: bold; font-weight: bold;
&.column-itemname { &.column-itemname {
padding-left: 0; @include padding(null, null, null, 0);
} }
img { img {
@ -65,17 +68,17 @@
} }
ion-icon { ion-icon {
color: #999999; color: var(--icon-color);
} }
span { span {
margin-left: 5px; @include margin(null, null, null, 5px);
} }
} }
.core-grades-table-feedback { .core-grades-table-feedback {
padding-left: 5px; @include padding(null, null, null, 5px);
.no-overflow { .no-overflow {
overflow: auto; overflow: auto;
@ -89,27 +92,16 @@
} }
.odd { .odd {
td, th, th[aria-current="page"] { td, th, th[aria-current="page"] {
background-color: var(--gray-lighter); background-color: var(--odd-cell-background);
// @include darkmode() {
// background-color: $gray-darker;
// }
} }
} }
.even { .even {
td, th, th[aria-current="page"] { td, th, th[aria-current="page"] {
background-color: var(--white); background-color: var(--even-cell-background);
// @include darkmode() {
// background-color: $black;
// }
} }
} }
.core-grades-grade-clickable { .core-grades-grade-clickable {