Skip to content

Commit

Permalink
Merge pull request #268 from nextmcloud/nmc/dark-mode-icon-fix
Browse files Browse the repository at this point in the history
adjusted icon color inversion
  • Loading branch information
aleksei-nmc authored Jan 9, 2024
2 parents 277fb7d + 3df7151 commit 6bc980d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions css/apps/files.scss
Original file line number Diff line number Diff line change
Expand Up @@ -398,8 +398,8 @@ table.files-filestable {
width: 44px;

.favorite-mark {
bottom: -2px;
right: -8px;
bottom: -6px;
right: -12px;
top: unset;

.icon {
Expand Down
4 changes: 4 additions & 0 deletions css/nmcdefault.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
4 changes: 0 additions & 4 deletions css/v25/ncappnavigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/icons.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 6bc980d

Please sign in to comment.