Tweaked entity color palette for accessibility

Also converted entity colors to CSS variables for easier
instance customization.

Related to #1320
This commit is contained in:
Dan Brown 2019-08-26 14:37:53 +01:00
parent 64abe10dc4
commit 5979f6667b
No known key found for this signature in database
GPG Key ID: 46D9F943C24A2EF9
6 changed files with 44 additions and 41 deletions

View File

@ -168,11 +168,6 @@
} }
} }
.bookshelf-grid-item .grid-card-content h2 a {
color: $color-bookshelf;
fill: $color-bookshelf;
}
.book-grid-item .grid-card-footer { .book-grid-item .grid-card-footer {
p.small { p.small {
font-size: .8em; font-size: .8em;

View File

@ -44,24 +44,24 @@
* Entity text colors * Entity text colors
*/ */
.text-bookshelf, .text-bookshelf:hover { .text-bookshelf, .text-bookshelf:hover {
color: $color-bookshelf; color: var(--color-bookshelf);
fill: $color-bookshelf; fill: var(--color-bookshelf);
} }
.text-book, .text-book:hover { .text-book, .text-book:hover {
color: $color-book; color: var(--color-book);
fill: $color-book; fill: var(--color-book);
} }
.text-page, .text-page:hover { .text-page, .text-page:hover {
color: $color-page; color: var(--color-page);
fill: $color-page; fill: var(--color-page);
} }
.text-page.draft, .text-page.draft:hover { .text-page.draft, .text-page.draft:hover {
color: $color-page-draft; color: var(--color-page-draft);
fill: $color-page-draft; fill: var(--color-page-draft);
} }
.text-chapter, .text-chapter:hover { .text-chapter, .text-chapter:hover {
color: $color-chapter; color: var(--color-chapter);
fill: $color-chapter; fill: var(--color-chapter);
} }
/* /*
@ -71,11 +71,11 @@
background-color: #FFFFFF; background-color: #FFFFFF;
} }
.bg-book { .bg-book {
background-color: $color-book; background-color: var(--color-book);
} }
.bg-chapter { .bg-chapter {
background-color: $color-chapter; background-color: var(--color-chapter);
} }
.bg-shelf { .bg-shelf {
background-color: $color-bookshelf; background-color: var(--color-bookshelf);
} }

View File

@ -232,9 +232,20 @@
} }
.sort-box { .sort-box {
margin-bottom: $-m; margin-bottom: $-m;
border: 2px solid rgba($color-book, 0.6);
padding: $-m $-xl; padding: $-m $-xl;
border-radius: 4px; position: relative;
&::before {
content: '';
border-radius: 4px;
opacity: 0.5;
border: 2px solid var(--color-book);
display: block;
top: 0;
bottom: 0;
left: 0;
right: 0;
position: absolute;
}
} }
.sort-box-options { .sort-box-options {
display: flex; display: flex;
@ -266,12 +277,9 @@
border: 1px solid #DDD; border: 1px solid #DDD;
margin-top: -1px; margin-top: -1px;
min-height: 38px; min-height: 38px;
&.text-chapter { }
border-left: 2px solid $color-chapter; li.text-page, li.text-chapter {
} border-left: 2px solid currentColor;
&.text-page {
border-left: 2px solid $color-page;
}
} }
li:first-child { li:first-child {
margin-top: $-xs; margin-top: $-xs;
@ -361,8 +369,8 @@ ul.pagination {
margin-top: 0; margin-top: 0;
} }
.page.draft .text-page { .page.draft .text-page {
color: $color-page-draft; color: var(--color-page-draft);
fill: $color-page-draft; fill: var(--color-page-draft);
} }
> .dropdown-container { > .dropdown-container {
display: block; display: block;

View File

@ -42,21 +42,21 @@ $fs-s: 12px;
// Colours // Colours
:root { :root {
--color-primary: '#206ea7'; --color-primary: #206ea7;
--color-primary-light: 'rgba(32,110,167,0.15)'; --color-primary-light: rgba(32,110,167,0.15);
--color-page: #206ea7;
--color-page-draft: #7e50b1;
--color-chapter: #af4d0d;
--color-book: #077b70;
--color-bookshelf: #a94747;
} }
$positive: #0f7d15; $positive: #0f7d15;
$negative: #ab0f0e; $negative: #ab0f0e;
$info: #0288D1; $info: #0288D1;
$warning: #cf4d03; $warning: #cf4d03;
// Item Colors
$color-bookshelf: #af5a5a;
$color-book: #009688;
$color-chapter: #d7804a;
$color-page: #206ea7;
$color-page-draft: #9A60DA;
// Text colours // Text colours
$text-dark: #444; $text-dark: #444;
$text-light: #EEE; $text-light: #EEE;

View File

@ -75,17 +75,17 @@ $loadingSize: 10px;
animation-iteration-count: infinite; animation-iteration-count: infinite;
animation-timing-function: cubic-bezier(.62, .28, .23, .99); animation-timing-function: cubic-bezier(.62, .28, .23, .99);
margin-right: 4px; margin-right: 4px;
background-color: $color-page; background-color: var(--color-page);
animation-delay: 0.3s; animation-delay: 0.3s;
} }
> div:first-child { > div:first-child {
left: -($loadingSize+$-xs); left: -($loadingSize+$-xs);
background-color: $color-book; background-color: var(--color-book);
animation-delay: 0s; animation-delay: 0s;
} }
> div:last-of-type { > div:last-of-type {
left: $loadingSize+$-xs; left: $loadingSize+$-xs;
background-color: $color-chapter; background-color: var(--color-chapter);
animation-delay: 0.6s; animation-delay: 0.6s;
} }
> span { > span {

View File

@ -1,4 +1,4 @@
<div dropdown class="dropdown-container" > <div dropdown class="dropdown-container" id="export-menu">
<div dropdown-toggle class="icon-list-item" <div dropdown-toggle class="icon-list-item"
aria-haspopup="true" aria-expanded="false" aria-label="{{ trans('entities.export') }}" tabindex="0"> aria-haspopup="true" aria-expanded="false" aria-label="{{ trans('entities.export') }}" tabindex="0">
<span>@icon('export')</span> <span>@icon('export')</span>