summaryrefslogtreecommitdiffstats
path: root/core/css/variables.scss
diff options
context:
space:
mode:
authorJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-03 10:46:35 +0200
committerJohn Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>2018-06-20 19:17:05 +0200
commit49dc8c53977d86714df49d612bfdc4742d0ec5ed (patch)
treebd323d460c04fc61359bb04b492428653b612e8e /core/css/variables.scss
parent9d37c191a39e17434e68551cb5cde1307b8ed78c (diff)
downloadnextcloud-server-49dc8c53977d86714df49d612bfdc4742d0ec5ed.tar.gz
nextcloud-server-49dc8c53977d86714df49d612bfdc4742d0ec5ed.zip
Css4 vars root init
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'core/css/variables.scss')
-rw-r--r--core/css/variables.scss44
1 files changed, 36 insertions, 8 deletions
diff --git a/core/css/variables.scss b/core/css/variables.scss
index 4e2c1c396cb..febe79ac302 100644
--- a/core/css/variables.scss
+++ b/core/css/variables.scss
@@ -12,14 +12,6 @@ $color-primary-element: $color-primary;
// (Works as well: color: #000; opacity: 0.57;)
$color-text-details: #767676;
-@function nc-darken($color, $value) {
- @return darken($color, $value);
-}
-
-@function nc-lighten($color, $value) {
- @return lighten($color, $value);
-}
-
$image-logo: '../img/logo.svg?v=1';
$image-login-background: '../img/background.png?v=2';
@@ -28,3 +20,39 @@ $color-loading-dark: #bbbbbb;
$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);
+}
+
+@function nc-lighten($color, $value) {
+ @return lighten($color, $value);
+} \ No newline at end of file