Move SCSS variable fetching before the variables.scss to properly calculate color values
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
27141a960f
commit
e8938df198
|
@ -149,8 +149,8 @@ class AccessibilityController extends Controller {
|
||||||
try {
|
try {
|
||||||
$css .= $scss->compile(
|
$css .= $scss->compile(
|
||||||
$imports .
|
$imports .
|
||||||
'@import "variables.scss";' .
|
|
||||||
$this->getInjectedVariables() .
|
$this->getInjectedVariables() .
|
||||||
|
'@import "variables.scss";' .
|
||||||
'@import "css-variables.scss";'
|
'@import "css-variables.scss";'
|
||||||
);
|
);
|
||||||
} catch (ParserException $e) {
|
} catch (ParserException $e) {
|
||||||
|
|
|
@ -38,8 +38,8 @@ $color-main-background: #fff !default;
|
||||||
$color-background-dark: nc-darken($color-main-background, 7%) !default;
|
$color-background-dark: nc-darken($color-main-background, 7%) !default;
|
||||||
$color-background-darker: nc-darken($color-main-background, 14%) !default;
|
$color-background-darker: nc-darken($color-main-background, 14%) !default;
|
||||||
|
|
||||||
$color-primary: #0082c9;
|
$color-primary: #0082c9 !default;
|
||||||
$color-primary-text: #ffffff;
|
$color-primary-text: #ffffff !default;
|
||||||
// do not use nc-darken/lighten in case of overriding because
|
// do not use nc-darken/lighten in case of overriding because
|
||||||
// primary-text is independent of color-main-text
|
// primary-text is independent of color-main-text
|
||||||
$color-primary-text-dark: darken($color-primary-text, 7%) !default;
|
$color-primary-text-dark: darken($color-primary-text, 7%) !default;
|
||||||
|
|
|
@ -284,9 +284,9 @@ class SCSSCacher {
|
||||||
try {
|
try {
|
||||||
$compiledScss = $scss->compile(
|
$compiledScss = $scss->compile(
|
||||||
'$webroot: \'' . $this->getRoutePrefix() . '\';' .
|
'$webroot: \'' . $this->getRoutePrefix() . '\';' .
|
||||||
|
$this->getInjectedVariables() .
|
||||||
'@import "variables.scss";' .
|
'@import "variables.scss";' .
|
||||||
'@import "functions.scss";' .
|
'@import "functions.scss";' .
|
||||||
$this->getInjectedVariables() .
|
|
||||||
'@import "' . $fileNameSCSS . '";');
|
'@import "' . $fileNameSCSS . '";');
|
||||||
} catch (ParserException $e) {
|
} catch (ParserException $e) {
|
||||||
$this->logger->error($e, ['app' => 'core']);
|
$this->logger->error($e, ['app' => 'core']);
|
||||||
|
@ -349,7 +349,7 @@ class SCSSCacher {
|
||||||
}
|
}
|
||||||
$variables = '';
|
$variables = '';
|
||||||
foreach ($this->defaults->getScssVariables() as $key => $value) {
|
foreach ($this->defaults->getScssVariables() as $key => $value) {
|
||||||
$variables .= '$' . $key . ': ' . $value . ';';
|
$variables .= '$' . $key . ': ' . $value . ' !default;';
|
||||||
}
|
}
|
||||||
|
|
||||||
// check for valid variables / otherwise fall back to defaults
|
// check for valid variables / otherwise fall back to defaults
|
||||||
|
|
Loading…
Reference in New Issue