From a978d16e736271444d5618084fbbf3feeeb2ed3a Mon Sep 17 00:00:00 2001 From: Bowen Li Date: Thu, 10 Nov 2016 09:53:19 -0800 Subject: [PATCH] increase black/white text contrast in contrast mode --- client/app/styles/contrast.less | 8 ++++++-- client/app/styles/main.less | 10 +++++++--- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/client/app/styles/contrast.less b/client/app/styles/contrast.less index 2e3575acd..d4ba24922 100644 --- a/client/app/styles/contrast.less +++ b/client/app/styles/contrast.less @@ -5,12 +5,12 @@ @background-darker-color: darken(@background-color, 20%); @background-darker-secondary-color: darken(@background-color, 15%); @background-dark-color: @primary-color; -@text-color: darken(@primary-color, 20%); +@text-color: black; @text-secondary-color: lighten(@text-color, 10%); @text-tertiary-color: lighten(@text-color, 20%); @border-light-color: lighten(@text-color, 50%); @text-darker-color: darken(@text-color, 20%); -@white: @background-lighter-color; +@white: white; @node-opacity-blurred: 0.6; @node-highlight-fill-opacity: 0.3; @@ -31,3 +31,7 @@ @search-border-color: @background-darker-color; @search-border-width: 2px; + +/* specific elements */ +@body-background-color: #FFF; +@label-background-color: #FFF; \ No newline at end of file diff --git a/client/app/styles/main.less b/client/app/styles/main.less index bd78082a4..cc8283168 100644 --- a/client/app/styles/main.less +++ b/client/app/styles/main.less @@ -64,6 +64,10 @@ @search-border-color: transparent; @search-border-width: 1px; +/* specific elements */ +@body-background-color: linear-gradient(30deg, @background-color 0%, @background-lighter-color 100%); +@label-background-color: fade(@background-average-color, 70%); + /* add this class to truncate text with ellipsis, container needs width */ .truncate { white-space: nowrap; @@ -131,7 +135,7 @@ body { /* Space out content a bit */ body { - background: linear-gradient(30deg, @background-color 0%, @background-lighter-color 100%); + background: @body-background-color; color: @text-color; line-height: 150%; font-family: @base-font; @@ -404,14 +408,14 @@ h2 { } span:not(.match) { padding: 0 0.25em; - background-color: fade(@background-average-color, 70%); + background-color: @label-background-color; } span:empty { padding: 0; } } .matched-results { - background-color: fade(@background-average-color, 70%); + background-color: @label-background-color; } &.pseudo {