@medyll/cssfabric 0.0.16 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/bin/index.js +6 -1
  2. package/gulpfile.js +3 -15
  3. package/lib/styles/core/box/box.css +936 -1836
  4. package/lib/styles/core/box/box.min.css +1 -1
  5. package/lib/styles/core/box/box.responsive.css +3848 -9713
  6. package/lib/styles/core/box/box.responsive.min.css +1 -1
  7. package/lib/styles/core/color/color.css +909 -267
  8. package/lib/styles/core/color/color.min.css +1 -1
  9. package/lib/styles/core/color/color.responsive.css +4012 -2369
  10. package/lib/styles/core/color/color.responsive.min.css +1 -1
  11. package/lib/styles/core/flex/flex.responsive.css +0 -126
  12. package/lib/styles/core/flex/flex.responsive.min.css +1 -1
  13. package/lib/styles/core/grid/grid.responsive.css +0 -121
  14. package/lib/styles/core/grid/grid.responsive.min.css +1 -1
  15. package/lib/styles/core/menu/menu.responsive.css +0 -81
  16. package/lib/styles/core/menu/menu.responsive.min.css +1 -1
  17. package/lib/styles/core/overflow/overflow.responsive.css +0 -61
  18. package/lib/styles/core/overflow/overflow.responsive.min.css +1 -1
  19. package/lib/styles/core/scale/scale.css +286 -206
  20. package/lib/styles/core/scale/scale.min.css +1 -1
  21. package/lib/styles/core/scale/scale.responsive.css +1157 -1478
  22. package/lib/styles/core/scale/scale.responsive.min.css +1 -1
  23. package/lib/styles/core/table/table.responsive.css +0 -74
  24. package/lib/styles/core/table/table.responsive.min.css +1 -1
  25. package/lib/styles/core/text/text.css +4 -0
  26. package/lib/styles/core/text/text.responsive.css +0 -549
  27. package/lib/styles/core/text/text.responsive.min.css +1 -1
  28. package/lib/styles/core/vars.css +265 -133
  29. package/lib/styles/core/vars.min.css +1 -1
  30. package/lib/styles/core/vars2.css +4 -0
  31. package/lib/styles/core/vars2.min.css +1 -0
  32. package/lib/styles/cssfabric.css +3171 -3209
  33. package/lib/styles/cssfabric.min.css +8 -7
  34. package/lib/styles/cssfabric.responsive.css +10696 -16251
  35. package/lib/styles/cssfabric.responsive.min.css +9 -9
  36. package/package.json +10 -10
  37. package/src/_generated/export.variables.json +42 -43
  38. package/src/cssfabric/_utils.scss +22 -12
  39. package/src/cssfabric/modules/_cssfabric-config.scss +101 -28
  40. package/src/cssfabric/modules/box/_box-build.scss +149 -77
  41. package/src/cssfabric/modules/box/_box-vars.scss +48 -46
  42. package/src/cssfabric/modules/color/_color-build.scss +112 -24
  43. package/src/cssfabric/modules/scale/_scale-build.scss +26 -13
  44. package/src/cssfabric/modules/scale/_scale-vars.scss +54 -45
  45. package/src/cssfabric/modules/text/_text-build.scss +60 -3
  46. package/src/cssfabric/modules/text/text-responsive.scss +1 -0
  47. package/src/cssfabric/modules/theme/_theme-build.scss +43 -29
  48. package/src/cssfabric/modules/theme/_theme-vars.scss +9 -18
  49. package/src/cssfabric/modules/vars.scss +22 -91
  50. package/webpack.config.js +2 -0
  51. package/css/mystyles.css +0 -280
  52. package/css/mystyles.css.map +0 -1
@@ -2,25 +2,24 @@
2
2
  @use '../../_utils';
3
3
  @use "sass:math";
4
4
 
5
- $scale-config: scale-vars.$scale-config;
6
5
  $_cfg: utils.get_fabric_conf();
7
- $cssProps: map-get($scale-config, cssProps);
8
6
 
9
7
  // read variables
10
8
  $_has_dimensions_strict: map-get($_cfg, has_dimensions_strict);
11
9
  $_has_dimensions_min: true; // map-get($_cfg, has_dimensions_min);
12
10
  $_has_dimensions_max: true; // map-get($_cfg, has_dimensions_max);
13
11
 
14
- $scale-defined-steps: map-get($scale-config, defined-steps);
15
- $scale-defined-step-unit: map-get($scale-config, defined-step-unit);
16
- $scale-defined-step-size: map-get($scale-config, defined-step-size);
17
- $scale-grid-ratios-config: map-get($scale-config, grid-ratios-config);
12
+ $scale-defined-steps: scale-vars.$scale-defined-steps;
13
+ $scale-defined-step-unit: scale-vars.$scale-defined-step-unit;
14
+ $scale-defined-step-size: scale-vars.$scale-defined-step-size;
15
+ $scale-grid-ratios-config: scale-vars.$scale-grid-ratios-config;
18
16
 
19
- $scale-sizes: map-get($cssProps, size);
20
- $scale-content: map-get($cssProps, content);
17
+ $scale-sizes: scale-vars.$scale-sizes-config;
18
+ $scale-content: scale-vars.$scale-content-config;
21
19
 
22
- $weight-config: map-get($scale-config, weight-config)!default;
23
- $unit-tag-config: map-get($scale-config, unit-tag-config)!default;
20
+ $weight-config: scale-vars.$scale-font-weight-config ;
21
+ $unit-tag-config: scale-vars.$scale-shorthands;
22
+ $scale-sizes-preset-config: scale-vars.$scale-sizes-preset-config;
24
23
 
25
24
  /// css dimensions rules builder
26
25
  @mixin scale-classname-builder($scale_prop, $size_code, $size_value, $media_query_code) {
@@ -67,10 +66,10 @@ $unit-tag-config: map-get($scale-config, unit-tag-config)!default;
67
66
  }
68
67
  }
69
68
 
70
- // loop on dimensions
69
+ // content-max-min
71
70
  @mixin play_dimensions_loop($scale_prop, $mq_size_key) {
72
71
  // loop on dimensions
73
- @each $scale_css_key , $scale_css_value in $scale-content {
72
+ @each $scale_css_key, $scale_css_value in $scale-content {
74
73
  @include scale-classname-builder($scale_prop, $scale_css_key, $scale_css_value, $mq_size_key);
75
74
  }
76
75
  }
@@ -96,6 +95,7 @@ $unit-tag-config: map-get($scale-config, unit-tag-config)!default;
96
95
  );
97
96
  }
98
97
  }
98
+ $--var-oi: yt;
99
99
 
100
100
  // loop on ratio dimensions
101
101
  @mixin play_ratio_dimensions_loop($scale_prop, $mq_size_key) {
@@ -112,14 +112,27 @@ $unit-tag-config: map-get($scale-config, unit-tag-config)!default;
112
112
  }
113
113
  }
114
114
 
