Fix green/red accessibility

This commit is contained in:
Chocobozzz 2024-09-19 10:53:03 +02:00
parent 55d5c0aa7c
commit 75d8dc3939
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
11 changed files with 33 additions and 32 deletions

View File

@ -3,10 +3,6 @@
@use '_mixins' as *; @use '_mixins' as *;
@use 'bootstrap/scss/functions' as *; @use 'bootstrap/scss/functions' as *;
tr.banned > td {
background-color: color.adjust($color: $red, $lightness: 40%) !important;
}
.banned-info { .banned-info {
font-style: italic; font-style: italic;
} }

View File

@ -37,7 +37,7 @@
} }
.error { .error {
color: $red; color: pvar(--red);
} }
pre { pre {

View File

@ -11,6 +11,6 @@
} }
.warning-replace-caption { .warning-replace-caption {
color: $red; color: pvar(--red);
margin-top: 10px; margin-top: 10px;
} }

View File

@ -184,17 +184,16 @@
@if (videoCaption.action) { @if (videoCaption.action) {
<span class="caption-entry-label">{{ getCaptionLabel(videoCaption) }}</span> <span class="caption-entry-label">{{ getCaptionLabel(videoCaption) }}</span>
<div i18n class="caption-entry-state caption-entry-state-create"> @switch (videoCaption.action) {
@switch (videoCaption.action) { @case ('CREATE') {
@case ('CREATE') { <div i18n class="caption-entry-state green">Will be created on update</div>
Will be created on update } @case ('UPDATE') {
} @case ('UPDATE') { <div i18n class="caption-entry-state green">Will be edited on update</div>
Will be edited on update Will be edited on update
} @case ('REMOVE') { } @case ('REMOVE') {
Will be deleted on update <div i18n class="caption-entry-state red">Will be deleted on update</div>
}
} }
</div> }
@if (videoCaption.action === 'CREATE' || videoCaption.action === 'UPDATE') { @if (videoCaption.action === 'CREATE' || videoCaption.action === 'UPDATE') {
<my-edit-button class="me-2" i18n-label label="Edit" (click)="openEditCaptionModal(videoCaption)"></my-edit-button> <my-edit-button class="me-2" i18n-label label="Edit" (click)="openEditCaptionModal(videoCaption)"></my-edit-button>
@ -203,7 +202,7 @@
<my-button i18n (click)="deleteCaption(videoCaption)" icon="undo"> <my-button i18n (click)="deleteCaption(videoCaption)" icon="undo">
@switch (videoCaption.action) { @switch (videoCaption.action) {
@case ('CREATE') { @case ('CREATE') {
Cancel create Cancel creation
} @case ('UPDATE') { } @case ('UPDATE') {
Cancel edition Cancel edition
} @case ('REMOVE') { } @case ('REMOVE') {

View File

@ -56,14 +56,6 @@ my-timestamp-input {
min-width: 250px; min-width: 250px;
@include margin-right(15px); @include margin-right(15px);
&.caption-entry-state-create {
color: $green;
}
&.caption-entry-state-delete {
color: $red;
}
} }
} }

View File

@ -2,9 +2,9 @@
@use '_mixins' as *; @use '_mixins' as *;
my-global-icon[iconName=tick] { my-global-icon[iconName=tick] {
color: $green; color: pvar(--green);
} }
my-global-icon[iconName=cross] { my-global-icon[iconName=cross] {
color: $red; color: pvar(--red);
} }

View File

@ -12,7 +12,7 @@
@include progressbar($height: 30px, $font-size: 14px, $background-color: rgba(11, 204, 41, 0.16)); @include progressbar($height: 30px, $font-size: 14px, $background-color: rgba(11, 204, 41, 0.16));
.progress-bar { .progress-bar {
background-color: $green; background-color: pvar(--green);
line-height: 30px; line-height: 30px;
text-align: start; text-align: start;
font-weight: $font-semibold; font-weight: $font-semibold;

View File

@ -22,6 +22,9 @@ body {
/*** theme ***/ /*** theme ***/
// now beware sass requires interpolation // now beware sass requires interpolation
// for css custom properties #{$var} // for css custom properties #{$var}
--red: #{$red};
--green: #{$green};
--mainColor: #{$main-color}; --mainColor: #{$main-color};
--mainColorLighter: #{$main-color-lighter}; --mainColorLighter: #{$main-color-lighter};
--mainColorLightest: #{$main-color-lightest}; --mainColorLightest: #{$main-color-lightest};

View File

@ -11,7 +11,7 @@
+.nav-preview, +.nav-preview,
// Markdown textarea // Markdown textarea
+*+.tab-content { +*+.tab-content {
border-color: $red !important; border-color: pvar(--red) !important;
} }
} }
@ -27,7 +27,7 @@
} }
.form-error { .form-error {
color: $red; color: pvar(--red);
} }
// Disable red error on input focus // Disable red error on input focus

View File

@ -4,6 +4,14 @@
@use '_variables' as *; @use '_variables' as *;
@use '_mixins' as *; @use '_mixins' as *;
.red {
color: pvar(--red);
}
.green {
color: pvar(--green);
}
.link-orange { .link-orange {
color: pvar(--mainForegroundColor); color: pvar(--mainForegroundColor);
font-weight: $font-semibold; font-weight: $font-semibold;

View File

@ -31,8 +31,8 @@ $support-button-heart: #e83e8c;
$bg-color: #fff; $bg-color: #fff;
$fg-color: #212529; $fg-color: #212529;
$red: #FF0000; $red: #EE0700;
$green: #38AB0B; $green: #338809;
$expanded-horizontal-margins: 150px; $expanded-horizontal-margins: 150px;
$not-expanded-horizontal-margins: 30px; $not-expanded-horizontal-margins: 30px;
@ -106,6 +106,9 @@ $primeng-breakpoint: 960px;
// pass variables into a sass map, // pass variables into a sass map,
// to be warned of non-existing variables // to be warned of non-existing variables
$variables: ( $variables: (
--red: var(--red),
--green: var(--green),
--mainColor: var(--mainColor), --mainColor: var(--mainColor),
--mainColorLighter: var(--mainColorLighter), --mainColorLighter: var(--mainColorLighter),
--mainColorLightest: var(--mainColorLightest), --mainColorLightest: var(--mainColorLightest),