From 2fb4705f29e5676e8b5d760819d412ff19f4ef76 Mon Sep 17 00:00:00 2001 From: alistair3149 Date: Fri, 12 Jun 2020 14:04:35 -0400 Subject: [PATCH] Move pagelinks dark mode styles to pagelinks --- resources/skins.citizen.styles/Pagelinks.less | 17 +++++++++++++++++ .../skins.citizen.styles/common/darkmode.less | 12 +----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/resources/skins.citizen.styles/Pagelinks.less b/resources/skins.citizen.styles/Pagelinks.less index d68d5444..6ff279ba 100644 --- a/resources/skins.citizen.styles/Pagelinks.less +++ b/resources/skins.citizen.styles/Pagelinks.less @@ -57,3 +57,20 @@ margin: 0~'calc((100vw - @{page-width}) / -2)'; } } + +@media ( prefers-color-scheme: dark ) { + #p-namespaces { + ul li a { + background-color: @dark-bg-10; + border-color: @dark-bg-20; + + &:hover { + background-color: @dark-bg-20; + } + + &:after { + filter: invert( 1 ); + } + } + } +} diff --git a/resources/skins.citizen.styles/common/darkmode.less b/resources/skins.citizen.styles/common/darkmode.less index 02823259..e95a2be0 100644 --- a/resources/skins.citizen.styles/common/darkmode.less +++ b/resources/skins.citizen.styles/common/darkmode.less @@ -47,15 +47,6 @@ color: @dark-color-link-new !important; } - #p-namespaces ul li a { - background-color: @dark-bg-10; - border-color: @dark-bg-20; - - &:hover { - background-color: @dark-bg-20; - } - } - .mw-body .firstHeading, .mw-body-content h1, .mw-body-content h2, @@ -72,8 +63,7 @@ color: @dark-text-80 !important; } - .mw-editsection > a:before, - #p-namespaces ul li a:after { + .mw-editsection > a:before { filter: invert( 1 ); } }