$elementColor = Util::elementColor($color);
if($color !== '') {
$responseCss .= sprintf(
- '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: %s}'."\n",
+ '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: %s}' . "\n",
$color
);
- $responseCss .= sprintf('input[type="checkbox"].checkbox:checked + label:before {' .
- 'background-image:url(\'' . \OC::$WEBROOT . '/core/img/actions/checkmark-white.svg\');' .
+ $responseCss .= sprintf('html:not(.ie):not(.edge) input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
+ 'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
'background-color: %s; background-position: center center; background-size:contain;' .
- 'width:12px; height:12px; padding:0; margin:1px 6px 7px 2px;' .
- '}' . PHP_EOL,
+ 'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
+ "}\n",
+ \OC::$WEBROOT,
+ $elementColor
+ );
+ $responseCss .= sprintf('html:not(.ie):not(.edge) input[type="radio"].radio:checked:not(.radio--white):not(:disabled) + label:before {' .
+ '-webkit-mask-image: url(\'%s/core/img/actions/radio-checked-white.svg\');' .
+ '-webkit-mask-repeat: no-repeat;' .
+ 'background-color: %s;' .
+ 'background-image: none; '.
+ "}\n",
+ \OC::$WEBROOT,
$elementColor
);
}
'#header .logo {' .
'background-image: url(\'./logo?v='.$cacheBusterValue.'\')' .
'background-size: contain;' .
- '}' . PHP_EOL .
+ '}' . "\n" .
'#header .logo-icon {' .
'background-image: url(\'./logo?v='.$cacheBusterValue.'\');' .
'background-size: contain;' .
- '}' . PHP_EOL
+ '}' . "\n"
);
}
$backgroundLogo = $this->config->getAppValue($this->appName, 'backgroundMime');
if($backgroundLogo !== '') {
- $responseCss .= '#body-login {background-image: url(\'./loginbackground?v='.$cacheBusterValue.'\');}' . PHP_EOL;
+ $responseCss .= '#body-login {background-image: url(\'./loginbackground?v='.$cacheBusterValue.'\');}' . "\n";
}
if(Util::invertTextColor($color)) {
- $responseCss .= '#header .header-appname, #expandDisplayName { color: #000000; }' . PHP_EOL;
- $responseCss .= '#header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); }' . PHP_EOL;
- $responseCss .= '.searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }' . PHP_EOL;
- $responseCss .= '.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid { color: #000; border: 1px solid rgba(0, 0, 0, .5); }' . PHP_EOL;
+ $responseCss .= '#header .header-appname, #expandDisplayName { color: #000000; }' . "\n";
+ $responseCss .= '#header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); }' . "\n";
+ $responseCss .= '.searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }' . "\n";
+ $responseCss .= '.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid { color: #000; border: 1px solid rgba(0, 0, 0, .5); }' . "\n";
}
\OC_Response::setExpiresHeader(gmdate('D, d M Y H:i:s', time() + (60*60*24*45)) . ' GMT');
->with('theming', 'backgroundMime', '')
->willReturn('');
- $expectedCss = '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #000}' . PHP_EOL .
- 'input[type="checkbox"].checkbox:checked + label:before {' .
- 'background-image:url(\'' . \OC::$WEBROOT . '/core/img/actions/checkmark-white.svg\');' .
- 'background-color: #000; background-position: center center; background-size:contain;' .
- 'width:12px; height:12px; padding:0; margin:1px 6px 7px 2px;' .
- '}' . PHP_EOL;
+ $elementColor = '#000';
+ $expectedCss = '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #000}' . "\n";
+ $expectedCss .= sprintf('html:not(.ie):not(.edge) input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
+ 'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
+ 'background-color: %s; background-position: center center; background-size:contain;' .
+ 'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
+ "}\n",
+ \OC::$WEBROOT,
+ $elementColor
+ );
+ $expectedCss .= sprintf('html:not(.ie):not(.edge) input[type="radio"].radio:checked:not(.radio--white):not(:disabled) + label:before {' .
+ '-webkit-mask-image: url(\'%s/core/img/actions/radio-checked-white.svg\');' .
+ '-webkit-mask-repeat: no-repeat;' .
+ 'background-color: %s;' .
+ 'background-image: none; '.
+ "}\n",
+ \OC::$WEBROOT,
+ $elementColor
+ );
$expected = new Http\DataDownloadResponse($expectedCss, 'style', 'text/css');
$expected->cacheFor(3600);
@$this->assertEquals($expected, $this->themingController->getStylesheet());
->method('getAppValue')
->with('theming', 'backgroundMime', '')
->willReturn('');
-
- $expectedCss = '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #fff}' . PHP_EOL .
- 'input[type="checkbox"].checkbox:checked + label:before {' .
- 'background-image:url(\'' . \OC::$WEBROOT . '/core/img/actions/checkmark-white.svg\');' .
- 'background-color: #969696; background-position: center center; background-size:contain;' .
- 'width:12px; height:12px; padding:0; margin:1px 6px 7px 2px;' .
- '}' . PHP_EOL .
- '#header .header-appname, #expandDisplayName { color: #000000; }' . PHP_EOL .
- '#header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); }' . PHP_EOL .
- '.searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }' . PHP_EOL .
- '.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid { color: #000; border: 1px solid rgba(0, 0, 0, .5); }' . PHP_EOL;
+ $elementColor = '#555555';
+ $expectedCss = '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #fff}' . "\n";
+ $expectedCss .= sprintf('html:not(.ie):not(.edge) input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
+ 'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
+ 'background-color: %s; background-position: center center; background-size:contain;' .
+ 'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
+ "}\n",
+ \OC::$WEBROOT,
+ $elementColor
+ );
+ $expectedCss .= sprintf('html:not(.ie):not(.edge) input[type="radio"].radio:checked:not(.radio--white):not(:disabled) + label:before {' .
+ '-webkit-mask-image: url(\'%s/core/img/actions/radio-checked-white.svg\');' .
+ '-webkit-mask-repeat: no-repeat;' .
+ 'background-color: %s;' .
+ 'background-image: none; '.
+ "}\n",
+ \OC::$WEBROOT,
+ $elementColor
+ );
+ $expectedCss .= '#header .header-appname, #expandDisplayName { color: #000000; }' . "\n" .
+ '#header .icon-caret { background-image: url(\'' . \OC::$WEBROOT . '/core/img/actions/caret-dark.svg\'); }' . "\n" .
+ '.searchbox input[type="search"] { background: transparent url(\'' . \OC::$WEBROOT . '/core/img/actions/search.svg\') no-repeat 6px center; color: #000; }' . "\n" .
+ '.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid { color: #000; border: 1px solid rgba(0, 0, 0, .5); }' . "\n";
$expected = new Http\DataDownloadResponse($expectedCss, 'style', 'text/css');
$expected->cacheFor(3600);
@$this->assertEquals($expected, $this->themingController->getStylesheet());
$expectedCss = '#header .logo {' .
'background-image: url(\'./logo?v=0\')' .
'background-size: contain;' .
- '}' . PHP_EOL .
+ '}' . "\n" .
'#header .logo-icon {' .
'background-image: url(\'./logo?v=0\');' .
'background-size: contain;' .
- '}' . PHP_EOL;
+ '}' . "\n";
$expected = new Http\DataDownloadResponse($expectedCss, 'style', 'text/css');
$expected->cacheFor(3600);
@$this->assertEquals($expected, $this->themingController->getStylesheet());
->with('theming', 'backgroundMime', '')
->willReturn('text/svg');
- $expectedCss = '#body-login {background-image: url(\'./loginbackground?v=0\');}' . PHP_EOL;
+ $expectedCss = '#body-login {background-image: url(\'./loginbackground?v=0\');}' . "\n";
$expected = new Http\DataDownloadResponse($expectedCss, 'style', 'text/css');
$expected->cacheFor(3600);
@$this->assertEquals($expected, $this->themingController->getStylesheet());
->with('theming', 'backgroundMime', '')
->willReturn('image/png');
- $expectedCss = '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #000}' . PHP_EOL .
- 'input[type="checkbox"].checkbox:checked + label:before {' .
- 'background-image:url(\'' . \OC::$WEBROOT . '/core/img/actions/checkmark-white.svg\');' .
- 'background-color: #000; background-position: center center; background-size:contain;' .
- 'width:12px; height:12px; padding:0; margin:1px 6px 7px 2px;' .
- '}' . PHP_EOL;
+ $elementColor = '#000';
+ $expectedCss = '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #000}' . "\n";
+ $expectedCss .= sprintf('html:not(.ie):not(.edge) input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
+ 'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
+ 'background-color: %s; background-position: center center; background-size:contain;' .
+ 'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
+ "}\n",
+ \OC::$WEBROOT,
+ $elementColor
+ );
+ $expectedCss .= sprintf('html:not(.ie):not(.edge) input[type="radio"].radio:checked:not(.radio--white):not(:disabled) + label:before {' .
+ '-webkit-mask-image: url(\'%s/core/img/actions/radio-checked-white.svg\');' .
+ '-webkit-mask-repeat: no-repeat;' .
+ 'background-color: %s;' .
+ 'background-image: none; '.
+ "}\n",
+ \OC::$WEBROOT,
+ $elementColor
+ );
$expectedCss .= '#header .logo {' .
'background-image: url(\'./logo?v=0\')' .
'background-size: contain;' .
- '}' . PHP_EOL .
+ '}' . "\n" .
'#header .logo-icon {' .
'background-image: url(\'./logo?v=0\');' .
'background-size: contain;' .
- '}' . PHP_EOL;
+ '}' . "\n";
$expectedCss .= '#body-login {background-image: url(\'./loginbackground?v=0\');}' . PHP_EOL;
$expected = new Http\DataDownloadResponse($expectedCss, 'style', 'text/css');
->with('theming', 'backgroundMime', '')
->willReturn('image/png');
-
- $expectedCss = '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #fff}' . PHP_EOL .
- 'input[type="checkbox"].checkbox:checked + label:before {' .
- 'background-image:url(\'' . \OC::$WEBROOT . '/core/img/actions/checkmark-white.svg\');' .
- 'background-color: #969696; background-position: center center; background-size:contain;' .
- 'width:12px; height:12px; padding:0; margin:1px 6px 7px 2px;' .
- '}' . PHP_EOL;
+ $elementColor = '#555555';
+ $expectedCss = '#body-user #header,#body-settings #header,#body-public #header,#body-login,.searchbox input[type="search"]:focus,.searchbox input[type="search"]:active,.searchbox input[type="search"]:valid {background-color: #fff}' . "\n";
+ $expectedCss .= sprintf('html:not(.ie):not(.edge) input[type="checkbox"].checkbox:checked:enabled:not(.checkbox--white) + label:before {' .
+ 'background-image:url(\'%s/core/img/actions/checkmark-white.svg\');' .
+ 'background-color: %s; background-position: center center; background-size:contain;' .
+ 'width:12px; height:12px; padding:0; margin:2px 6px 6px 2px; border-radius:1px;' .
+ "}\n",
+ \OC::$WEBROOT,
+ $elementColor
+ );
+ $expectedCss .= sprintf('html:not(.ie):not(.edge) input[type="radio"].radio:checked:not(.radio--white):not(:disabled) + label:before {' .
+ '-webkit-mask-image: url(\'%s/core/img/actions/radio-checked-white.svg\');' .
+ '-webkit-mask-repeat: no-repeat;' .
+ 'background-color: %s;' .
+ 'background-image: none; '.
+ "}\n",
+ \OC::$WEBROOT,
+ $elementColor
+ );
$expectedCss .= '#header .logo {' .
'background-image: url(\'./logo?v=0\')' .
'background-size: contain;' .