From f7124fdc6cec57b8b0ed794f51968c68e187f087 Mon Sep 17 00:00:00 2001 From: Jon Robson Date: Tue, 27 Feb 2024 11:27:59 -0700 Subject: [PATCH] Separate image inversion from widget inversion For images only the filter is needed, not the entire widget Bug: T356822 Change-Id: Id0ace19d4071a987d132224612724259ed40aa1b --- minerva.less/minerva.mixins.less | 2 +- resources/skins.minerva.base.styles/CSSCustomProperties.less | 1 + resources/skins.minerva.base.styles/footer.less | 4 ++-- resources/skins.minerva.base.styles/header.less | 4 ++-- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/minerva.less/minerva.mixins.less b/minerva.less/minerva.mixins.less index a0e85a020..a97f323dd 100644 --- a/minerva.less/minerva.mixins.less +++ b/minerva.less/minerva.mixins.less @@ -75,6 +75,6 @@ line-height: 1.4; } -.night-mode-invert() { +.night-mode-invert-image() { filter: invert( 1 ) hue-rotate( 180deg ); } diff --git a/resources/skins.minerva.base.styles/CSSCustomProperties.less b/resources/skins.minerva.base.styles/CSSCustomProperties.less index 10d6cd622..ac7625cbf 100644 --- a/resources/skins.minerva.base.styles/CSSCustomProperties.less +++ b/resources/skins.minerva.base.styles/CSSCustomProperties.less @@ -103,6 +103,7 @@ .night-mode-invert() { color-scheme: light; .light-mode-palette(); + // Keep in sync with .night-mode-invert-image() mixin. filter: invert( 1 ) hue-rotate( 180deg ); } diff --git a/resources/skins.minerva.base.styles/footer.less b/resources/skins.minerva.base.styles/footer.less index 18a1f1985..356bc6d31 100644 --- a/resources/skins.minerva.base.styles/footer.less +++ b/resources/skins.minerva.base.styles/footer.less @@ -58,14 +58,14 @@ // Night mode html.skin-night-mode-clientpref-1 { .minerva-footer-logo img { - .night-mode-invert(); + .night-mode-invert-image(); } } @media ( prefers-color-scheme: dark ) { html.skin-night-mode-clientpref-2 { .minerva-footer-logo img { - .night-mode-invert(); + .night-mode-invert-image(); } } } diff --git a/resources/skins.minerva.base.styles/header.less b/resources/skins.minerva.base.styles/header.less index b253be194..8f097efad 100644 --- a/resources/skins.minerva.base.styles/header.less +++ b/resources/skins.minerva.base.styles/header.less @@ -76,14 +76,14 @@ // Night mode html.skin-night-mode-clientpref-1 { .branding-box img { - .night-mode-invert(); + .night-mode-invert-image(); } } @media ( prefers-color-scheme: dark ) { html.skin-night-mode-clientpref-2 { .branding-box img { - .night-mode-invert(); + .night-mode-invert-image(); } } }