115
+ @mixin play_preset_loop($scale_prop, $mq_size_key) {
116
+
117
+ @each $preset, $value in $scale-sizes-preset-config {
118
+ @include scale-classname-builder(
119
+ $scale_prop,
120
+ $preset,
121
+ $value + #{$scale-defined-step-unit},
122
+ $mq_size_key
123
+ );
124
+ }
125
+ }
126
+
115
127
  @mixin buildScale($mq_size_key:null) {
116
128
  @each $scale_prop, $scale_prop_short in $unit-tag-config {
117
- // loop on shorthands
129
+ // loop on shorthands mid tiers ...
118
130
  @include play_shorthand_loop($scale_prop, $mq_size_key);
119
131
 
120
132
  // loop on dimensions
121
133
  @include play_dimensions_loop($scale_prop, $mq_size_key);
122
134
 
135
+ @include play_preset_loop($scale_prop, $mq_size_key);
123
136
  // loop on defined dimensions
124
137
  @include play_defined_dimensions_loop($scale_prop, $mq_size_key);
125
138
 
@@ -1,28 +1,48 @@
1
1
  @use '../../utils';
2
+ @use "../cssfabric-config";
2
3
 
4
+ $scale-sizes-config: (
5
+ full: 100%,
6
+ mid: 50%,
7
+ quarter: 25%,
8
+ tiers: 33%
9
+ );
10
+ $scale-content-config: (
11
+ content-max: max-content,
12
+ content-min: min-content
13
+ );
14
+
15
+ $scale-sizes-preset-config: (
16
+ tiny: 2,
17
+ small: 4,
18
+ medium: 8,
19
+ large: 16,
20
+ wide: 32,
21
+ );
22
+
23
+ $scale-grid-ratios-config: (16);
24
+
25
+ $scale-defined-steps: (
26
+ 1,
27
+ 2,
28
+ 4,
29
+ 8,
30
+ 16,
31
+ 24,
32
+ 32,
33
+ 48,
34
+ 64
35
+ );
36
+
37
+ $scale-shorthands: (
38
+ width: cssfabric-config.$scale-tag-width-shorthand,
39
+ height: cssfabric-config.$scale-tag-height-shorthand
40
+ );
3
41
 
4
42
  $_cssProps: (
5
- size: (
6
- full: 100%,
7
- mid: 50%,
8
- quarter: 25%,
9
- tiers: 33%
10
- ),
11
- content:(
12
- content-max: max-content,
13
- content-min: min-content
14
- ),
15
- defined-steps: (
16
- 1,
17
- 2,
18
- 4,
19
- 8,
20
- 16,
21
- 24,
22
- 32,
23
- 48,
24
- 64
25
- )
43
+ size: $scale-sizes-config,
44
+ content:$scale-content-config,
45
+ defined-steps: $scale-defined-steps
26
46
  );
27
47
 
28
48
  $scale-metadata: (
@@ -31,44 +51,33 @@ $scale-metadata: (
31
51
  description: "cssfabric scale module to set dimensions and ratios on all html elements"
32
52
  );
33
53
 
54
+ $scale-font-weight-config: 1em;
55
+ $scale-defined-step-size: 2;
56
+ $scale-defined-step-unit: rem;
57
+
34
58
  $scale-config: (
35
- weight-config: 1em,
59
+ weight-config: $scale-font-weight-config,
36
60
  unit-tag-config: (
37
61
  width: w,
38
62
  height: h
39
63
  ),
40
- grid-ratios-config: (
41
- 5,
42
- 12
43
- ),
44
- defined-step-size: 2,
45
- defined-step-unit: rem,
46
- defined-steps: (
47
- 1,
48
- 2,
49
- 4,
50
- 8,
51
- 16,
52
- 24,
53
- 32,
54
- 48,
55
- 64
56
- ),
64
+ grid-ratios-config: $scale-grid-ratios-config,
65
+ defined-step-size: $scale-defined-step-size,
66
+ defined-step-unit: $scale-defined-step-unit,
67
+ defined-steps: $scale-defined-steps,
57
68
  cssProps:$_cssProps
58
69
  );
59
70
 
60
-
61
71
  $scale-docs: (
62
72
  attributes:(
63
73
  scale: (
64
74
  tag: scale,
65
75
  keys: (w, h),
66
76
  levels:(
67
- _size : utils.getObjectKeys(map-get($_cssProps, size)),
68
- _content: utils.getObjectKeys(map-get($_cssProps, content)),
69
- _defined-steps: utils.getObjectKeys(map-get($_cssProps, defined-steps)),
70
- _grid-5: utils.getObjectKeys(utils.cssDimensionPropertyBuilder(h, 5)),
71
- _grid-12: utils.getObjectKeys(utils.cssDimensionPropertyBuilder(h, 12))
77
+ _size : utils.getObjectKeys($scale-sizes-config),
78
+ _content: utils.getObjectKeys($scale-content-config),
79
+ _defined-steps: utils.getObjectKeys($scale-defined-steps),
80
+ _grid-16: utils.getObjectKeys(utils.cssDimensionPropertyBuilder(h, 16)),
72
81
  )
73
82
  )
74
83
  )
@@ -53,25 +53,45 @@ $step-size: math.div($size-diff, $steps);
53
53
  }
54
54
  }
55
55
 
56
+
57
+ }
58
+
59
+ @mixin textBuildTransform($tag_short) {
56
60
  .#{$tag_short} {
57
61
  @each $fabricRule, $value in $textTransform {
58
62
  @include utils.fabricAttributes("&" + $sep, $fabricRule, "text-transform", $value);
59
63
  }
64
+ }
65
+ }
60
66
 
67
+ @mixin textBuildAlign($tag_short) {
68
+ .#{$tag_short} {
61
69
  @each $fabricRule, $value in $textAlign {
62
70
  @include utils.fabricAttributes("&" + $sep, $fabricRule, "text-align", $value);
63
71
  }
72
+ }
73
+ }
64
74
 
75
+ @mixin textBuildFontWeight($tag_short) {
76
+ .#{$tag_short} {
65
77
  @each $fabricRule, $value in $fontWeight {
66
78
  @include utils.fabricAttributes("&" + $sep, $fabricRule, "font-weight", var(--font-weight-#{$fabricRule}));
67
79
  }
80
+ }
81
+ }
68
82
 
69
- // text shadows color_schemes
83
+ @mixin textBuildShadowColorScheme($tag_short) {
84
+ // text shadows color_schemes
85
+ .#{$tag_short} {
70
86
  @each $fabricRule, $value in $color-schemes {
71
- @include utils.fabricAttributes("&" + $sep + shad + $sep, $fabricRule, "text-shadow", var(--text-shadow-#{$fabricRule}));
87
+ @include utils.fabricAttributes("&" + $sep + shad + $sep, $fabricRule, "text-shadow", var(--text-shadow-#{$fabricRule}));
72
88
  }
89
+ }
90
+ }
73
91
 
74
- // text shadows color_palette_props
92
+ @mixin textBuildShadowPalette($tag_short) {
93
+ // text shadows color_palette_props
94
+ .#{$tag_short} {
75
95
  @each $fabricRule, $value in $color-palette-props {
76
96
  @include utils.fabricAttributes("&" + $sep+ shad + $sep, $fabricRule, "text-shadow", var(--text-shadow-#{$fabricRule}));
77
97
  }
@@ -106,4 +126,41 @@ $step-size: math.div($size-diff, $steps);
106
126
  $property_key: if($mq_size_key, #{$moduleNameShort}-#{$mq_size_key}, #{$moduleNameShort});
107
127
 
108
128
  @include fabric_text($property_key);
129
+
130
+ @if ($mq_size_key == null) {
131
+ @if (cssfabric-config.$has-text-transform) {
132
+ @include textBuildTransform($property_key)
133
+ }
134
+ @if (cssfabric-config.$has-text-align) {
135
+ @include textBuildAlign($property_key)
136
+ }
137
+ @if (cssfabric-config.$has-text-font) {
138
+ @include textBuildFontWeight($property_key)
139
+ }
140
+ @if (cssfabric-config.$has-text-shadow-color-scheme) {
141
+ @include textBuildShadowColorScheme($property_key)
142
+ }
143
+ @if (cssfabric-config.$has-text-shadow-color-palette) {
144
+ @include textBuildShadowPalette($property_key)
145
+ }
146
+ }
147
+
148
+ @if ($mq_size_key != null) {
149
+ @if (cssfabric-config.$has-text-transform-responsive) {
150
+ @include textBuildTransform($property_key)
151
+ }
152
+ @if (cssfabric-config.$has-text-align-responsive) {
153
+ @include textBuildAlign($property_key)
154
+ }
155
+ @if (cssfabric-config.$has-text-font-responsive) {
156
+ @include textBuildFontWeight($property_key)
157
+ }
158
+ @if (cssfabric-config.$has-text-shadow-color-scheme-responsive) {
159
+ @include textBuildShadowColorScheme($property_key)
160
+ }
161
+ @if (cssfabric-config.$has-text-shadow-color-palette-responsive) {
162
+ @include textBuildShadowPalette($property_key)
163
+ }
164
+ }
165
+
109
166
  }
@@ -20,6 +20,7 @@ $mq_size_value in $_media_quey_sizes {
20
20
  @include utils.fabricResponsiveEncloser($mq_size_value,$min_value) {
21
21
  @include build.buildText($mq_size_key);
22
22
  }
23
+
23
24
  $min_value: $mq_size_value;
24
25
  }
25
26
 
@@ -1,9 +1,9 @@
1
- @use "theme-vars";
2
- @use "../cssfabric-config";
3
1
  @use "../../_utils";
4
2
  @use "sass:color";
3
+ @use "theme-vars";
5
4
 
6
- $theme-config: theme-vars.$theme-config;
5
+ @import "theme-vars";
6
+ @import "../cssfabric-config";
7
7
 
8
8
  // COLOR THEME
9
9
  $moduleNameShort: map-get($theme-config, moduleNameShort);
@@ -12,24 +12,25 @@ $color-themes: map-get($theme-config, color-default-config);
12
12
  $theme-levels: map-get($theme-config, theme-level-config);
13
13
  $theme-properties-apply-config: map-get($theme-config, theme-properties-apply-config);
14
14
 
15
- $color-primary: map-get($color-themes, primary);
16
- $color-secondary: map-get($color-themes, secondary);
17
- $color-tertiary: map-get($color-themes, tertiary);
18
15
 
19
16
  $declinations-config: map-get($theme-config, declinations-config);
20
17
 
18
+ $themes: map-get($cssfabric-config, themes) !default;
19
+ $theme-light: map-get($themes, light) !default;
20
+ $theme-dark: map-get($themes, dark) !default;
21
+
21
22
  @mixin fabric_theme($mq_size_key: null) {
22
- // loop on each color grades
23
+ // loop on each color grades primary secondary tertiary
23
24
  @each $color-grade in $declinations-config {
24
-
25
+ // text, bg, border
25
26
  @each $text-or-bg-or-border in $theme-properties-apply-config {
26
27
  $property_key: if($mq_size_key, #{$text-or-bg-or-border}-#{$mq_size_key}, #{$text-or-bg-or-border});
27
-
28
+ // font-size border-color background-color
28
29
  $switch-tag-type: utils.getColorPropertyType($text-or-bg-or-border);
29
30
 
30
31
  .#{$moduleNameShort}-#{$property_key}-#{$color-grade} {
31
32
  #{$switch-tag-type}: var(--theme-color-#{$color-grade});
32
-
33
+ // light lighter dark ...
33
34
  @each $theme-level in $theme-levels {
34
35
  $newColor: var(--theme-color-#{$color-grade}-#{$theme-level});
35
36
 
@@ -40,37 +41,50 @@ $declinations-config: map-get($theme-config, declinations-config);
40
41
  }
41
42
  }
42
43
 
43
- @mixin themeCssVars() {
44
+ @mixin themeBaseVars($theme:$theme-light) {
45
+ /* theme base colors*/
46
+ --theme-color-text: #{map-get($theme, foreground)};
47
+ --theme-color-foreground: #{map-get($theme, foreground)};
48
+ @include utils.alphaTize(--theme-color-foreground, map-get($theme, foreground));
49
+ --theme-color-background: #{map-get($theme, background)};
50
+ @include utils.alphaTize(--theme-color-background, map-get($theme, foreground));
51
+ --theme-color-paper: #{map-get($theme-light, paper)};
52
+ @include utils.alphaTize(--theme-color-paper, map-get($theme, paper));
53
+ }
54
+
55
+
56
+ @mixin themeCssVars($theme-color-primary,$theme-color-secondary,$theme-color-tertiary) {
57
+
44
58
  /* theme primary colors*/
45
- --theme-color-primary: #{$color-primary};
59
+ --theme-color-primary: #{$theme-color-primary};
46
60
  @each $theme-level in $theme-levels {
47
- --theme-color-primary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$color-primary)};
61
+ --theme-color-primary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$theme-color-primary)};
48
62
  }
49
- --theme-color-primary-alpha-low: #{color.change($color-primary,$alpha:0.8)};
50
- --theme-color-primary-alpha-mid: #{color.change($color-primary,$alpha:0.3)};
51
- --theme-color-primary-alpha-high: #{color.change($color-primary,$alpha:0.1)};
63
+
64
+ --theme-color-primary-alpha-low: #{color.change($theme-color-primary,$alpha:0.8)};
65
+ --theme-color-primary-alpha: #{color.change($theme-color-primary,$alpha:0.3)};
66
+ --theme-color-primary-alpha-high: #{color.change($theme-color-primary,$alpha:0.1)};
52
67
 
53
68
  /* theme secondary colors*/
54
- --theme-color-secondary: #{$color-secondary};
69
+ --theme-color-secondary: #{$theme-color-secondary};
55
70
  @each $theme-level in $theme-levels {
56
- --theme-color-secondary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$color-secondary)};
71
+ --theme-color-secondary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$theme-color-secondary)};
57
72
  }
58
- --theme-color-secondary-alpha-low: #{color.change($color-secondary,$alpha:0.8)};
59
- --theme-color-secondary-alpha-mid: #{color.change($color-secondary,$alpha:0.3)};
60
- --theme-color-secondary-alpha-high: #{color.change($color-secondary,$alpha:0.1)};
73
+ --theme-color-secondary-alpha-low: #{color.change($theme-color-secondary,$alpha:0.8)};
74
+ --theme-color-secondary-alpha: #{color.change($theme-color-secondary,$alpha:0.3)};
75
+ --theme-color-secondary-alpha-high: #{color.change($theme-color-secondary,$alpha:0.1)};
61
76
 
62
77
  /* theme tertiary colors*/
63
- --theme-color-tertiary: #{$color-tertiary};
78
+ --theme-color-tertiary: #{$theme-color-tertiary};
64
79
  @each $theme-level in $theme-levels {
65
- --theme-color-tertiary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$color-tertiary)};
80
+ --theme-color-tertiary-#{$theme-level}: #{utils.applyColorEffect($theme-level,$theme-color-tertiary)};
66
81
  }
67
- --theme-color-tertiary-alpha-low: #{color.change($color-tertiary,$alpha:0.8)};
68
- --theme-color-tertiary-alpha-mid: #{color.change($color-tertiary,$alpha:0.3)};
69
- --theme-color-tertiary-alpha-high: #{color.change($color-tertiary,$alpha:0.1)};
70
-
82
+ --theme-color-tertiary-alpha-low: #{color.change($theme-color-tertiary,$alpha:0.8)};
83
+ --theme-color-tertiary-alpha: #{color.change($theme-color-tertiary,$alpha:0.3)};
84
+ --theme-color-tertiary-alpha-high: #{color.change($theme-color-tertiary,$alpha:0.1)};
71
85
  }
72
86
 
73
87
  @mixin buildTheme($mq_size_key: null) {
74
-
75
- @include fabric_theme($mq_size_key);
88
+
89
+ @include fabric_theme($mq_size_key);
76
90
  }
@@ -1,20 +1,10 @@
1
1
  @use '../../utils' as utils;
2
- @use "../cssfabric-config";
2
+ @import "../cssfabric-config";
3
3
 
4
4
 
5
- $config: cssfabric-config.$cssfabric-config;
6
-
7
- $theme: map-get($config, theme);
8
-
9
- $color-primary: map-get($theme, primary) !default;
10
- $color-secondary: map-get($theme, secondary) !default;
11
- $color-tertiary: map-get($theme, tertiary) !default;
12
-
13
- $_foreground: map-get($theme, foreground) !default;
14
- $_background: map-get($theme, background) !default;
15
5
 
16
6
  $_declinations-config: (primary, secondary, tertiary);
17
- $themeii: (primary: $color-primary, secondary:$color-secondary, tertiary:$color-tertiary);
7
+ $themeii : (primary: $theme-color-primary, secondary:$theme-color-secondary, tertiary:$theme-color-tertiary);
18
8
 
19
9
  $_theme-levels: (light lighter dark darker complement invert);
20
10
  $_theme-properties-apply: (text, bg, border);
@@ -33,17 +23,18 @@ $theme-config: (
33
23
  moduleName: theme,
34
24
  moduleNameShort: theme,
35
25
  color-default-config: (
36
- primary: $color-primary,
37
- secondary: $color-secondary,
38
- tertiary: $color-tertiary,
39
- foreground: $_foreground,
40
- background: $_background
26
+ primary: $theme-color-primary,
27
+ secondary: $theme-color-secondary,
28
+ tertiary: $theme-color-tertiary,
29
+ foreground: $theme-color-foreground,
30
+ background: $theme-color-background,
31
+ paper: $theme-color-paper,
41
32
  ),
42
33
  declinations-config:$_declinations-config,
43
34
  theme-level-config:$_theme-levels,
44
35
  theme-properties-apply-config:$_theme-properties-apply,
45
36
  // primary secondary tertiary
46
- color: utils.getThemeLevels($themeii, $color-primary)
37
+ color: utils.getThemeLevels($themeii, $theme-color-primary)
47
38
  );
48
39
 
49
40
  $theme-docs: (attributes:(
@@ -1,118 +1,49 @@
1
1
  @use "../_utils";
2
2
  @use "sass:color";
3
- @use 'cssfabric-config';
4
3
  @use '../../cssfabric/modules/color/color-vars';
4
+ @use '../../cssfabric/modules/color/color-build' as colorBuild;
5
5
  @use "../../cssfabric/modules/box/box-vars" as box;
6
6
  @use "../../cssfabric/modules/box/box-build" as boxBuild;
7
7
  @use "../../cssfabric/modules/theme/theme-build" as themeBuild;
8
8
  @use "../../cssfabric/modules/text/text-build" as textBuild;
9
9
 
10
+ @import 'cssfabric-config';
10
11
 
11
- $config: cssfabric-config.$cssfabric-config;
12
- /* cssFabric vars */
13
-
14
- $tru: utils.get_fabric_conf('themes','light');
15
-
16
- // COLOR config
17
- $color-config: color-vars.$color-config;
18
- // COLOR SCHEMES
19
- $color-schemes: map-get($color-config, scheme);
20
- // COLOR PALETTE
21
- $color-palette: map-get($color-config, palette);
22
- // COLOR TYPES
23
- $color-types-config: map-get($color-config, color-types-config);
24
-
25
- $themes: map-get($config, themes) !default;
12
+ $themes: map-get($cssfabric-config, themes) !default;
26
13
  $theme-light: map-get($themes, light) !default;
27
14
  $theme-dark: map-get($themes, dark) !default;
28
15
 
29
- // GRAYS
30
- $gray-config: map-get($color-config, gray-config) !default;
31
- $color-gray-start: map-get($gray-config, start) !default;
32
- $color-gray-end: map-get($gray-config, end) !default;
33
- $color-gray-steps: map-get($gray-config, steps) !default;
34
- $gray-schemes: utils.getGraySteps($color-gray-steps, $color-gray-start, $color-gray-end);
35
-
36
-
37
- // BOX config
38
- $box-config: box.$box-config;
39
-
40
- $box-shadows-steps: map-get($box-config, shadows-steps) !default;
41
- $box-shadows-step-multiplier: map-get($box-config, shadows-step_multiplier) !default;
42
- $box-shadow-shorthand-config: map-get($box-config, shadow-shorthand-config) !default;
43
-
16
+ /* cssFabric vars yes */
44
17
  :root {
45
-
46
- @include themeBuild.themeCssVars();
47
-
48
- --theme-color-foreground: #{map-get($theme-light, foreground)};
49
- --theme-color-text: #{map-get($theme-light, foreground)};
50
- --theme-color-background: #{map-get($theme-light, background)};
51
- --theme-color-paper: #{map-get($theme-light, paper)};
52
-
53
- --theme-color-border: rgba(208, 191, 151, 0.3);
54
- --theme-color-overlay: rgba(208, 191, 151, 0.2);
55
-
56
- /* color-scheme */
57
- @each $type-key, $type-prop in $color-schemes {
58
- --color-scheme-#{$type-key} : #{$type-prop};
59
- --color-scheme-#{$type-key}-light: #{utils.applyColorEffect('light',$type-prop)};
60
- --color-scheme-#{$type-key}-dark: #{utils.applyColorEffect('dark',$type-prop)};
61
- }
62
-
63
- /* color-palette */
64
- @each $type-key, $type-prop in $color-palette {
65
- /* color-palette #{$type-key} */
66
- --color-palette-#{$type-key} : #{$type-prop};
67
-
68
- --color-palette-#{$type-key}-lighter: #{utils.applyColorEffect('lighter',$type-prop)};
69
- --color-palette-#{$type-key}-light: #{utils.applyColorEffect('light',$type-prop)};
70
- --color-palette-#{$type-key}-dark: #{utils.applyColorEffect('dark',$type-prop)};
71
- --color-palette-#{$type-key}-darker: #{utils.applyColorEffect('darker',$type-prop)};
72
- --color-palette-#{$type-key}-complement: #{utils.applyColorEffect('complement',$type-prop)};
73
- --color-palette-#{$type-key}-invert: #{utils.applyColorEffect('invert',$type-prop)};
74
-
75
- --color-palette-#{$type-key}-alpha-low: #{color.change($type-prop,$alpha:0.8)};
76
- --color-palette-#{$type-key}-alpha-mid: #{color.change($type-prop,$alpha:0.3)};
77
- --color-palette-#{$type-key}-alpha-high: #{color.change($type-prop,$alpha:0.1)};
78
- }
79
-
80
- /* grays */
81
- @each $type-key, $type-prop in $gray-schemes {
82
- --color-gray-#{$type-key} : #{$type-prop};
83
- --color-gray-#{$type-key}-alpha-low: #{color.change($type-prop,$alpha:0.8)};
84
- }
85
-
86
- /* shadows */
87
- @include boxBuild.shadowsCssVars();
18
+ @include themeBuild.themeCssVars($theme-color-primary,$theme-color-secondary,$theme-color-tertiary);
19
+ @include colorBuild.buildColorCssVars();
88
20
  /* boxes */
89
21
  @include boxBuild.pmbCssVars();
90
22
  /* text */
91
23
  @include textBuild.textCssVars();
92
24
 
93
- }
25
+ /* shadows */
26
+ @include boxBuild.shadowsCssVars();
27
+ /* themes */
28
+ @include themeBuild.themeBaseVars($theme-light);
94
29
 
95
- /*[data-theme="light"] {
30
+ &,[data-theme="light"] {
31
+ @include themeBuild.themeBaseVars($theme-light);
96
32
 
97
- --theme-color-foreground: #{map-get($theme-light, foreground)};
98
- --theme-color-text: #{map-get($theme-light, foreground)};
99
- --theme-color-background: #{map-get($theme-light, background)};
100
- --theme-color-paper: #{map-get($theme-light, paper)};
33
+ --theme-color-border: #{color.change(map-get($theme-light, paper),$alpha:0.2)};
34
+ --theme-color-overlay: rgba(208, 191, 151, 0.2);
35
+ }
101
36
 
102
- --theme-color-border: var(--theme-color-primary-alpha-mid);
103
- --theme-color-overlay: '';
104
- }*/
37
+ [data-theme="dark"] {
38
+ @include themeBuild.themeBaseVars($theme-dark);
39
+
40
+ --theme-color-border: #{color.change(map-get($theme-dark, paper),$alpha:0.2)};
41
+ --theme-color-overlay: rgba(255, 255, 255, 0.1);
42
+ }
43
+ }
105
44
 
106
- [data-theme="dark"] {
107
45
 
108
- --theme-color-foreground: #{map-get($theme-dark, foreground)};
109
- --theme-color-text: #{map-get($theme-dark, foreground)};
110
- --theme-color-background: #{map-get($theme-dark, background)};
111
- --theme-color-paper: #{map-get($theme-dark, paper)};
112
46
 
113
- --theme-color-border: rgba(255, 255, 255, 0.2);
114
- --theme-color-overlay: rgba(255,255,255,0.1);
115
- }
116
47
 
117
48
 
118
49
 
package/webpack.config.js CHANGED
@@ -25,6 +25,7 @@ module.exports = {
25
25
  loader: "sass-loader",
26
26
  options: {
27
27
  sourceMap: isDevelopment,
28
+ sassOptions: { quietDeps: true },
28
29
  },
29
30
  },
30
31
  ],
@@ -39,6 +40,7 @@ module.exports = {
39
40
  loader: "sass-loader",
40
41
  options: {
41
42
  sourceMap: isDevelopment,
43
+ sassOptions: { quietDeps: true },
42
44
  },
43
45
  },
44
46
  ],