@medyll/cssfabric 0.0.10

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 (165) hide show
  1. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  2. package/.idea/cssfabric.iml +11 -0
  3. package/.idea/misc.xml +9 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/.vscode/settings.json +24 -0
  7. package/README.md +240 -0
  8. package/cssfabric.config.js +3 -0
  9. package/cssfabric.json +8 -0
  10. package/gulpfile.js +610 -0
  11. package/lib/_generated/export.variables.json +583 -0
  12. package/lib/index.d.ts +2 -0
  13. package/lib/index.js +7 -0
  14. package/lib/scripts/cssfabric.d.ts +24 -0
  15. package/lib/scripts/cssfabric.js +48 -0
  16. package/lib/scripts/cssfabricClassNames.d.ts +14 -0
  17. package/lib/scripts/cssfabricClassNames.js +150 -0
  18. package/lib/scripts/utils.d.ts +5 -0
  19. package/lib/scripts/utils.js +40 -0
  20. package/lib/styles/core/animation/animation.css +0 -0
  21. package/lib/styles/core/animation/animation.min.css +0 -0
  22. package/lib/styles/core/base/base.css +222 -0
  23. package/lib/styles/core/base/base.min.css +1 -0
  24. package/lib/styles/core/box/box.css +2263 -0
  25. package/lib/styles/core/box/box.min.css +1 -0
  26. package/lib/styles/core/box/box.responsive.css +13590 -0
  27. package/lib/styles/core/box/box.responsive.min.css +1 -0
  28. package/lib/styles/core/color/color.css +923 -0
  29. package/lib/styles/core/color/color.min.css +1 -0
  30. package/lib/styles/core/color/color.responsive.css +5550 -0
  31. package/lib/styles/core/color/color.responsive.min.css +1 -0
  32. package/lib/styles/core/flex/flex.css +140 -0
  33. package/lib/styles/core/flex/flex.min.css +1 -0
  34. package/lib/styles/core/flex/flex.responsive.css +852 -0
  35. package/lib/styles/core/flex/flex.responsive.min.css +1 -0
  36. package/lib/styles/core/grid/grid.css +50 -0
  37. package/lib/styles/core/grid/grid.min.css +1 -0
  38. package/lib/styles/core/grid/grid.responsive.css +312 -0
  39. package/lib/styles/core/grid/grid.responsive.min.css +1 -0
  40. package/lib/styles/core/main.css +2263 -0
  41. package/lib/styles/core/main.min.css +1 -0
  42. package/lib/styles/core/menu/menu.css +97 -0
  43. package/lib/styles/core/menu/menu.min.css +1 -0
  44. package/lib/styles/core/menu/menu.responsive.css +504 -0
  45. package/lib/styles/core/menu/menu.responsive.min.css +1 -0
  46. package/lib/styles/core/overflow/overflow.css +60 -0
  47. package/lib/styles/core/overflow/overflow.min.css +1 -0
  48. package/lib/styles/core/overflow/overflow.responsive.css +367 -0
  49. package/lib/styles/core/overflow/overflow.responsive.min.css +1 -0
  50. package/lib/styles/core/scale/scale.css +639 -0
  51. package/lib/styles/core/scale/scale.min.css +1 -0
  52. package/lib/styles/core/scale/scale.responsive.css +3846 -0
  53. package/lib/styles/core/scale/scale.responsive.min.css +1 -0
  54. package/lib/styles/core/table/table.css +72 -0
  55. package/lib/styles/core/table/table.min.css +1 -0
  56. package/lib/styles/core/table/table.responsive.css +444 -0
  57. package/lib/styles/core/table/table.responsive.min.css +1 -0
  58. package/lib/styles/core/text/text.css +147 -0
  59. package/lib/styles/core/text/text.min.css +1 -0
  60. package/lib/styles/core/text/text.responsive.css +894 -0
  61. package/lib/styles/core/text/text.responsive.min.css +1 -0
  62. package/lib/styles/core/theme/theme.css +197 -0
  63. package/lib/styles/core/theme/theme.min.css +1 -0
  64. package/lib/styles/core/vars.css +278 -0
  65. package/lib/styles/core/vars.min.css +1 -0
  66. package/lib/styles/core/zindex/zindex.css +279 -0
  67. package/lib/styles/core/zindex/zindex.min.css +1 -0
  68. package/lib/styles/cssfabric.css +7631 -0
  69. package/lib/styles/cssfabric.min.css +15 -0
  70. package/lib/styles/cssfabric.responsive.css +26359 -0
  71. package/lib/styles/cssfabric.responsive.min.css +9 -0
  72. package/package.json +67 -0
  73. package/src/_generated/export.variables.json +756 -0
  74. package/src/_generated/export.variables.md +240 -0
  75. package/src/_generated/index.d.ts +3 -0
  76. package/src/cssfabric/_utils.scss +205 -0
  77. package/src/cssfabric/index.d.ts +3 -0
  78. package/src/cssfabric/modules/_cssfabric-config.scss +89 -0
  79. package/src/cssfabric/modules/_mixins.scss +1 -0
  80. package/src/cssfabric/modules/animation/_animation-build.scss +121 -0
  81. package/src/cssfabric/modules/animation/_animation-vars.scss +17 -0
  82. package/src/cssfabric/modules/animation/animation.scss +3 -0
  83. package/src/cssfabric/modules/base/_base-vars.scss +17 -0
  84. package/src/cssfabric/modules/base/base.scss +80 -0
  85. package/src/cssfabric/modules/box/_box-build.scss +215 -0
  86. package/src/cssfabric/modules/box/_box-vars.scss +119 -0
  87. package/src/cssfabric/modules/box/box-responsive.scss +18 -0
  88. package/src/cssfabric/modules/box/box.scss +3 -0
  89. package/src/cssfabric/modules/color/_color-build.scss +108 -0
  90. package/src/cssfabric/modules/color/_color-vars.scss +80 -0
  91. package/src/cssfabric/modules/color/color-responsive.scss +23 -0
  92. package/src/cssfabric/modules/color/color.scss +3 -0
  93. package/src/cssfabric/modules/css-fabric.scss +2 -0
  94. package/src/cssfabric/modules/flex/_flex-build.scss +169 -0
  95. package/src/cssfabric/modules/flex/_flex-vars.scss +87 -0
  96. package/src/cssfabric/modules/flex/flex-responsive.scss +25 -0
  97. package/src/cssfabric/modules/flex/flex.scss +3 -0
  98. package/src/cssfabric/modules/grid/_grid-build.scss +91 -0
  99. package/src/cssfabric/modules/grid/_grid-vars.scss +87 -0
  100. package/src/cssfabric/modules/grid/grid-responsive.scss +25 -0
  101. package/src/cssfabric/modules/grid/grid.scss +3 -0
  102. package/src/cssfabric/modules/main.scss +3 -0
  103. package/src/cssfabric/modules/menu/_menu-build.scss +119 -0
  104. package/src/cssfabric/modules/menu/_menu-vars.scss +29 -0
  105. package/src/cssfabric/modules/menu/menu-responsive.scss +19 -0
  106. package/src/cssfabric/modules/menu/menu.scss +3 -0
  107. package/src/cssfabric/modules/overflow/_overflow-build.scss +22 -0
  108. package/src/cssfabric/modules/overflow/_overflow-vars.scss +31 -0
  109. package/src/cssfabric/modules/overflow/overflow-responsive.scss +25 -0
  110. package/src/cssfabric/modules/overflow/overflow.scss +5 -0
  111. package/src/cssfabric/modules/scale/_scale-build.scss +129 -0
  112. package/src/cssfabric/modules/scale/_scale-vars.scss +75 -0
  113. package/src/cssfabric/modules/scale/scale-responsive.scss +23 -0
  114. package/src/cssfabric/modules/scale/scale.scss +3 -0
  115. package/src/cssfabric/modules/table/_table-build.scss +134 -0
  116. package/src/cssfabric/modules/table/_table-vars.scss +30 -0
  117. package/src/cssfabric/modules/table/table-responsive.scss +24 -0
  118. package/src/cssfabric/modules/table/table.scss +3 -0
  119. package/src/cssfabric/modules/text/_text-build.scss +109 -0
  120. package/src/cssfabric/modules/text/_text-vars.scss +87 -0
  121. package/src/cssfabric/modules/text/text-responsive.scss +25 -0
  122. package/src/cssfabric/modules/text/text.scss +5 -0
  123. package/src/cssfabric/modules/theme/_theme-build.scss +77 -0
  124. package/src/cssfabric/modules/theme/_theme-vars.scss +47 -0
  125. package/src/cssfabric/modules/theme/theme.scss +5 -0
  126. package/src/cssfabric/modules/vars.scss +120 -0
  127. package/src/cssfabric/modules/zindex/_zindex-vars.scss +19 -0
  128. package/src/cssfabric/modules/zindex/zindex.scss +18 -0
  129. package/src/index.d.ts +3 -0
  130. package/src/index.ts +4 -0
  131. package/src/scripts/cssfabric.ts +54 -0
  132. package/src/scripts/cssfabricClassNames.ts +216 -0
  133. package/src/scripts/utils.ts +37 -0
  134. package/src/vendor/index.d.ts +3 -0
  135. package/src/vendor/normalize/normalize.min.css +2 -0
  136. package/src/vendor/sass-json-export/CHANGELOG.md +26 -0
  137. package/src/vendor/sass-json-export/Gruntfile.js +60 -0
  138. package/src/vendor/sass-json-export/LICENSE +20 -0
  139. package/src/vendor/sass-json-export/README.md +90 -0
  140. package/src/vendor/sass-json-export/package.json +60 -0
  141. package/src/vendor/sass-json-export/stylesheets/encode/api/_json.scss +26 -0
  142. package/src/vendor/sass-json-export/stylesheets/encode/encode.scss +17 -0
  143. package/src/vendor/sass-json-export/stylesheets/encode/helpers/_quote.scss +9 -0
  144. package/src/vendor/sass-json-export/stylesheets/encode/mixins/_json.scss +42 -0
  145. package/src/vendor/sass-json-export/stylesheets/encode/types/_bool.scss +7 -0
  146. package/src/vendor/sass-json-export/stylesheets/encode/types/_color.scss +8 -0
  147. package/src/vendor/sass-json-export/stylesheets/encode/types/_list.scss +14 -0
  148. package/src/vendor/sass-json-export/stylesheets/encode/types/_map.scss +15 -0
  149. package/src/vendor/sass-json-export/stylesheets/encode/types/_null.scss +7 -0
  150. package/src/vendor/sass-json-export/stylesheets/encode/types/_number.scss +8 -0
  151. package/src/vendor/sass-json-export/stylesheets/encode/types/_string.scss +8 -0
  152. package/src/vendor/sass-json-export/stylesheets/sass-json-export.scss +2 -0
  153. package/src/vendor/sass-json-export/test/encode/_index.scss +14 -0
  154. package/src/vendor/sass-json-export/test/encode/api/_json.scss +29 -0
  155. package/src/vendor/sass-json-export/test/encode/helpers/_quote.scss +6 -0
  156. package/src/vendor/sass-json-export/test/encode/types/_bool.scss +6 -0
  157. package/src/vendor/sass-json-export/test/encode/types/_color.scss +7 -0
  158. package/src/vendor/sass-json-export/test/encode/types/_list.scss +25 -0
  159. package/src/vendor/sass-json-export/test/encode/types/_map.scss +17 -0
  160. package/src/vendor/sass-json-export/test/encode/types/_null.scss +8 -0
  161. package/src/vendor/sass-json-export/test/encode/types/_number.scss +68 -0
  162. package/src/vendor/sass-json-export/test/encode/types/_string.scss +9 -0
  163. package/src/vendor/sass-json-export/test/test.scss +9 -0
  164. package/tsconfig.json +46 -0
  165. package/webpack.config.js +53 -0
@@ -0,0 +1,31 @@
1
+ $_overflow-values: (visible hidden clip scroll auto);
2
+ $_overflow-shorthands: (visible: visible, hidden:hidden, clip:clip, scroll:scroll, _: auto);
3
+
4
+ $overflow-metadata: (
5
+ title: overflow,
6
+ tag: flow,
7
+ description: "cssfabric overflow module to set overflow styles on all html elements"
8
+ );
9
+ $overflow-config: (
10
+ overflow_props: overflow overflow-x overflow-y,
11
+ overflow_values: $_overflow-values,
12
+ cssProps:(
13
+ overflow: $_overflow-shorthands
14
+ )
15
+ );
16
+ $overflow-docs: (
17
+ attributes:(
18
+ overflow:(
19
+ tag:flow,
20
+ keys: $_overflow-values
21
+ ),
22
+ overflowX:(
23
+ tag:flowX,
24
+ keys: $_overflow-values
25
+ ),
26
+ overflowY:(
27
+ tag:flowY,
28
+ keys: $_overflow-values
29
+ )
30
+ )
31
+ );
@@ -0,0 +1,25 @@
1
+
2
+ @use "sass:map";
3
+ // load scss config file
4
+ @use '../../_utils';
5
+ @use '_overflow-build' as build;
6
+ @use "../cssfabric-config";
7
+ // load general config variables
8
+ $config: cssfabric-config.$cssfabric-config;
9
+
10
+ // load general config variables
11
+ // media queries sizes, in rem
12
+ $_media_quey_sizes: map-get($config, media_quey_sizes);
13
+
14
+ // builder responsive
15
+ $min_value: 0;
16
+
17
+ @each $mq_size_key,
18
+ $mq_size_value in $_media_quey_sizes {
19
+
20
+ @include utils.fabricResponsiveEncloser($mq_size_value,$min_value) {
21
+ @include build.buildOverflow($mq_size_key);
22
+ }
23
+ $min_value: $mq_size_value;
24
+ }
25
+
@@ -0,0 +1,5 @@
1
+ @use '_overflow-build' as build;
2
+
3
+ @include build.buildOverflow();
4
+
5
+
@@ -0,0 +1,129 @@
1
+ @use 'scale-vars';
2
+ @use '../../_utils';
3
+ @use "sass:math";
4
+
5
+ $scale-config: scale-vars.$scale-config;
6
+ $_cfg: utils.get_fabric_conf();
7
+ $cssProps: map-get($scale-config, cssProps);
8
+
9
+ // read variables
10
+ $_has_dimensions_strict: map-get($_cfg, has_dimensions_strict);
11
+ $_has_dimensions_min: true; // map-get($_cfg, has_dimensions_min);
12
+ $_has_dimensions_max: true; // map-get($_cfg, has_dimensions_max);
13
+
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);
18
+
19
+ $scale-sizes: map-get($cssProps, size);
20
+ $scale-content: map-get($cssProps, content);
21
+
22
+ $weight-config: map-get($scale-config, weight-config)!default;
23
+ $unit-tag-config: map-get($scale-config, unit-tag-config)!default;
24
+
25
+ /// css dimensions rules builder
26
+ @mixin scale-classname-builder($scale_prop, $size_code, $size_value, $media_query_code) {
27
+
28
+ $scale_prop_short: map-get($unit-tag-config, $scale_prop);
29
+
30
+ $tag: if(
31
+ $media_query_code,
32
+ #{$scale_prop_short}-#{$media_query_code}-#{$size_code},
33
+ #{$scale_prop_short}-#{$size_code}
34
+ );
35
+ .#{$tag}, .scale-#{$tag} {
36
+ #{$scale_prop}: $size_value;
37
+
38
+ @if ($_has_dimensions_max) {
39
+ &-max {
40
+ max-#{$scale_prop}: $size_value;
41
+ }
42
+ }
43
+ @if ($_has_dimensions_min) {
44
+ &-min {
45
+ min-#{$scale_prop}: $size_value;
46
+ }
47
+ }
48
+ @if ($_has_dimensions_strict) {
49
+ &-strict {
50
+ #{$scale_prop}: $size_value;
51
+ max-#{$scale_prop}: $size_value;
52
+ min-#{$scale_prop}: $size_value;
53
+ }
54
+ }
55
+ }
56
+ }
57
+
58
+ // loop on shorthands // ok
59
+ @mixin play_shorthand_loop($scale_prop, $mq_size_key) {
60
+ @each $scale_shorthand, $scale_shorthand_value in $scale-sizes {
61
+ @include scale-classname-builder(
62
+ $scale_prop,
63
+ $scale_shorthand,
64
+ map-get($scale-sizes, $scale_shorthand),
65
+ $mq_size_key
66
+ );
67
+ }
68
+ }
69
+
70
+ // loop on dimensions
71
+ @mixin play_dimensions_loop($scale_prop, $mq_size_key) {
72
+ // loop on dimensions
73
+ @each $scale_css_key , $scale_css_value in $scale-content {
74
+ @include scale-classname-builder($scale_prop, $scale_css_key, $scale_css_value, $mq_size_key);
75
+ }
76
+ }
77
+
78
+ // loop on defined dimensions
79
+ // w-* h-*
80
+ // build ratio : w-n = n * $scale_defined_step_size
81
+ @mixin play_defined_dimensions_loop($scale_prop, $mq_size_key) {
82
+ // loop on defined dimensions
83
+ // @each $scale_defined_size in $scale_defined_steps {
84
+ $loop_turn: 1;
85
+ $multiplier: $scale-defined-step-size;
86
+
87
+ @each $scale_defined_step in $scale-defined-steps {
88
+
89
+ $loop_turn: $loop_turn * $multiplier;
90
+
91
+ @include scale-classname-builder(
92
+ $scale_prop,
93
+ $scale_defined_step,
94
+ $scale_defined_step + #{$scale-defined-step-unit},
95
+ $mq_size_key
96
+ );
97
+ }
98
+ }
99
+
100
+ // loop on ratio dimensions
101
+ @mixin play_ratio_dimensions_loop($scale_prop, $mq_size_key) {
102
+ // loop on ratio dimensions
103
+ @each $dimensions_grid_ratio in $scale-grid-ratios-config {
104
+ @for $z_value from 1 through $dimensions_grid_ratio {
105
+ @include scale-classname-builder(
106
+ $scale_prop,
107
+ $z_value + "-" + $dimensions_grid_ratio,
108
+ (math.div($z_value , $dimensions_grid_ratio) * 100) +#{"%"},
109
+ $mq_size_key
110
+ );
111
+ }
112
+ }
113
+ }
114
+
115
+ @mixin buildScale($mq_size_key:null) {
116
+ @each $scale_prop, $scale_prop_short in $unit-tag-config {
117
+ // loop on shorthands
118
+ @include play_shorthand_loop($scale_prop, $mq_size_key);
119
+
120
+ // loop on dimensions
121
+ @include play_dimensions_loop($scale_prop, $mq_size_key);
122
+
123
+ // loop on defined dimensions
124
+ @include play_defined_dimensions_loop($scale_prop, $mq_size_key);
125
+
126
+ // loop on ratio dimensions
127
+ @include play_ratio_dimensions_loop($scale_prop, $mq_size_key);
128
+ }
129
+ }
@@ -0,0 +1,75 @@
1
+ @use '../../utils';
2
+
3
+
4
+ $_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
+ )
26
+ );
27
+
28
+ $scale-metadata: (
29
+ title: scale,
30
+ tag: scale,
31
+ description: "cssfabric scale module to set dimensions and ratios on all html elements"
32
+ );
33
+
34
+ $scale-config: (
35
+ weight-config: 1em,
36
+ unit-tag-config: (
37
+ width: w,
38
+ height: h
39
+ ),
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
+ ),
57
+ cssProps:$_cssProps
58
+ );
59
+
60
+
61
+ $scale-docs: (
62
+ attributes:(
63
+ scale: (
64
+ tag: scale,
65
+ keys: (w, h),
66
+ 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))
72
+ )
73
+ )
74
+ )
75
+ );
@@ -0,0 +1,23 @@
1
+
2
+ // load scss config file
3
+ @use '../../_utils';
4
+ @use '_scale-build'as build;
5
+ @use "../cssfabric-config";
6
+ // load general config variables
7
+ $config: cssfabric-config.$cssfabric-config;
8
+
9
+ // load general config variables
10
+ // media queries sizes, in rem
11
+ $_media_quey_sizes: map-get($config, media_quey_sizes);
12
+
13
+ // builder responsive
14
+ $min_value: 0;
15
+
16
+ @each $mq_size_key,
17
+ $mq_size_value in $_media_quey_sizes {
18
+
19
+ @include utils.fabricResponsiveEncloser($mq_size_value,$min_value) {
20
+ @include build.buildScale($mq_size_key);
21
+ }
22
+ $min_value: $mq_size_value;
23
+ }
@@ -0,0 +1,3 @@
1
+ @use '_scale-build'as build;
2
+
3
+ @include build.buildScale(null);
@@ -0,0 +1,134 @@
1
+ @use 'table-vars';
2
+ @use '../../_utils';
3
+
4
+ $table-config: table-vars.$table-config;
5
+
6
+ $TABLE_PREFIX: map-get($table-config, table_class_name);
7
+ $TABLE_PREFIX_SHORT: map-get($table-config, table_class_name_short);
8
+
9
+ $table_bg_color_head: map-get($table-config, table-bg-color-head);
10
+ $table_bg_color_strip_main: map-get($table-config, table-bg-color-strip-main);
11
+ $table_bg_color_strip_second: map-get($table-config, table-bg-color-strip-second);
12
+
13
+ $table_border_color_header: map-get($table-config, table-border-color-header);
14
+ $table_border_color_main: map-get($table-config, table-border-color-main);
15
+ $table_border_color_second: map-get($table-config, table-border-color-second);
16
+
17
+ // .table-bg-strip-2
18
+ @mixin bg-strip($prefix_short,$nb_strips) {
19
+ &.#{$prefix_short}-bg-strip-#{$nb_strips} {
20
+ @for $nb_strip from 1 through $nb_strips {
21
+ tr:nth-child(#{$nb_strips}n + #{$nb_strip}) td {
22
+ @if ($nb_strip==$nb_strips) {
23
+ background-color: #{$table_bg_color_strip_main};
24
+ }
25
+
26
+ @if ($nb_strips%2==1 and $nb_strip%2==0 and $nb_strips > 2 and $nb_strip !=$nb_strips) {
27
+ // border-bottom: 10px solid black;
28
+ }
29
+ }
30
+ }
31
+ }
32
+ }
33
+
34
+ // .table-sticky
35
+ @mixin sticky($table_prefix_short) {
36
+ &.#{$table_prefix_short}-sticky {
37
+ position: relative;
38
+
39
+ thead tr,
40
+ .thead .tr {
41
+ position: static;
42
+
43
+ th,
44
+ .th {
45
+ background-color: #ededed;
46
+ position: sticky;
47
+ top: 0;
48
+ }
49
+ }
50
+ }
51
+ }
52
+ // -layout -h-line -v-line border
53
+ @mixin fabric_table($mq_size_key: null) {
54
+ /** cssfabric : #{$TABLE_PREFIX_SHORT}*/
55
+ $prefix_short: if($mq_size_key, #{$TABLE_PREFIX_SHORT}-#{$mq_size_key}, $TABLE_PREFIX_SHORT);
56
+
57
+ .#{$TABLE_PREFIX} {
58
+ border-collapse: collapse;
59
+ border-spacing: 0;
60
+
61
+ thead,
62
+ .thead {
63
+ position: relative;
64
+ margin-bottom:2rem;
65
+ }
66
+
67
+ &.#{$prefix_short}-head thead tr th {
68
+ background-color: #{table_bg_color_head};
69
+ }
70
+
71
+ thead tr th,
72
+ .thead .tr .th {
73
+ padding: 0.5rem 0.25rem;
74
+ font-weight: normal;
75
+ }
76
+
77
+ tbody tr td,
78
+ .tbody .tr .td {
79
+ padding: 0.25em;
80
+ }
81
+
82
+ &.#{$prefix_short}-layout {
83
+ table-layout: fixed;
84
+ }
85
+
86
+ &.#{$prefix_short}-h-line {
87
+
88
+ th,
89
+ td,
90
+ .th,
91
+ .td {
92
+ border-bottom: 1px solid #{$table_border_color_main};
93
+ }
94
+
95
+ &:last-child {
96
+ border-bottom: none;
97
+ }
98
+ }
99
+
100
+ &.#{$prefix_short}-v-line tr th,
101
+ &.#{$prefix_short}-v-line tr td {
102
+ border-right: 1px solid #{$table_border_color_main};
103
+
104
+ &:last-child {
105
+ border-right: none;
106
+ }
107
+ }
108
+
109
+ &.#{$prefix_short}-border {
110
+ border: 1px solid #{$table_border_color_main};
111
+ }
112
+
113
+ &.#{$prefix_short}-shad {
114
+ thead tr th {
115
+ box-shadow: 4px 4px 8px #ccc;
116
+ z-index: 11;
117
+
118
+ &:last-child {
119
+ box-shadow: 4px 4px 8px #ccc;
120
+ z-index: -1;
121
+ }
122
+ }
123
+ }
124
+
125
+ @include bg-strip($prefix_short, 2);
126
+ @include bg-strip($prefix_short, 5);
127
+
128
+ @include sticky($prefix_short);
129
+ }
130
+ }
131
+
132
+ @mixin buildTable($mq_size_key: null) {
133
+ @include fabric_table($mq_size_key);
134
+ }
@@ -0,0 +1,30 @@
1
+ $table-metadata: (
2
+ title: table,
3
+ tag: table,
4
+ description: "cssfabric table module to set different table styles"
5
+ );
6
+ $table-config: (
7
+ className: table,
8
+ classNameShort: tbl,
9
+ table_class_name: table,
10
+ table_class_name_short: tbl,
11
+ table-bg-color-head: #f4f4f4,
12
+ table-bg-color-strip-main: #ededed,
13
+ table-bg-color-strip-second: #f5f5f5,
14
+ table-border-color-header: #ccc,
15
+ table-border-color-main: #ededed,
16
+ table-border-color-second: #f5f5f5
17
+ );
18
+
19
+ $table-docs: (
20
+ attributes:(
21
+ table: (
22
+ tag: table,
23
+ classNames:(
24
+ "_": (bg-strip-2 bg-strip-5),
25
+ "_pos": (sticky layout),
26
+ "_deco": (h-line v-line border),
27
+ ),
28
+ about: "is a table"
29
+ )
30
+ ));
@@ -0,0 +1,24 @@
1
+
2
+ // load scss config file
3
+ @use '../../_utils';
4
+ @use '_table-build' as build;
5
+ @use "../cssfabric-config";
6
+ // load general config variables
7
+ $config: cssfabric-config.$cssfabric-config;
8
+
9
+ // load general config variables
10
+ // media queries sizes, in rem
11
+ $_media_quey_sizes: map-get($config, media_quey_sizes);
12
+
13
+ // builder responsive
14
+ $min_value: 0;
15
+
16
+ @each $mq_size_key,
17
+ $mq_size_value in $_media_quey_sizes {
18
+
19
+ @include utils.fabricResponsiveEncloser($mq_size_value,$min_value) {
20
+ @include build.buildTable($mq_size_key);
21
+ }
22
+ $min_value: $mq_size_value;
23
+ }
24
+
@@ -0,0 +1,3 @@
1
+ @use '_table-build' as build;
2
+
3
+ @include build.buildTable();
@@ -0,0 +1,109 @@
1
+ @use 'text-vars';
2
+ @use "../cssfabric-config";
3
+ @use '../../_utils';
4
+ @use "sass:math";
5
+
6
+ // load general config variables
7
+ $cssfabric-config: cssfabric-config.$cssfabric-config;
8
+ $sep: map-get($cssfabric-config, sep);
9
+
10
+ $text-config: text-vars.$text-config;
11
+ $moduleName: map-get($text-config, moduleName);
12
+ $moduleNameShort: map-get($text-config, moduleNameShort);
13
+
14
+ $cssProps: map-get($text-config, cssProps);
15
+ $color-schemes: map-get($text-config, scheme);
16
+ $color-palette-props: map-get($text-config, palette);
17
+
18
+ $gray-list: map-get($text-config, gray);
19
+
20
+ $textTransform: map-get($cssProps, textTransform);
21
+ $fontWeight: map-get($cssProps, fontWeight);
22
+ $textAlign: map-get($cssProps, textAlign);
23
+
24
+ $font-size-unit-config: map-get($text-config, font-size-unit-config) !default;
25
+ $font-size-h-steps: map-get($text-config, title-size-declination-config) !default;
26
+ $font-size-h-max-config: map-get($text-config, font-sizes-h1-rem-config) !default;
27
+ $font-size-h-min-config: map-get($text-config, font-size-h-min-rem-config) !default;
28
+
29
+ $size-diff: $font-size-h-max-config - $font-size-h-min-config;
30
+ $steps: $font-size-h-steps - 1;
31
+
32
+ $step-size: math.div($size-diff, $steps);
33
+
34
+ @mixin fabric_text($tag_short) {
35
+
36
+ $acc: 1 - $step-size ;
37
+
38
+ .#{$tag_short}-ellipsis {
39
+ text-overflow: ellipsis;
40
+ overflow: hidden;
41
+ white-space: nowrap;
42
+ }
43
+
44
+ @for $size-index from 1 through $font-size-h-steps {
45
+ //
46
+ $acc: (( $font-size-h-steps - $size-index) * $step-size) + 1;
47
+
48
+ .h#{$size-index},
49
+ h#{$size-index} {
50
+ font-size: var(--font-size-h#{$size-index});
51
+ line-height: 1.2;
52
+ font-weight: 400;
53
+ }
54
+ }
55
+
56
+ .#{$tag_short} {
57
+ @each $fabricRule, $value in $textTransform {
58
+ @include utils.fabricAttributes("&" + $sep, $fabricRule, "text-transform", $value);
59
+ }
60
+
61
+ @each $fabricRule, $value in $textAlign {
62
+ @include utils.fabricAttributes("&" + $sep, $fabricRule, "text-align", $value);
63
+ }
64
+
65
+ @each $fabricRule, $value in $fontWeight {
66
+ @include utils.fabricAttributes("&" + $sep, $fabricRule, "font-weight", var(--font-weight-#{$fabricRule}));
67
+ }
68
+
69
+ // text shadows color_schemes
70
+ @each $fabricRule, $value in $color-schemes {
71
+ @include utils.fabricAttributes("&" + $sep + shad + $sep, $fabricRule, "text-shadow", var(--text-shadow-#{$fabricRule}));
72
+ }
73
+
74
+ // text shadows color_palette_props
75
+ @each $fabricRule, $value in $color-palette-props {
76
+ @include utils.fabricAttributes("&" + $sep+ shad + $sep, $fabricRule, "text-shadow", var(--text-shadow-#{$fabricRule}));
77
+ }
78
+ }
79
+ }
80
+
81
+ @mixin textCssVars() {
82
+ /*Hs*/
83
+ @for $size-index from 1 through $font-size-h-steps {
84
+ $acc: (( $font-size-h-steps - $size-index) * $step-size) + 1;
85
+ --font-size-h#{$size-index}: #{$acc + $font-size-unit-config};
86
+ }
87
+ /*weight*/
88
+ @each $fabricRule, $value in $fontWeight {
89
+ --font-weight-#{$fabricRule}: #{$value};
90
+ }
91
+ /*text shadows color_schemes*/
92
+ @each $fabricRule, $value in $color-schemes {
93
+ $cast-value: 0 0 0.125em #{$value};
94
+ --text-shadow-#{$fabricRule}: #{$cast-value};
95
+ }
96
+ /*text-shadows color_palette */
97
+ @each $fabricRule, $value in $color-palette-props {
98
+ $cast-value: 0 0 0.125em #{$value};
99
+ --text-shadow-#{$fabricRule}: #{$cast-value};
100
+ }
101
+ }
102
+
103
+
104
+ @mixin buildText($mq_size_key: null) {
105
+
106
+ $property_key: if($mq_size_key, #{$moduleNameShort}-#{$mq_size_key}, #{$moduleNameShort});
107
+
108
+ @include fabric_text($property_key);
109
+ }
@@ -0,0 +1,87 @@
1
+ @use '../../_utils';
2
+
3
+ $cssProps: (
4
+ text-transform: (
5
+ cap: capitalize,
6
+ up: uppercase,
7
+ low: lowercase,
8
+ none: none,
9
+ full: full-width
10
+ ),
11
+ font-weight: (
12
+ 50: 50,
13
+ 100: 100,
14
+ 300: 400,
15
+ 500: 500,
16
+ 900: 900,
17
+ light: lighter,
18
+ cap: normal,
19
+ bold: bold,
20
+ bolder: bolder
21
+ ),
22
+ text-align: (
23
+ l: left,
24
+ r: right,
25
+ center: center,
26
+ justify: justify
27
+ ),
28
+ text-shadow: (
29
+ palette:(primary, secondary)
30
+ )
31
+ );
32
+
33
+ $text-metadata: (
34
+ title: text,
35
+ tag: text,
36
+ description: "cssfabric text module to set text style on all html elements"
37
+ );
38
+
39
+ $text-config: (
40
+ moduleName: text,
41
+ moduleNameShort: text,
42
+ title-size-declination-config: 6,
43
+ font-size-unit-config: rem,
44
+ font-sizes-h1-rem-config: 3.1,
45
+ font-size-h-min-rem-config: 1,
46
+ text-ellipsis-tag-config: ellipsis,
47
+ cssProps: (
48
+ textTransform: (
49
+ cap: capitalize,
50
+ up: uppercase,
51
+ low: lowercase,
52
+ none: none,
53
+ full: full-width
54
+ ),
55
+ fontWeight: map-get($cssProps, "font-weight"),
56
+ textAlign: map-get($cssProps, "text-align")
57
+ ),
58
+ scheme: utils.get_fabric_conf(scheme),
59
+ palette: utils.get_fabric_conf(palette),
60
+ gray: utils.get_fabric_conf(gray)
61
+ );
62
+
63
+ $text-docs: (
64
+ attributes: (
65
+ text-transform: (
66
+ tag: text,
67
+ keys: utils.getObjectKeys(map-get($cssProps, text-transform))
68
+ ),
69
+ font-weight: (
70
+ tag: text,
71
+ keys: utils.getObjectKeys(map-get($cssProps, font-weight))
72
+ ),
73
+ text-align: (
74
+ tag: text,
75
+ keys: utils.getObjectKeys(map-get($cssProps, text-align))
76
+ ),
77
+ text-shadow: (
78
+ tag: text-shad,
79
+ keys: utils.getObjectKeys(map-get($cssProps, text-shadow))
80
+ )
81
+ ),
82
+ classNames: (
83
+ "_": (
84
+ et: "ellipsis"
85
+ )
86
+ )
87
+ );