Skip to content

Commit 149d87f

Browse files
committed
Wrapper: move initial css vars to wrapper element
1 parent 0029f33 commit 149d87f

2 files changed

Lines changed: 27 additions & 31 deletions

File tree

src/components/_wrapper.scss

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,33 @@
22
* Chart wrapper element
33
*/
44
.charts-css {
5+
// Colors
6+
@each $index, $color in $colors {
7+
--#{$variable-prefix}color-#{$index}: #{$color};
8+
}
9+
10+
// General Colors
11+
--#{$variable-prefix}chart-bg-color: #f5f5f5;
12+
13+
// Heading
14+
--#{$variable-prefix}heading-size: 0px; // Unit required
15+
16+
// Axes
17+
--#{$variable-prefix}primary-axis-color: rgba(0, 0, 0, 1);
18+
--#{$variable-prefix}primary-axis-style: solid;
19+
--#{$variable-prefix}primary-axis-width: 1px;
20+
--#{$variable-prefix}secondary-axes-color: rgba(0, 0, 0, .15);
21+
--#{$variable-prefix}secondary-axes-style: solid;
22+
--#{$variable-prefix}secondary-axes-width: 1px;
23+
--#{$variable-prefix}data-axes-color: rgba(0, 0, 0, .15);
24+
--#{$variable-prefix}data-axes-style: solid;
25+
--#{$variable-prefix}data-axes-width: 1px;
26+
27+
// Legend
28+
--#{$variable-prefix}legend-border-color: rgb(200, 200, 200);
29+
--#{$variable-prefix}legend-border-style: solid;
30+
--#{$variable-prefix}legend-border-width: 1px;
31+
532
// Position child elements relative to main chart element
633
position: relative;
734

src/general/_variables.scss

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,34 +18,3 @@ $colors: (
1818
$total-colors: length($colors);
1919

2020
$max-axes: 10;
21-
22-
.charts-css {
23-
24-
// Colors
25-
@each $index, $color in $colors {
26-
--#{$variable-prefix}color-#{$index}: #{$color};
27-
}
28-
29-
// General Colors
30-
--#{$variable-prefix}chart-bg-color: #f5f5f5;
31-
32-
// Heading
33-
--#{$variable-prefix}heading-size: 0px; // Unit required
34-
35-
// Axes
36-
--#{$variable-prefix}primary-axis-color: rgba(0, 0, 0, 1);
37-
--#{$variable-prefix}primary-axis-style: solid;
38-
--#{$variable-prefix}primary-axis-width: 1px;
39-
--#{$variable-prefix}secondary-axes-color: rgba(0, 0, 0, .15);
40-
--#{$variable-prefix}secondary-axes-style: solid;
41-
--#{$variable-prefix}secondary-axes-width: 1px;
42-
--#{$variable-prefix}data-axes-color: rgba(0, 0, 0, .15);
43-
--#{$variable-prefix}data-axes-style: solid;
44-
--#{$variable-prefix}data-axes-width: 1px;
45-
46-
// Legend
47-
--#{$variable-prefix}legend-border-color: rgb(200, 200, 200);
48-
--#{$variable-prefix}legend-border-style: solid;
49-
--#{$variable-prefix}legend-border-width: 1px;
50-
51-
}

0 commit comments

Comments
 (0)