Fix accessibility invert
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
9e5885963c
commit
a24cad1a1c
|
@ -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%);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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');
|
||||
|
|
|
@ -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 {
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue