From 3df71518d478ab9643b5e13da2be702f60439f51 Mon Sep 17 00:00:00 2001 From: Mauro Mura Date: Tue, 9 Jan 2024 15:48:47 +0100 Subject: [PATCH] adjusted icon color inversion --- css/apps/files.scss | 4 ++-- css/nmcdefault.scss | 4 ++++ css/v25/ncappnavigation.scss | 4 ---- src/icons.mjs | 1 + 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/css/apps/files.scss b/css/apps/files.scss index bdb74eb2..842eeda7 100644 --- a/css/apps/files.scss +++ b/css/apps/files.scss @@ -398,8 +398,8 @@ table.files-filestable { width: 44px; .favorite-mark { - bottom: -2px; - right: -8px; + bottom: -6px; + right: -12px; top: unset; .icon { diff --git a/css/nmcdefault.scss b/css/nmcdefault.scss index 45c2d12a..1c1a1956 100644 --- a/css/nmcdefault.scss +++ b/css/nmcdefault.scss @@ -121,4 +121,8 @@ --nmc-color-row-hover: #242426; --nmc-color-row-selected: #48484b; --nmc-color-icon: brightness(0) saturate(100%) invert(17%) sepia(87%) saturate(5418%) hue-rotate(319deg) brightness(85%) contrast(110%); + + --background-invert-if-dark: invert(100%); + --background-invert-if-bright: none; + --background-image-invert-if-bright: none; } \ No newline at end of file diff --git a/css/v25/ncappnavigation.scss b/css/v25/ncappnavigation.scss index 222133b7..5d869cb1 100644 --- a/css/v25/ncappnavigation.scss +++ b/css/v25/ncappnavigation.scss @@ -46,10 +46,6 @@ width: 24px; height: 24px; filter: var(--background-invert-if-dark); - - @media (prefers-color-scheme: dark) { - filter: var(--background-invert-if-bright); - } } } } diff --git a/src/icons.mjs b/src/icons.mjs index 880161f6..0db5e2f8 100644 --- a/src/icons.mjs +++ b/src/icons.mjs @@ -36,6 +36,7 @@ const colorSvg = function(svg = '', color = '000') { // replace any fill or stroke colors svg = svg.replace(/stroke="#([a-z0-9]{3,6})"/gmi, 'stroke="#' + color + '"') svg = svg.replace(/fill="#([a-z0-9]{3,6})"/gmi, 'fill="#' + color + '"') + svg = svg.replace(/fill:#([a-z0-9]{3,6})/gmi, 'fill:#' + color) return svg }