diff --git a/core/css/css-variables.scss b/core/css/css-variables.scss new file mode 100644 index 0000000000..f6f2c4d1c4 --- /dev/null +++ b/core/css/css-variables.scss @@ -0,0 +1,26 @@ +// CSS4 Variables +// Remember, you cannot use scss functions with css4 variables +// All css4 variables must be fixed! Scss is a PRE processor +// css4 variables are processed after scss! +:root { + --color-main-text: $color-main-text; + --color-main-background: $color-main-background; + --color-primary: $color-primary; + --color-primary-text: $color-primary-text; + --color-error: $color-error; + --color-warning: $color-warning; + --color-success: $color-success; + --color-primary-element: $color-primary-element; + + --color-text-details: $color-text-details; + + --image-logo: $image-logo; + --image-login-background: $image-login-background; + + --color-loading: $color-loading; + --color-loading-dark: $color-loading-dark; + --color-box-shadow: $color-box-shadow; + --color-border: $color-border; + --border-radius: $border-radius; +} + diff --git a/core/css/variables.scss b/core/css/variables.scss index febe79ac30..5d6c616e06 100644 --- a/core/css/variables.scss +++ b/core/css/variables.scss @@ -12,8 +12,8 @@ $color-primary-element: $color-primary; // (Works as well: color: #000; opacity: 0.57;) $color-text-details: #767676; -$image-logo: '../img/logo.svg?v=1'; -$image-login-background: '../img/background.png?v=2'; +$image-logo: url('../img/logo.svg?v=1'); +$image-login-background: url('../img/background.png?v=2'); $color-loading: #969696; $color-loading-dark: #bbbbbb; @@ -21,33 +21,6 @@ $color-box-shadow: rgba(nc-darken($color-main-background, 70%), 0.75); $color-border: nc-darken($color-main-background, 8%); $border-radius: 3px; -// CSS4 Variables -// Remember, you cannot use scss functions with css4 variables -// All css4 variables must be fixed! Scss is a PRE processor -// css4 variables are processed after scss! -:root { - --color-main-text: $color-main-text; - --color-main-background: $color-main-background; - --color-primary: $color-primary; - --color-primary-text: $color-primary-text; - --color-error: $color-error; - --color-warning: $color-warning; - --color-success: $color-success; - --color-primary-element: $color-primary-element; - - --color-text-details: $color-text-details; - - --image-logo: $image-logo; - --image-login-background: $image-login-background; - - --color-loading: $color-loading; - --color-loading-dark: $color-loading-dark; - --color-box-shadow: $color-box-shadow; - --color-border: $color-border; - --border-radius: $border-radius; -} - - // SCSS darken/lighten function override @function nc-darken($color, $value) { @return darken($color, $value); diff --git a/lib/private/legacy/template.php b/lib/private/legacy/template.php index 7258eb9022..3cca8245af 100644 --- a/lib/private/legacy/template.php +++ b/lib/private/legacy/template.php @@ -109,6 +109,7 @@ class OC_Template extends \OC\Template\Base { } } + OC_Util::addStyle('css-variables', null, true); OC_Util::addStyle('server', null, true); OC_Util::addStyle('jquery-ui-fixes',null,true); OC_Util::addVendorStyle('jquery-ui/themes/base/jquery-ui',null,true);