Bläddra i källkod

Move chart colors to scss variables

Denis K 9 år sedan
förälder
incheckning
a47991c2a2

+ 7 - 7
jet/static/jet/css/_dashboard.scss

@@ -199,31 +199,31 @@
       canvas {
         .chart {
           &-fillColor {
-            color: transparentize($hover-link-color, 0.75);
+            color: $chart-fillColor;
           }
 
           &-strokeColor {
-            color: $hover-link-color;
+            color: $chart-strokeColor;
           }
 
           &-pointColor {
-            color: $content-contrast2-text-color
+            color: $chart-pointColor;
           }
 
           &-pointHighlightFill {
-            color: $hover-link-color;
+            color: $chart-pointHighlightFill;
           }
 
           &-scaleGridLineColor {
-            color: transparentize($black-color, 0.9);
+            color: $chart-scaleGridLineColor;
           }
 
           &-scaleLineColor {
-            color: transparentize($black-color, 0.9);
+            color: $chart-scaleLineColor;
           }
 
           &-scaleFontColor {
-            color: $content-contrast2-text-color
+            color: $chart-scaleFontColor;
           }
         }
       }

+ 13 - 1
jet/static/jet/css/_variables.scss

@@ -199,4 +199,16 @@ $jquery-ui-state-highlight-text-color: $contrast2-color !default;
 $jquery-ui-overlay-color: $black-color !default;
 
 $jquery-ui-tooltip-background-color: $black-color !default;
-$jquery-ui-tooltip-text-color: $white-color !default;
+$jquery-ui-tooltip-text-color: $white-color !default;
+
+/*
+ * Charts
+ */
+
+$chart-fillColor: transparentize($hover-link-color, 0.75) !default;
+$chart-strokeColor: $hover-link-color !default;
+$chart-pointColor: $content-contrast2-text-color !default;
+$chart-pointHighlightFill: $hover-link-color !default;
+$chart-scaleGridLineColor: transparentize($black-color, 0.9) !default;
+$chart-scaleLineColor: transparentize($black-color, 0.9) !default;
+$chart-scaleFontColor: $content-contrast2-text-color !default;

+ 13 - 1
jet/static/jet/css/themes/green/_variables.scss

@@ -199,4 +199,16 @@ $jquery-ui-state-highlight-text-color: $contrast2-color;
 $jquery-ui-overlay-color: $black-color;
 
 $jquery-ui-tooltip-background-color: $black-color;
-$jquery-ui-tooltip-text-color: $white-color;
+$jquery-ui-tooltip-text-color: $white-color;
+
+/*
+ * Charts
+ */
+
+$chart-fillColor: transparentize($hover-link-color, 0.75);
+$chart-strokeColor: $hover-link-color;
+$chart-pointColor: $content-contrast2-text-color;
+$chart-pointHighlightFill: $hover-link-color;
+$chart-scaleGridLineColor: transparentize($black-color, 0.9);
+$chart-scaleLineColor: transparentize($black-color, 0.9);
+$chart-scaleFontColor: $content-contrast2-text-color;