@medyll/cssfabric 0.1.12 → 0.2.0

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 (196) hide show
  1. package/README.md +38 -240
  2. package/_generated/cssFabric.vars.json +13 -0
  3. package/{src/_generated → _generated}/export.variables.md +0 -0
  4. package/{src/_generated → _generated}/index.d.ts +0 -0
  5. package/{src/_generated → _generated}/readme.md +0 -0
  6. package/init/importCssVars.d.ts +1 -0
  7. package/init/importCssVars.js +2 -0
  8. package/package.json +113 -69
  9. package/{lib/scripts → scripts}/cssfabric.d.ts +0 -0
  10. package/scripts/cssfabric.js +43 -0
  11. package/{lib/scripts → scripts}/cssfabricClassNames.d.ts +0 -0
  12. package/{lib/scripts → scripts}/cssfabricClassNames.js +5 -9
  13. package/{src/scripts → scripts}/index.d.ts +0 -0
  14. package/scripts/index.js +4 -0
  15. package/{lib/scripts → scripts}/utils.d.ts +0 -0
  16. package/{lib/scripts → scripts}/utils.js +1 -3
  17. package/{lib/styles/core → styles}/animation/animation.css +0 -0
  18. package/{lib/styles/core → styles}/animation/animation.min.css +0 -0
  19. package/{lib/styles/core → styles}/base/base.css +0 -7
  20. package/styles/base/base.min.css +1 -0
  21. package/{lib/styles/core → styles}/box/box.css +127 -111
  22. package/styles/box/box.min.css +1 -0
  23. package/{lib/styles/core → styles}/box/box.responsive.css +508 -444
  24. package/styles/box/box.responsive.min.css +1 -0
  25. package/{lib/styles/core → styles}/color/color.css +0 -0
  26. package/styles/color/color.min.css +1 -0
  27. package/{lib/styles/core → styles}/color/color.responsive.css +0 -0
  28. package/styles/color/color.responsive.min.css +1 -0
  29. package/styles/cssfabric.css +61792 -0
  30. package/styles/cssfabric.min.css +168 -0
  31. package/styles/cssfabric.responsive.css +200596 -0
  32. package/styles/cssfabric.responsive.min.css +108 -0
  33. package/{lib/styles/core → styles}/flex/flex.css +0 -0
  34. package/styles/flex/flex.min.css +1 -0
  35. package/{lib/styles/core → styles}/flex/flex.responsive.css +0 -0
  36. package/styles/flex/flex.responsive.min.css +1 -0
  37. package/{lib/styles/core → styles}/grid/grid.css +0 -0
  38. package/styles/grid/grid.min.css +1 -0
  39. package/{lib/styles/core → styles}/grid/grid.responsive.css +0 -0
  40. package/styles/grid/grid.responsive.min.css +1 -0
  41. package/{lib/styles/core → styles}/menu/menu.css +16 -12
  42. package/styles/menu/menu.min.css +1 -0
  43. package/{lib/styles/core → styles}/menu/menu.responsive.css +64 -48
  44. package/styles/menu/menu.responsive.min.css +1 -0
  45. package/{lib/styles/core → styles}/overflow/overflow.css +0 -0
  46. package/{lib/styles/core → styles}/overflow/overflow.min.css +0 -0
  47. package/{lib/styles/core → styles}/overflow/overflow.responsive.css +0 -0
  48. package/styles/overflow/overflow.responsive.min.css +1 -0
  49. package/{lib/styles/core → styles}/scale/scale.css +0 -0
  50. package/{lib/styles/core → styles}/scale/scale.min.css +0 -0
  51. package/{lib/styles/core → styles}/scale/scale.responsive.css +0 -0
  52. package/styles/scale/scale.responsive.min.css +1 -0
  53. package/{lib/styles/core → styles}/table/table.css +0 -0
  54. package/styles/table/table.min.css +1 -0
  55. package/{lib/styles/core → styles}/table/table.responsive.css +0 -0
  56. package/styles/table/table.responsive.min.css +1 -0
  57. package/{lib/styles/core → styles}/text/text.css +0 -0
  58. package/styles/text/text.min.css +1 -0
  59. package/{lib/styles/core → styles}/text/text.responsive.css +0 -0
  60. package/styles/text/text.responsive.min.css +1 -0
  61. package/{lib/styles/core → styles}/theme/theme.css +0 -0
  62. package/{lib/styles/core → styles}/theme/theme.min.css +0 -0
  63. package/{lib/styles/core → styles}/vars.css +6 -2
  64. package/styles/vars.min.css +1 -0
  65. package/{lib/styles/core → styles}/zindex/zindex.css +0 -0
  66. package/{lib/styles/core → styles}/zindex/zindex.min.css +0 -0
  67. package/.idea/cssfabric.iml +0 -8
  68. package/.idea/misc.xml +0 -9
  69. package/.idea/modules.xml +0 -8
  70. package/.idea/vcs.xml +0 -6
  71. package/.vscode/settings.json +0 -24
  72. package/bin/index.js +0 -7
  73. package/cssfabric.config.js +0 -3
  74. package/cssfabric.json +0 -8
  75. package/gulpfile.js +0 -598
  76. package/lib/_generated/export.variables.json +0 -583
  77. package/lib/index.d.ts +0 -2
  78. package/lib/index.js +0 -7
  79. package/lib/scripts/cssfabric.js +0 -48
  80. package/lib/scripts/index.d.ts +0 -2
  81. package/lib/scripts/index.js +0 -6
  82. package/lib/styles/core/base/base.min.css +0 -1
  83. package/lib/styles/core/box/box.min.css +0 -1
  84. package/lib/styles/core/box/box.responsive.min.css +0 -1
  85. package/lib/styles/core/color/color.min.css +0 -1
  86. package/lib/styles/core/color/color.responsive.min.css +0 -1
  87. package/lib/styles/core/flex/flex.min.css +0 -1
  88. package/lib/styles/core/flex/flex.responsive.min.css +0 -1
  89. package/lib/styles/core/grid/grid.min.css +0 -1
  90. package/lib/styles/core/grid/grid.responsive.min.css +0 -1
  91. package/lib/styles/core/main.min.css +0 -1
  92. package/lib/styles/core/menu/menu.min.css +0 -1
  93. package/lib/styles/core/menu/menu.responsive.min.css +0 -1
  94. package/lib/styles/core/overflow/overflow.responsive.min.css +0 -1
  95. package/lib/styles/core/scale/scale.responsive.min.css +0 -1
  96. package/lib/styles/core/table/table.min.css +0 -1
  97. package/lib/styles/core/table/table.responsive.min.css +0 -1
  98. package/lib/styles/core/text/text.min.css +0 -1
  99. package/lib/styles/core/text/text.responsive.min.css +0 -1
  100. package/lib/styles/core/vars.min.css +0 -1
  101. package/lib/styles/core/vars2.css +0 -4
  102. package/lib/styles/core/vars2.min.css +0 -1
  103. package/lib/styles/cssfabric.css +0 -5147
  104. package/lib/styles/cssfabric.min.css +0 -16
  105. package/lib/styles/cssfabric.responsive.css +0 -16679
  106. package/lib/styles/cssfabric.responsive.min.css +0 -9
  107. package/src/_generated/export.variables.json +0 -759
  108. package/src/cssfabric/_utils.scss +0 -203
  109. package/src/cssfabric/index.d.ts +0 -3
  110. package/src/cssfabric/modules/_cssfabric-config.scss +0 -163
  111. package/src/cssfabric/modules/_mixins.scss +0 -1
  112. package/src/cssfabric/modules/animation/_animation-vars.scss +0 -17
  113. package/src/cssfabric/modules/animation/animation.scss +0 -3
  114. package/src/cssfabric/modules/base/_base-vars.scss +0 -19
  115. package/src/cssfabric/modules/base/base.scss +0 -80
  116. package/src/cssfabric/modules/box/_box-build.scss +0 -287
  117. package/src/cssfabric/modules/box/_box-vars.scss +0 -121
  118. package/src/cssfabric/modules/box/box-responsive.scss +0 -18
  119. package/src/cssfabric/modules/box/box.scss +0 -3
  120. package/src/cssfabric/modules/color/_color-build.scss +0 -196
  121. package/src/cssfabric/modules/color/_color-vars.scss +0 -80
  122. package/src/cssfabric/modules/color/color-responsive.scss +0 -23
  123. package/src/cssfabric/modules/color/color.scss +0 -9
  124. package/src/cssfabric/modules/css-fabric.scss +0 -2
  125. package/src/cssfabric/modules/flex/_flex-build.scss +0 -150
  126. package/src/cssfabric/modules/flex/_flex-vars.scss +0 -84
  127. package/src/cssfabric/modules/flex/flex-responsive.scss +0 -25
  128. package/src/cssfabric/modules/flex/flex.scss +0 -3
  129. package/src/cssfabric/modules/grid/_grid-build.scss +0 -84
  130. package/src/cssfabric/modules/grid/_grid-vars.scss +0 -88
  131. package/src/cssfabric/modules/grid/grid-responsive.scss +0 -25
  132. package/src/cssfabric/modules/grid/grid.scss +0 -6
  133. package/src/cssfabric/modules/menu/_menu-build.scss +0 -119
  134. package/src/cssfabric/modules/menu/_menu-vars.scss +0 -29
  135. package/src/cssfabric/modules/menu/menu-responsive.scss +0 -19
  136. package/src/cssfabric/modules/menu/menu.scss +0 -6
  137. package/src/cssfabric/modules/overflow/_overflow-build.scss +0 -22
  138. package/src/cssfabric/modules/overflow/_overflow-vars.scss +0 -31
  139. package/src/cssfabric/modules/overflow/overflow-responsive.scss +0 -25
  140. package/src/cssfabric/modules/overflow/overflow.scss +0 -7
  141. package/src/cssfabric/modules/scale/_scale-build.scss +0 -142
  142. package/src/cssfabric/modules/scale/_scale-vars.scss +0 -84
  143. package/src/cssfabric/modules/scale/scale-responsive.scss +0 -23
  144. package/src/cssfabric/modules/scale/scale.scss +0 -8
  145. package/src/cssfabric/modules/table/_table-build.scss +0 -134
  146. package/src/cssfabric/modules/table/_table-vars.scss +0 -30
  147. package/src/cssfabric/modules/table/table-responsive.scss +0 -24
  148. package/src/cssfabric/modules/table/table.scss +0 -8
  149. package/src/cssfabric/modules/text/_text-build.scss +0 -166
  150. package/src/cssfabric/modules/text/_text-vars.scss +0 -87
  151. package/src/cssfabric/modules/text/text-responsive.scss +0 -26
  152. package/src/cssfabric/modules/text/text.scss +0 -6
  153. package/src/cssfabric/modules/theme/_theme-build.scss +0 -90
  154. package/src/cssfabric/modules/theme/_theme-vars.scss +0 -46
  155. package/src/cssfabric/modules/theme/theme.scss +0 -6
  156. package/src/cssfabric/modules/vars.scss +0 -49
  157. package/src/cssfabric/modules/zindex/_zindex-vars.scss +0 -14
  158. package/src/cssfabric/modules/zindex/zindex.scss +0 -15
  159. package/src/index.d.ts +0 -3
  160. package/src/index.ts +0 -4
  161. package/src/scripts/cssfabric.ts +0 -54
  162. package/src/scripts/cssfabricClassNames.ts +0 -216
  163. package/src/scripts/index.ts +0 -8
  164. package/src/scripts/utils.ts +0 -37
  165. package/src/vendor/index.d.ts +0 -3
  166. package/src/vendor/normalize/normalize.min.css +0 -2
  167. package/src/vendor/sass-json-export/CHANGELOG.md +0 -26
  168. package/src/vendor/sass-json-export/Gruntfile.js +0 -60
  169. package/src/vendor/sass-json-export/LICENSE +0 -20
  170. package/src/vendor/sass-json-export/README.md +0 -90
  171. package/src/vendor/sass-json-export/package.json +0 -60
  172. package/src/vendor/sass-json-export/stylesheets/encode/api/_json.scss +0 -26
  173. package/src/vendor/sass-json-export/stylesheets/encode/encode.scss +0 -17
  174. package/src/vendor/sass-json-export/stylesheets/encode/helpers/_quote.scss +0 -9
  175. package/src/vendor/sass-json-export/stylesheets/encode/mixins/_json.scss +0 -42
  176. package/src/vendor/sass-json-export/stylesheets/encode/types/_bool.scss +0 -7
  177. package/src/vendor/sass-json-export/stylesheets/encode/types/_color.scss +0 -8
  178. package/src/vendor/sass-json-export/stylesheets/encode/types/_list.scss +0 -14
  179. package/src/vendor/sass-json-export/stylesheets/encode/types/_map.scss +0 -15
  180. package/src/vendor/sass-json-export/stylesheets/encode/types/_null.scss +0 -7
  181. package/src/vendor/sass-json-export/stylesheets/encode/types/_number.scss +0 -8
  182. package/src/vendor/sass-json-export/stylesheets/encode/types/_string.scss +0 -8
  183. package/src/vendor/sass-json-export/stylesheets/sass-json-export.scss +0 -2
  184. package/src/vendor/sass-json-export/test/encode/_index.scss +0 -14
  185. package/src/vendor/sass-json-export/test/encode/api/_json.scss +0 -29
  186. package/src/vendor/sass-json-export/test/encode/helpers/_quote.scss +0 -6
  187. package/src/vendor/sass-json-export/test/encode/types/_bool.scss +0 -6
  188. package/src/vendor/sass-json-export/test/encode/types/_color.scss +0 -7
  189. package/src/vendor/sass-json-export/test/encode/types/_list.scss +0 -25
  190. package/src/vendor/sass-json-export/test/encode/types/_map.scss +0 -17
  191. package/src/vendor/sass-json-export/test/encode/types/_null.scss +0 -8
  192. package/src/vendor/sass-json-export/test/encode/types/_number.scss +0 -68
  193. package/src/vendor/sass-json-export/test/encode/types/_string.scss +0 -9
  194. package/src/vendor/sass-json-export/test/test.scss +0 -9
  195. package/tsconfig.json +0 -46
  196. package/webpack.config.js +0 -55
