Skip to content

Commit

Permalink
Merge pull request #14499 from nextcloud/fix/svg-api/dark-mode
Browse files Browse the repository at this point in the history
Do not cut full color on accessibility svg color invert
  • Loading branch information
MorrisJobke authored Mar 4, 2019
2 parents 3b155c8 + 3bb2c87 commit 36b7fc7
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion apps/accessibility/lib/Controller/AccessibilityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,15 @@ private function rebaseUrls(string $css, string $webDir): string {
* @return string
*/
private function invertSvgIconsColor(string $css) {
return str_replace(['color=000', 'color=fff', 'color=***'], ['color=***', 'color=000', 'color=fff'], $css);
return str_replace(
['color=000&', 'color=fff&', 'color=***&'],
['color=***&', 'color=000&', 'color=fff&'],
str_replace(
['color=000000&', 'color=ffffff&', 'color=******&'],
['color=******&', 'color=000000&', 'color=ffffff&'],
$css
)
);
}

/**
Expand Down

0 comments on commit 36b7fc7

Please sign in to comment.