From 096ed722dd4cc554fd87943b063c8b61f6e0dac6 Mon Sep 17 00:00:00 2001 From: Dan Brown Date: Tue, 23 Nov 2021 15:48:55 +0000 Subject: [PATCH] Added use of the prefers-contrast media query Used upon areas we usually fade-out to provide a focused user experience. If the user desires more contrasted we prevent this behaviour using the prefers-contrast media query. Related to #2634 --- resources/sass/_blocks.scss | 3 +++ resources/sass/_header.scss | 3 +++ resources/sass/_layout.scss | 3 +++ resources/sass/_pages.scss | 3 +++ 4 files changed, 12 insertions(+) diff --git a/resources/sass/_blocks.scss b/resources/sass/_blocks.scss index ae3e7a441..b7aea7452 100644 --- a/resources/sass/_blocks.scss +++ b/resources/sass/_blocks.scss @@ -229,6 +229,9 @@ &:hover, &:focus-within { opacity: 1; } + @media (prefers-contrast: more) { + opacity: 1; + } } /** diff --git a/resources/sass/_header.scss b/resources/sass/_header.scss index 1a7015078..f070f5a18 100644 --- a/resources/sass/_header.scss +++ b/resources/sass/_header.scss @@ -262,6 +262,9 @@ header .search-box { &:hover, &:focus-within { opacity: 1; } + @media (prefers-contrast: more) { + opacity: 1; + } } @include smaller-than($l) { diff --git a/resources/sass/_layout.scss b/resources/sass/_layout.scss index 362bab7d3..783ccc8f9 100644 --- a/resources/sass/_layout.scss +++ b/resources/sass/_layout.scss @@ -369,6 +369,9 @@ body.flexbox { &:focus-within { opacity: 1; } + @media (prefers-contrast: more) { + opacity: 1; + } } } diff --git a/resources/sass/_pages.scss b/resources/sass/_pages.scss index 4f249244b..14c253679 100755 --- a/resources/sass/_pages.scss +++ b/resources/sass/_pages.scss @@ -412,4 +412,7 @@ body.mce-fullscreen, body.markdown-fullscreen { text-decoration: none; opacity: 1; } + @media (prefers-contrast: more) { + opacity: 1; + } } \ No newline at end of file