@@ -1,287 +0,0 @@
1
- @use "sass:map";
2
- @use "sass:math";
3
- @use '../../_utils';
4
- @use "../cssfabric-config";
5
- @use "box-vars" as box;
6
-
7
- $fabric-config: cssfabric-config.$cssfabric-config;
8
- $box-config: box.$box-config;
9
- $box-docs: box.$box-docs;
10
-
11
- $box-border-shorthands: box.$box-border-shorthands;
12
- $box-position-props: box.$box-position-shorthands;
13
- $box-display-props: box.$box-display-shorthands;
14
-
15
- $box-unit-config: box.$box-unit-config;
16
- $box-border-unit-config: box.$box-border-unit-config;
17
- $box-unit-size-config: box.$box-unit-size-config;
18
- $box-unit-border-size-config: box.$box-unit-border-size-config;
19
- $box-sizes-config: box.$box-sizes-config;
20
- $box-border-sizes-px-config: box.$box-sizes-border-config;
21
-
22
- $box-position-shorthand-config: cssfabric-config.$box-position-shorthand !default;
23
- $box-display-shorthand-config: cssfabric-config.$box-display-shorthand !default;
24
- $box-shadow-shorthand-config: cssfabric-config.$box-shadow-shorthand !default;
25
-
26
- $box-border-shorthand-config: cssfabric-config.$box-border-shorthand !default;
27
- $box-padding-shorthand-config: cssfabric-config.$box-padding-shorthand !default;
28
- $box-margin-shorthand-config: cssfabric-config.$box-margin-shorthand !default;
29
-
30
- $box-shadows-steps: box.$box-shadows-steps !default;
31
- $box-shadows-step-multiplier: box.$box-shadows-step-multiplier !default;
32
-
33
- $box-radius: cssfabric-config.$box-radius;
34
- $box-unit-presets: cssfabric-config.$box-unit-presets;
35
-
36
- $densities-ratios : cssfabric-config.$densities-ratios;
37
-
38
- // adding {border}-{r} shorthand css rule for .{border}-{r}-1
39
- @function raw_size_tag_rule($condition) {
40
- @if ($condition==1) {
41
- @return "&,";
42
- } @else {
43
- @return "";
44
- }
45
- }
46
-
47
- // support ratios
48
- // for paddings margins positions
49
- @mixin pmbCssVars() {
50
- $iterator: $box-sizes-config;
51
- @for $grid_size_value from 0 through $iterator {
52
- $css_size_value: ($grid_size_value * $box-unit-size-config) + $box-unit-config;
53
- --box-density-#{$grid_size_value} : #{$css_size_value};
54
- }
55
-
56
- // presets
57
- @each $preset, $preset-value in $box-unit-presets{
58
- $value: ($preset-value * $box-unit-size-config) + $box-unit-config;
59
- --box-density-preset-#{$preset}: #{$value};
60
- }
61
-
62
- // $ratios: tiny small medium large full
63
- @each $ratio, $val in $densities-ratios {
64
- [density=#{$ratio}] {
65
- @for $grid_size_value from 0 through $iterator {
66
- $css_size_value: (($grid_size_value * $box-unit-size-config)*$val) + $box-unit-config;
67
- --box-density-#{$grid_size_value} : #{$css_size_value};
68
- }
69
- // presets
70
- @each $preset, $preset-value in $box-unit-presets{
71
- $value: (($preset-value * $box-unit-size-config)*$val) + $box-unit-config;
72
- --box-density-preset-#{$preset}: #{$value};
73
- }
74
- }
75
- }
76
- }
77
-
78
- // border
79
- @mixin fabric-pmb($fabric_box_position_prop, $fabric_box_position_prop_short) {
80
- @each $fabric_box_pmb_side_shorthand, $rule in $box-border-shorthands {
81
-
82
- // remove _ if present
83
- $shorthand: if($fabric_box_pmb_side_shorthand== "_", "", -#{$fabric_box_pmb_side_shorthand});
84
-
85
- .#{$fabric_box_position_prop_short}#{$shorthand} {
86
-
87
- @for $grid_size_value from 1 through $box-border-sizes-px-config {
88
- $css_size_value: ($grid_size_value * $box-unit-border-size-config) + $box-border-unit-config;
89
- // css property name is aggregated with size value $i
90
-
91
- $computed_value: $css_size_value + " solid #ededed";
92
-
93
- #{raw_size_tag_rule($grid_size_value)} &-#{$grid_size_value} {
94
- @if length($rule) == 4 {
95
- #{$fabric_box_position_prop}: #{$computed_value};
96
- } @else {
97
-
98
- @each $rule_value in $rule {
99
- #{$fabric_box_position_prop}-#{$rule_value}: #{$computed_value};
100
- }
101
- }
102
- }
103
- }
104
- }
105
- }
106
- }
107
-
108
- // prop : ... margin | padding
109
- @mixin fabric-pm($fabric_box_position_prop, $fabric_box_position_prop_short) {
110
- @each $fabric_box_pmb_side_shorthand, $rule in $box-border-shorthands {
111
-
112
- $shorthand: if($fabric_box_pmb_side_shorthand== "_", "", -#{$fabric_box_pmb_side_shorthand});
113
-
114
- .#{$fabric_box_position_prop_short}#{$shorthand} {
115
-
116
- // presets
117
- @each $preset, $preset-value in $box-unit-presets{
118
- .#{$fabric_box_position_prop_short}#{$shorthand}-#{$preset}{
119
- #{$fabric_box_position_prop}: --box-density-preset-#{$preset};
120
- }
121
- }
122
-
123
- @for $grid_size_value from 1 through $box-sizes-config {
124
- $css_size_value: ($grid_size_value * $box-unit-size-config) + $box-unit-config;
125
- // css property name is aggregated with size value $i
126
-
127
- $computed_value: var(--box-density-#{$grid_size_value});
128
-
129
- #{raw_size_tag_rule($grid_size_value)} &-#{$grid_size_value} {
130
- @if length($rule) == 4 {
131
- #{$fabric_box_position_prop}: #{$computed_value};
132
- } @else {
133
- @each $rule_value in $rule {
134
- #{$fabric_box_position_prop}-#{$rule_value}: #{$computed_value};
135
- }
136
- }
137
- }
138
- }
139
- }
140
- }
141
- }
142
-
143
- // pmb as padding margin border property
144
- // padding-tiny padding-small padding
145
- @mixin padding-margin-border($mq_key) {
146
-
147
- $shorthand: if($mq_key, #{$box-margin-shorthand-config}-#{$mq_key}, #{$box-margin-shorthand-config});
148
- @include fabric-pm(margin, $shorthand);
149
-
150
- $shorthand: if($mq_key, #{$box-padding-shorthand-config}-#{$mq_key}, #{$box-padding-shorthand-config});
151
- @include fabric-pm(padding, $shorthand);
152
-
153
- $shorthand: if($mq_key, #{$box-border-shorthand-config}-#{$mq_key}, #{$box-border-shorthand-config});
154
- @include fabric-pmb(border, $shorthand);
155
-
156
- }
157
-
158
- // radius
159
- @mixin radius($mq_key) {
160
- $shorthand: if($mq_key, radius-#{$mq_key}, radius);
161
-
162
- /*radius*/
163
- @each $radius, $value in $box-radius {
164
- .#{$shorthand}-#{$radius} {
165
- border-radius: #{$value};
166
-
167
- &-t {
168
- border-top-left-radius: #{$value};
169
- border-top-right-radius: #{$value}
170
- }
171
-
172
- &-b {
173
- border-bottom-left-radius: #{$value};
174
- border-bottom-right-radius: #{$value}
175
- }
176
-
177
- &-l {
178
- border-top-left-radius: #{$value};
179
- border-bottom-left-radius: #{$value}
180
- }
181
-
182
- &-r {
183
- border-top-right-radius: #{$value};
184
- border-bottom-right-radius: #{$value}
185
- }
186
- }
187
- }
188
- }
189
-
190
- // placement property -- top-0/8
191
- @mixin placement($mq_key) {
192
- $shorthand: if($mq_key, #{$mq_key}-, '');
193
- $places: (top, right, bottom, left);
194
-
195
- /*placement*/
196
- @each $place in $places {
197
- @for $size from 0 through 8 {
198
- .#{$place}-#{$shorthand}#{$size} {
199
- #{$place}: var(--box-density-#{$size});
200
- }
201
- }
202
- }
203
- }
204
-
205
- // display property
206
- @mixin display($mq_key) {
207
-
208
- $shorthand: if($mq_key, #{$box-display-shorthand-config}-#{$mq_key}, #{$box-display-shorthand-config});
209
-
210
- @each $css-shorthand, $css-value in $box-display-props {
211
- // css property
212
- $prop_re: #{$shorthand}-#{$css-shorthand};
213
-
214
- .#{$prop_re} {
215
- display: $css-value;
216
- }
217
- }
218
- }
219
-
220
- // position property
221
- @mixin position($mq_key) {
222
- $shorthand: if($mq_key, #{$box-position-shorthand-config}-#{$mq_key}, #{$box-position-shorthand-config});
223
-
224
- @each $css-shorthand, $css-value in $box-position-props {
225
- // css property
226
- $prop_re: #{$shorthand}-#{$css-shorthand};
227
-
228
- .#{$prop_re} {
229
- position: $css-value;
230
- // if sticky
231
- @if sticky == $css-value {
232
- top: 0;
233
- margin-top: 0;
234
- }
235
- }
236
- }
237
- }
238
-
239
- @function buildShadowsValues($shadows_step:0) {
240
- $v_fact: 2.4;
241
- $h_fact: 1.16;
242
-
243
- $v_fact_2: 13.1;
244
- $h_fact_2: 4.3;
245
-
246
- $acc: 1;
247
-
248
- $acc: $acc * $shadows_step * 2;
249
- $v: $shadows_step * 2;
250
-
251
- $v_val: math.div($acc, $v_fact);
252
- $h_val: math.div($acc, $h_fact);
253
-
254
- $v_val_2: math.div($acc, $v_fact_2);
255
- $h_val_2: math.div($acc, $h_fact_2);
256
-
257
- @return 0 #{$v_val}px #{$h_val}px 0 rgb(0 0 0 / 15%), 0 #{$v_val_2}px #{$h_val_2}px 0 rgb(0 0 0 / 10%);
258
- }
259
-
260
- @mixin shadows($mq_key) {
261
- $shorthand: if($mq_key, #{$box-shadow-shorthand-config}-#{$mq_key}, #{$box-shadow-shorthand-config});
262
-
263
- @for $shadows_step from 1 through $box-shadows-steps {
264
-
265
- .#{$shorthand}-#{$shadows_step} {
266
- box-shadow: var(--box-#{$shorthand}-#{$shadows_step});
267
- }
268
- }
269
- }
270
-
271
- // css vars rendered in :root
272
- @mixin shadowsCssVars($mq_key:null) {
273
- $shorthand: if($mq_key, #{$box-shadow-shorthand-config}-#{$mq_key}, #{$box-shadow-shorthand-config});
274
-
275
- @for $shadows_step from 1 through $box-shadows-steps {
276
- --box-#{$shorthand}-#{$shadows_step}: #{buildShadowsValues($shadows_step)};
277
- }
278
- }
279
-
280
- @mixin buildBox($mq_key: null) {
281
- @include padding-margin-border($mq_key);
282
- @include display($mq_key);
283
- @include position($mq_key);
284
- @include placement($mq_key);
285
- @include radius($mq_key);
286
- @include shadows($mq_key);
287
- }
@@ -1,121 +0,0 @@
1
- @use '../../utils';
2
- @use "../cssfabric-config";
3
-
4
- $box-unit-config: rem;
5
- $box-border-unit-config: px;
6
- $box-unit-size-config: 0.5;
7
- $box-unit-border-size-config: 1;
8
-
9
- $box-sizes-config: 12;
10
- $box-sizes-border-config: 3;
11
-
12
- $box-shadows-steps: 5;
13
- $box-shadows-step-multiplier: 2;
14
-
15
- $_shadows-v_fact: 2.4;
16
- $_shadows-h_fact: 1.16;
17
-
18
- $_shadows-v_fact_2: 13.1;
19
- $_shadows-h_fact_2: 4.3;
20
-
21
- $shadow-factors: (
22
- v_fact:$_shadows-v_fact,
23
- h_fact:$_shadows-h_fact,
24
- v_fact_2:$_shadows-v_fact_2,
25
- h_fact_2:$_shadows-h_fact_2,
26
- )!default;
27
-
28
- $box-border-shorthands: (
29
- _: top bottom left right,
30
- t: top,
31
- b: bottom,
32
- l: left,
33
- r: right,
34
- all: top bottom left right,
35
- u: bottom left right,
36
- ii: left right,
37
- tb: top bottom
38
- )!default;
39
-
40
- $box-position-shorthands: (
41
- abs: absolute,
42
- rel: relative,
43
- stat: static,
44
- fix: fixed,
45
- sticky: sticky
46
- )!default;
47
-
48
- $box-display-shorthands: (
49
- block: block,
50
- none: none,
51
- inline: inline,
52
- block-inline: inline-block,
53
- flex-inline: inline-flex,
54
- tbl: table,
55
- tbl-row: table-row,
56
- tbl-cell: table-cell,
57
- tbl-column: table-column
58
- );
59
-
60
- $box-metadata: (
61
- title: "box",
62
- tag: "box",
63
- description: "cssfabric box module to set heights, paddings, margins and shadows on all html elements"
64
- );
65
-
66
- $box-config: (
67
- unit-config: $box-unit-config,
68
- border-unit-config: $box-border-unit-config,
69
- unit-size-config: $box-unit-size-config,
70
- unit-border-size-config: $box-unit-border-size-config,
71
- sizes-config: $box-sizes-config,
72
- border-sizes-px-config: $box-sizes-border-config,
73
- shadows-steps: $box-shadows-steps,
74
- shadows_step_multiplier: $box-shadows-step-multiplier,
75
- //
76
- position-shorthand-config: cssfabric-config.$box-position-shorthand,
77
- display-shorthand-config: cssfabric-config.$box-display-shorthand,
78
- shadow-shorthand-config:cssfabric-config.$box-shadow-shorthand,
79
- border-shorthand-config: cssfabric-config.$box-border-shorthand,
80
- padding-shorthand-config: cssfabric-config.$box-padding-shorthand,
81
- margin-shorthand-config: cssfabric-config.$box-margin-shorthand,
82
-
83
- cssProps:(
84
- borderShorthands: $box-border-shorthands,
85
- positionProps: $box-position-shorthands,
86
- displayProps: $box-display-shorthands
87
- )
88
- );
89
-
90
-
91
- $box-docs: (
92
- attributes:(
93
- padding: (
94
- tag: cssfabric-config.$box-padding-shorthand,
95
- keys: utils.getObjectKeys($box-border-shorthands),
96
- values: utils.getBoxIterator($box-sizes-config, $box-unit-config, $box-unit-size-config),
97
- levels: ("_":utils.getObjectKeys(utils.getBoxIterator($box-sizes-config, $box-unit-config, $box-unit-size-config))),
98
- about: "padding properties for html elements"
99
- ),
100
- margin: (
101
- tag: cssfabric-config.$box-margin-shorthand,
102
- keys: utils.getObjectKeys($box-border-shorthands),
103
- values: utils.getBoxIterator($box-sizes-config, $box-unit-config, $box-unit-size-config),
104
- levels: ("_":utils.getObjectKeys(utils.getBoxIterator($box-sizes-config, $box-unit-config, $box-unit-size-config))),
105
- about: "margin properties for html elements"
106
- ),
107
- border: (
108
- tag: cssfabric-config.$box-border-shorthand,
109
- keys: utils.getObjectKeys($box-border-shorthands),
110
- values: utils.getBoxIterator($box-sizes-border-config, $box-border-unit-config, $box-unit-border-size-config),
111
- levels: ("_":utils.getObjectKeys(utils.getBoxIterator($box-sizes-border-config, $box-border-unit-config, $box-unit-border-size-config))),
112
- about: "border properties for html elements"
113
- ),
114
- shadow: (
115
- tag: cssfabric-config.$box-shadow-shorthand,
116
- values: utils.getShadowIterator($shadow-factors, $box-shadows-steps),
117
- levels:("_": utils.getObjectKeys(utils.getShadowIterator($shadow-factors, $box-shadows-steps))
118
- ),
119
- about: "applying shadows give depth and levels to your design"
120
- )
121
- ));
@@ -1,18 +0,0 @@
1
-
2
- @use '../../_utils';
3
- @use "_box-build" as build;
4
- @use "../cssfabric-config";
5
- // load general config variables
6
- $config: cssfabric-config.$cssfabric-config;
7
-
8
- $_media_quey_sizes: map-get($config, media_quey_sizes);
9
-
10
- // responsive builder here
11
- $min_value: 0;
12
-
13
- @each $mq_size_key, $mq_size_value in $_media_quey_sizes {
14
- @include utils.fabricResponsiveEncloser($mq_size_value, $min_value) {
15
- @include build.buildBox($mq_size_key);
16
- }
17
- $min_value: $mq_size_value;
18
- }
@@ -1,3 +0,0 @@
1
- @use "_box-build" as build;
2
-
3
- @include build.buildBox();
@@ -1,196 +0,0 @@
1
- @use "sass:map";
2
- @use 'color-vars';
3
- @use "sass:math";
4
- // load scss config file
5
- @use '../../_utils';
6
- @use '../cssfabric-config';
7
-
8
- $color-config: color-vars.$color-config;
9
-
10
- // COLOR TYPES
11
- $color-types-config: map-get($color-config, color-types-config);
12
- // COLOR SCHEMES
13
- $color-schemes: map-get($color-config, scheme) !default;
14
- // COLOR PALETTE
15
- $color-palette: map-get($color-config, palette) !default;
16
- // COLOR THEME
17
- $color-theme: map-get($color-config, theme) !default;
18
-
19
-
20
- // GRAYS
21
- $color-gray-start: cssfabric-config.$gray-start !default;
22
- $color-gray-end: cssfabric-config.$gray-end !default;
23
- $color-gray-steps: cssfabric-config.$gray-steps !default;
24
- $gray-schemes: utils.getGraySteps($color-gray-steps, $color-gray-start, $color-gray-end);
25
-
26
-
27
-
28
-
29
-
30
- @function text-contrast($n) {
31
- $color-brightness: round((red($n) * 299) + (green($n) * 587) + math.div(blue(#ffffff) * 114, 1000));
32
- $light-color: round((red(#ffffff) * 299) + (green(#ffffff) * 587) + math.div(blue(#ffffff) * 114, 1000));
33
- $color: black;
34
-
35
- @if abs($color-brightness) < math.div($light-color,2) {
36
- $color: white;
37
- }
38
-
39
- @return $color;
40
- }
41
-
42
- @mixin buildColorCssVars() {
43
-
44
- /* color-scheme primary secondary tertiary */
45
- @each $type-key, $type-prop in $color-schemes {
46
- --color-scheme-#{$type-key} : #{$type-prop};
47
- --color-scheme-#{$type-key}-light: #{utils.applyColorEffect('light',$type-prop)};
48
- --color-scheme-#{$type-key}-dark: #{utils.applyColorEffect('dark',$type-prop)};
49
- @include utils.alphaTize(--color-scheme-#{$type-key}, $type-prop);
50
- }
51
-
52
- /* color-palette */
53
- @each $type-key, $type-prop in $color-palette {
54
- --color-palette-#{$type-key} : #{$type-prop};
55
- @include utils.alphaTize(--color-palette-#{$type-key}, $type-prop);
56
-
57
- --color-palette-#{$type-key}-lighter: #{utils.applyColorEffect('lighter',$type-prop)};
58
- --color-palette-#{$type-key}-light: #{utils.applyColorEffect('light',$type-prop)};
59
- --color-palette-#{$type-key}-dark: #{utils.applyColorEffect('dark',$type-prop)};
60
- --color-palette-#{$type-key}-darker: #{utils.applyColorEffect('darker',$type-prop)};
61
-
62
- --color-palette-#{$type-key}-complement: #{utils.applyColorEffect('complement',$type-prop)};
63
- @include utils.alphaTize(--color-palette-#{$type-key}-complement, utils.applyColorEffect('complement', $type-prop));
64
-
65
- --color-palette-#{$type-key}-invert: #{utils.applyColorEffect('invert',$type-prop)};
66
- @include utils.alphaTize(--color-palette-#{$type-key}-invert, utils.applyColorEffect('invert', $type-prop));
67
- // backdrop-filter: blur(5px);
68
- }
69
-
70
- /* grays */
71
- @each $type-key, $type-prop in $gray-schemes {
72
- --color-gray-#{$type-key} : #{$type-prop};
73
- @include utils.alphaTize(--color-gray-#{$type-key}, $type-prop);
74
- }
75
- }
76
-
77
- @mixin colorFactory($tag_short, $color_prop) {
78
- $switch-tag_short: utils.getColorPropertyType($tag_short);
79
-
80
- @each $colorTint in (light lighter dark darker complement invert) {
81
-
82
- $newColor: utils.applyColorEffect($colorTint, $color_prop);
83
-
84
- &-#{$colorTint} {
85
- @if $tag_short== "bg-themed" {
86
- color: text-contrast($newColor);
87
- }
88
- #{$switch-tag_short}: $newColor;
89
- }
90
- }
91
- }
92
-
93
- @mixin fabricColors($color-type,$color-type-list, $color-type-key, $mq-key, $has-color-factory:null) {
94
-
95
- $switch-tag_short: utils.getColorPropertyType($color-type-key);
96
-
97
- $prop: "";
98
-
99
- $property_key: #{$color-type-key}-#{$color-type} + if($mq-key, -#{$mq-key}, "");
100
-
101
-
102
- .#{$property_key} {
103
- @each $type-key, $type-prop in $color-type-list {
104
- &#{"-" + $type-key} {
105
-
106
- // border-color: ;
107
- @if $color-type-key==border-color {
108
- border-color: utils.applyColorEffect('dark', $type-prop) !important;
109
- }
110
-
111
- @if $color-type-key==foreground {
112
- color: $type-prop;
113
- @if $has-color-factory {
114
- @include colorFactory($color-type-key, $type-prop);
115
- }
116
- }
117
-
118
- @if $color-type-key==bg {
119
- background-color: $type-prop;
120
- @if $has-color-factory {
121
- @include colorFactory($color-type-key, $type-prop);
122
- }
123
- }
124
-
125
- @if $color-type-key == "bg-themed" {
126
- color: text-contrast($type-prop);
127
- text-shadow: 0 0 0.125rem utils.applyColorEffect("dark", $type-prop);
128
- background-color: $type-prop;
129
- @if $has-color-factory {
130
- @include colorFactory($color-type-key, $type-prop);
131
- }
132
- }
133
- }
134
- }
135
- }
136
- }
137
-
138
- @mixin buildColor($mq_size_key:null) {
139
- // "foreground" ,
140
- // "bg",
141
- // "bg-themed",
142
- // "border-color"
143
-
144
- // $has-color-palette
145
- @if ((cssfabric-config.$has-color-palette==true) or ($mq_size_key!=null and cssfabric-config.$has-color-palette-responsive==true)) {
146
- // $has-color-foreground
147
- @if (cssfabric-config.$has-color-foreground) {
148
- @include fabricColors("palette", $color-palette, foreground, $mq_size_key, true);
149
- }
150
- // $has-color-bg
151
- @if (cssfabric-config.$has-color-bg) {
152
- @include fabricColors("palette", $color-palette, bg, $mq_size_key, true);
153
- }
154
- // $has-color-bg-themed
155
- @if (cssfabric-config.$has-color-bg-themed) {
156
- @include fabricColors("palette", $color-palette, bg-themed, $mq_size_key, true);
157
- }
158
- // $has-color-border
159
- @if (cssfabric-config.$has-color-border) {
160
- @include fabricColors("palette", $color-palette, border-color, $mq_size_key, true);
161
- }
162
- }
163
-
164
- // $has-color-scheme
165
- @if ((cssfabric-config.$has-color-scheme==true) or ($mq_size_key!=null and cssfabric-config.$has-color-scheme-responsive==true)) {
166
- @if (cssfabric-config.$has-color-foreground) {
167
- @include fabricColors("scheme", $color-schemes, foreground, $mq_size_key, true);
168
- }
169
- @if (cssfabric-config.$has-color-bg) {
170
- @include fabricColors("scheme", $color-schemes, bg, $mq_size_key, true);
171
- }
172
- @if (cssfabric-config.$has-color-bg-themed) {
173
- @include fabricColors("palette", $color-schemes, bg-themed, $mq_size_key, true);
174
- }
175
- @if (cssfabric-config.$has-color-border) {
176
- @include fabricColors("scheme", $color-schemes, border-color, $mq_size_key);
177
- }
178
- }
179
-
180
- // $has-color-gray
181
- @if ((cssfabric-config.$has-color-gray==true) or ($mq_size_key!=null and cssfabric-config.$has-color-gray-responsive==true)) {
182
- @if (cssfabric-config.$has-color-foreground) {
183
- @include fabricColors("grey", $gray-schemes, foreground, $mq_size_key, true);
184
- }
185
- @if (cssfabric-config.$has-color-bg) {
186
- @include fabricColors("grey", $gray-schemes, bg, $mq_size_key, true);
187
- }
188
- @if (cssfabric-config.$has-color-bg-themed) {
189
- @include fabricColors("palette", $gray-schemes, bg-themed, $mq_size_key, true);
190
- }
191
- @if (cssfabric-config.$has-color-border) {
192
- @include fabricColors("grey", $gray-schemes, border-color, $mq_size_key);
193
- }
194
- }
195
-
196
- }