aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-07-04 11:19:45 +0200
committerJulius Härtl <jus@bitgrid.net>2018-07-19 08:16:58 +0200
commita24cad1a1cdce76ae77af889181f20f6eb38b0c9 (patch)
tree56f14f822c22129241c1a3d26926eadbb378d51f
parent9e5885963c5dc09c20183732f0f94ca01598530e (diff)
downloadnextcloud-server-a24cad1a1cdce76ae77af889181f20f6eb38b0c9.tar.gz
nextcloud-server-a24cad1a1cdce76ae77af889181f20f6eb38b0c9.zip
Fix accessibility invert
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
-rw-r--r--apps/accessibility/css/themedark.scss2
-rw-r--r--apps/accessibility/lib/Controller/AccessibilityController.php2
-rw-r--r--apps/files/css/files.scss14
-rw-r--r--apps/systemtags/css/systemtagsfilelist.scss (renamed from apps/systemtags/css/systemtagsfilelist.css)2
-rw-r--r--core/css/apps.scss2
-rw-r--r--lib/private/Template/IconsCacher.php4
-rw-r--r--lib/private/legacy/util.php11
7 files changed, 22 insertions, 15 deletions
diff --git a/apps/accessibility/css/themedark.scss b/apps/accessibility/css/themedark.scss
index ecde4ec4c8a..fc33b333ce9 100644
--- a/apps/accessibility/css/themedark.scss
+++ b/apps/accessibility/css/themedark.scss
@@ -45,7 +45,7 @@ $color-border-dark: lighten($color-main-background, 14%);
}
// since svg icons are inverted, revert to white for the header
-#header-right > * {
+.header-right > * {
[class^='icon-'], [class*=' icon-'] {
filter: invert(100%);
}
diff --git a/apps/accessibility/lib/Controller/AccessibilityController.php b/apps/accessibility/lib/Controller/AccessibilityController.php
index 3ef305511e0..fa82f17e9d4 100644
--- a/apps/accessibility/lib/Controller/AccessibilityController.php
+++ b/apps/accessibility/lib/Controller/AccessibilityController.php
@@ -218,6 +218,6 @@ class AccessibilityController extends Controller {
* @return string
*/
private function invertSvgIconsColor(string $css) {
- return str_replace(['/000', '/fff'], ['/fff', '/000'], $css);
+ return str_replace(['/000', '/fff', '/***'], ['/***', '/000', '/fff'], $css);
}
}
diff --git a/apps/files/css/files.scss b/apps/files/css/files.scss
index 6dcdec0711c..36ccd6cd258 100644
--- a/apps/files/css/files.scss
+++ b/apps/files/css/files.scss
@@ -84,26 +84,26 @@
/* icons for sidebar */
.nav-icon-files {
- @include icon-color(folder, 'files', $color-black);
+ @include icon-color('folder', 'files', $color-black);
}
.nav-icon-recent {
- @include icon-color(recent, 'files', $color-black);
+ @include icon-color('recent', 'files', $color-black);
}
.nav-icon-favorites {
- @include icon-color(star, 'files', $color-black);
+ @include icon-color('star-dark', 'files', $color-black);
}
.nav-icon-sharingin,
.nav-icon-sharingout {
- @include icon-color(share, 'files', $color-black);
+ @include icon-color('share', 'files', $color-black);
}
.nav-icon-sharinglinks {
- @include icon-color(public, 'files', $color-black);
+ @include icon-color('public', 'files', $color-black);
}
.nav-icon-extstoragemounts {
- @include icon-color(external, 'files', $color-black);
+ @include icon-color('external', 'files', $color-black);
}
.nav-icon-trashbin {
- @include icon-color(delete, 'files', $color-black);
+ @include icon-color('delete', 'files', $color-black);
}
.nav-icon-deletedshares {
background-image: url('../img/unshare.svg?v=1');
diff --git a/apps/systemtags/css/systemtagsfilelist.css b/apps/systemtags/css/systemtagsfilelist.scss
index ad711f74733..3c188e76449 100644
--- a/apps/systemtags/css/systemtagsfilelist.css
+++ b/apps/systemtags/css/systemtagsfilelist.scss
@@ -13,7 +13,7 @@
}
.nav-icon-systemtagsfilter {
- background-image: url('../img/tag.svg');
+ @include icon-color('tag', 'systemtags', $color-black);
}
#app-sidebar .mainFileInfoView .tag-label {
diff --git a/core/css/apps.scss b/core/css/apps.scss
index 6645b6868d5..4ca34ff9897 100644
--- a/core/css/apps.scss
+++ b/core/css/apps.scss
@@ -693,7 +693,7 @@ kbd {
padding: 0;
margin: 0;
background-color: var(--color-main-background);
- background-image: url('../img/actions/settings-dark.svg?v=1');
+ @include icon-color('settings-dark', 'actions', $color-black, true);
background-position: 14px center;
background-repeat: no-repeat;
box-shadow: none;
diff --git a/lib/private/Template/IconsCacher.php b/lib/private/Template/IconsCacher.php
index 79c4b9d8ec0..c4d073156f1 100644
--- a/lib/private/Template/IconsCacher.php
+++ b/lib/private/Template/IconsCacher.php
@@ -45,7 +45,7 @@ class IconsCacher {
protected $urlGenerator;
/** @var string */
- private $iconVarRE = '/--([a-z0-9-]+): url\(["\']([a-z0-9-\/]+)[^;]+;/m';
+ private $iconVarRE = '/--(icon-[a-z0-9-]+): url\(["\']([a-z0-9-\/]+)[^;]+;/m';
/** @var string */
private $fileName = 'icons-vars.css';
@@ -140,7 +140,7 @@ class IconsCacher {
}
}
$linkToCSS = substr($this->urlGenerator->linkToRoute('core.Css.getCss', ['appName' => 'icons', 'fileName' => $this->fileName]), strlen(\OC::$WEBROOT));
- \OCP\Util::addHeader('link', ['rel' => 'stylesheet', 'href' => $linkToCSS]);
+ \OC_Util::addHeader('link', ['rel' => 'stylesheet', 'href' => $linkToCSS], null, true);
}
} \ No newline at end of file
diff --git a/lib/private/legacy/util.php b/lib/private/legacy/util.php
index ab595d885cb..5e9a46d44a9 100644
--- a/lib/private/legacy/util.php
+++ b/lib/private/legacy/util.php
@@ -687,13 +687,20 @@ class OC_Util {
* @param string $tag tag name of the element
* @param array $attributes array of attributes for the element
* @param string $text the text content for the element
+ * @param bool $prepend prepend the header to the beginning of the list
*/
- public static function addHeader($tag, $attributes, $text=null) {
- self::$headers[] = array(
+ public static function addHeader($tag, $attributes, $text = null, $prepend = false) {
+ $header = array(
'tag' => $tag,
'attributes' => $attributes,
'text' => $text
);
+ if ($prepend === true) {
+ array_unshift (self::$headers, $header);
+
+ } else {
+ self::$headers[] = $header;
+ }
}
/**