mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #10924 from nextcloud/bugfix/10901/theming-bugfix-primary
Fix SCSS variable management with the theming app
This commit is contained in:
commit
25857c4900
7 changed files with 13 additions and 8 deletions
|
|
@ -149,8 +149,8 @@ class AccessibilityController extends Controller {
|
|||
try {
|
||||
$css .= $scss->compile(
|
||||
$imports .
|
||||
'@import "variables.scss";' .
|
||||
$this->getInjectedVariables() .
|
||||
'@import "variables.scss";' .
|
||||
'@import "css-variables.scss";'
|
||||
);
|
||||
} catch (ParserException $e) {
|
||||
|
|
|
|||
|
|
@ -71,6 +71,11 @@
|
|||
@include icon-color('checkbox-mark', 'actions', $color-white, 1, true);
|
||||
}
|
||||
}
|
||||
#body-user {
|
||||
.primary {
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
}
|
||||
} @else {
|
||||
#appmenu:not(.inverted) svg {
|
||||
filter: none;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ class Util {
|
|||
public function elementColor($color) {
|
||||
$l = $this->calculateLuminance($color);
|
||||
if($l>0.8) {
|
||||
return '#555555';
|
||||
return '#dddddd';
|
||||
}
|
||||
return $color;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ class CapabilitiesTest extends TestCase {
|
|||
'slogan' => 'slogan',
|
||||
'color' => '#FFFFFF',
|
||||
'color-text' => '#000000',
|
||||
'color-element' => '#555555',
|
||||
'color-element' => '#dddddd',
|
||||
'logo' => 'http://absolute/logo',
|
||||
'background' => 'http://absolute/background',
|
||||
'background-plain' => false,
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ class UtilTest extends TestCase {
|
|||
|
||||
public function testElementColorOnBrightBackground() {
|
||||
$elementColor = $this->util->elementColor('#ffffff');
|
||||
$this->assertEquals('#555555', $elementColor);
|
||||
$this->assertEquals('#dddddd', $elementColor);
|
||||
}
|
||||
|
||||
public function testGenerateRadioButtonWhite() {
|
||||
|
|
|
|||
|
|
@ -38,8 +38,8 @@ $color-main-background: #fff !default;
|
|||
$color-background-dark: nc-darken($color-main-background, 7%) !default;
|
||||
$color-background-darker: nc-darken($color-main-background, 14%) !default;
|
||||
|
||||
$color-primary: #0082c9;
|
||||
$color-primary-text: #ffffff;
|
||||
$color-primary: #0082c9 !default;
|
||||
$color-primary-text: #ffffff !default;
|
||||
// do not use nc-darken/lighten in case of overriding because
|
||||
// primary-text is independent of color-main-text
|
||||
$color-primary-text-dark: darken($color-primary-text, 7%) !default;
|
||||
|
|
|
|||
|
|
@ -284,9 +284,9 @@ class SCSSCacher {
|
|||
try {
|
||||
$compiledScss = $scss->compile(
|
||||
'$webroot: \'' . $this->getRoutePrefix() . '\';' .
|
||||
$this->getInjectedVariables() .
|
||||
'@import "variables.scss";' .
|
||||
'@import "functions.scss";' .
|
||||
$this->getInjectedVariables() .
|
||||
'@import "' . $fileNameSCSS . '";');
|
||||
} catch (ParserException $e) {
|
||||
$this->logger->error($e, ['app' => 'core']);
|
||||
|
|
@ -349,7 +349,7 @@ class SCSSCacher {
|
|||
}
|
||||
$variables = '';
|
||||
foreach ($this->defaults->getScssVariables() as $key => $value) {
|
||||
$variables .= '$' . $key . ': ' . $value . ';';
|
||||
$variables .= '$' . $key . ': ' . $value . ' !default;';
|
||||
}
|
||||
|
||||
// check for valid variables / otherwise fall back to defaults
|
||||
|
|
|
|||
Loading…
Reference in a new issue