From 76fcbd37526a7d21242705199ff72c12bfe32360 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Sun, 26 Jul 2020 16:36:15 +0100 Subject: [PATCH] Removed default anchor CSS filtering in dark mode Due to causing content images to be rendered in unexpected ways. - Also removed CSS filters from other image usage. - Tweaked header CSS filtering to not be so aggressive. - Forced WYSIWYG editor to be on its own layer since that would allow massive larger performance increases in Safari, especially when using dark mode. Closes #2045. Closes #2154. --- resources/sass/_colors.scss | 6 ------ resources/sass/_header.scss | 2 +- resources/sass/_text.scss | 3 --- resources/sass/_tinymce.scss | 3 +++ 4 files changed, 4 insertions(+), 10 deletions(-) diff --git a/resources/sass/_colors.scss b/resources/sass/_colors.scss index a76d166e9..e01ecebc9 100644 --- a/resources/sass/_colors.scss +++ b/resources/sass/_colors.scss @@ -95,9 +95,3 @@ .bg-shelf { background-color: var(--color-bookshelf); } - -.bg-shelf, .bg-book { - @include whenDark { - filter: brightness(67%) saturate(80%); - } -} diff --git a/resources/sass/_header.scss b/resources/sass/_header.scss index 4c3f6c619..e19bb4f61 100644 --- a/resources/sass/_header.scss +++ b/resources/sass/_header.scss @@ -24,7 +24,7 @@ header { padding: $-xxs 0; @include lightDark(border-bottom-color, #DDD, #000); @include whenDark { - filter: saturate(0.6) brightness(0.8); + filter: saturate(0.8) brightness(0.8); } .links { display: inline-block; diff --git a/resources/sass/_text.scss b/resources/sass/_text.scss index 116504199..8bc2155a9 100644 --- a/resources/sass/_text.scss +++ b/resources/sass/_text.scss @@ -96,9 +96,6 @@ a { text-decoration: none; transition: filter ease-in-out 80ms; line-height: 1.6; - @include whenDark { - filter: brightness(1.3) saturate(0.7); - } &:hover { text-decoration: underline; } diff --git a/resources/sass/_tinymce.scss b/resources/sass/_tinymce.scss index 9dbecda95..dfaf6683e 100644 --- a/resources/sass/_tinymce.scss +++ b/resources/sass/_tinymce.scss @@ -51,6 +51,9 @@ overflow:auto; iframe { flex: 1; + // Force TinyMCE iframe to render on its own layer + // for much greater performance in Safari + will-change: transform; } } }