@medyll/cssfabric 0.2.0 → 0.2.3

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 (211) hide show
  1. package/.github/workflows/main.yml +33 -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/bin/index.js +8 -0
  8. package/cssfabric.sass.js +8 -0
  9. package/gulpfile.js +532 -0
  10. package/package.json +17 -61
  11. package/src/app.css +107 -0
  12. package/src/app.d.ts +15 -0
  13. package/src/app.html +13 -0
  14. package/src/components/Header.svelte +17 -0
  15. package/src/components/HeaderSiteTitle.svelte +12 -0
  16. package/src/components/InnerMenu.svelte +27 -0
  17. package/src/components/SubHeader.svelte +10 -0
  18. package/src/components/SubHeaderH.svelte +3 -0
  19. package/src/components/SubSubHeader.svelte +22 -0
  20. package/src/components/demo/DemoElement.svelte +86 -0
  21. package/src/components/demo/elements/DemoElementBackgroundColor.svelte +7 -0
  22. package/src/components/demo/elements/DemoElementBorder.svelte +8 -0
  23. package/src/components/demo/elements/DemoElementBorderColor.svelte +8 -0
  24. package/src/components/demo/elements/DemoElementColor.svelte +8 -0
  25. package/src/components/demo/elements/DemoElementGrid.svelte +53 -0
  26. package/src/components/demo/elements/DemoElementMargin.svelte +8 -0
  27. package/src/components/demo/elements/DemoElementPadding.svelte +10 -0
  28. package/src/components/demo/elements/DemoElementScale.svelte +9 -0
  29. package/src/components/demo/elements/DemoElementTable.svelte +34 -0
  30. package/src/components/demo/elements/DemoElementText.svelte +10 -0
  31. package/src/components/demo/proxy/ProxyDsp.svelte +12 -0
  32. package/src/components/demo/proxy/ProxyDspArray.svelte +19 -0
  33. package/src/components/demo/proxy/ProxyDspObject.svelte +17 -0
  34. package/src/components/docs/Docs.svelte +97 -0
  35. package/src/components/docs/DocsClassNames.svelte +34 -0
  36. package/src/components/docs/DocsDemo.svelte +84 -0
  37. package/src/components/header/Header.svelte +105 -0
  38. package/src/components/header/svelte-logo.svg +1 -0
  39. package/src/cssfabric/_utils.scss +203 -0
  40. package/{_generated → src/cssfabric}/index.d.ts +0 -0
  41. package/src/cssfabric/modules/_cssfabric-config.scss +173 -0
  42. package/src/cssfabric/modules/_mixins.scss +1 -0
  43. package/src/cssfabric/modules/animation/_animation-vars.scss +17 -0
  44. package/src/cssfabric/modules/animation/animation.scss +3 -0
  45. package/src/cssfabric/modules/base/_base-vars.scss +19 -0
  46. package/src/cssfabric/modules/base/base.scss +75 -0
  47. package/src/cssfabric/modules/box/_box-build.scss +304 -0
  48. package/src/cssfabric/modules/box/_box-vars.scss +121 -0
  49. package/src/cssfabric/modules/box/box-responsive.scss +18 -0
  50. package/src/cssfabric/modules/box/box.scss +3 -0
  51. package/src/cssfabric/modules/color/_color-build.scss +196 -0
  52. package/src/cssfabric/modules/color/_color-vars.scss +80 -0
  53. package/src/cssfabric/modules/color/color-responsive.scss +23 -0
  54. package/src/cssfabric/modules/color/color.scss +9 -0
  55. package/src/cssfabric/modules/css-fabric.scss +2 -0
  56. package/src/cssfabric/modules/flex/_flex-build.scss +150 -0
  57. package/src/cssfabric/modules/flex/_flex-vars.scss +84 -0
  58. package/src/cssfabric/modules/flex/flex-responsive.scss +25 -0
  59. package/src/cssfabric/modules/flex/flex.scss +3 -0
  60. package/src/cssfabric/modules/grid/_grid-build.scss +84 -0
  61. package/src/cssfabric/modules/grid/_grid-vars.scss +88 -0
  62. package/src/cssfabric/modules/grid/grid-responsive.scss +25 -0
  63. package/src/cssfabric/modules/grid/grid.scss +6 -0
  64. package/src/cssfabric/modules/menu/_menu-build.scss +120 -0
  65. package/src/cssfabric/modules/menu/_menu-vars.scss +29 -0
  66. package/src/cssfabric/modules/menu/menu-responsive.scss +19 -0
  67. package/src/cssfabric/modules/menu/menu.scss +6 -0
  68. package/src/cssfabric/modules/overflow/_overflow-build.scss +22 -0
  69. package/src/cssfabric/modules/overflow/_overflow-vars.scss +31 -0
  70. package/src/cssfabric/modules/overflow/overflow-responsive.scss +25 -0
  71. package/src/cssfabric/modules/overflow/overflow.scss +7 -0
  72. package/src/cssfabric/modules/scale/_scale-build.scss +142 -0
  73. package/src/cssfabric/modules/scale/_scale-vars.scss +84 -0
  74. package/src/cssfabric/modules/scale/scale-responsive.scss +23 -0
  75. package/src/cssfabric/modules/scale/scale.scss +8 -0
  76. package/src/cssfabric/modules/table/_table-build.scss +134 -0
  77. package/src/cssfabric/modules/table/_table-vars.scss +30 -0
  78. package/src/cssfabric/modules/table/table-responsive.scss +24 -0
  79. package/src/cssfabric/modules/table/table.scss +8 -0
  80. package/src/cssfabric/modules/text/_text-build.scss +166 -0
  81. package/src/cssfabric/modules/text/_text-vars.scss +87 -0
  82. package/src/cssfabric/modules/text/text-responsive.scss +26 -0
  83. package/src/cssfabric/modules/text/text.scss +6 -0
  84. package/src/cssfabric/modules/theme/_theme-build.scss +133 -0
  85. package/src/cssfabric/modules/theme/_theme-vars.scss +46 -0
  86. package/src/cssfabric/modules/theme/theme.scss +6 -0
  87. package/src/cssfabric/modules/vars.scss +49 -0
  88. package/src/cssfabric/modules/zindex/_zindex-vars.scss +14 -0
  89. package/src/cssfabric/modules/zindex/zindex.scss +15 -0
  90. package/src/hooks.ts +27 -0
  91. package/src/index.d.ts +3 -0
  92. package/src/index.ts +4 -0
  93. package/{_generated → src/lib/_generated}/cssFabric.vars.json +1 -1
  94. package/{_generated → src/lib/_generated}/export.variables.md +0 -0
  95. package/src/lib/_generated/index.d.ts +3 -0
  96. package/{_generated → src/lib/_generated}/readme.md +0 -0
  97. package/{init/importCssVars.js → src/lib/init/importCssVars.ts} +3 -2
  98. package/src/lib/scripts/cssfabric.ts +54 -0
  99. package/{scripts/cssfabricClassNames.js → src/lib/scripts/cssfabricClassNames.ts} +112 -42
  100. package/{scripts → src/lib/scripts}/index.d.ts +0 -0
  101. package/src/lib/scripts/index.ts +8 -0
  102. package/src/lib/scripts/utils.ts +37 -0
  103. package/{styles → src/lib/styles}/animation/animation.css +0 -0
  104. package/{styles → src/lib/styles}/animation/animation.min.css +0 -0
  105. package/{styles → src/lib/styles}/base/base.css +0 -0
  106. package/{styles → src/lib/styles}/base/base.min.css +0 -0
  107. package/{styles → src/lib/styles}/box/box.css +0 -0
  108. package/{styles → src/lib/styles}/box/box.min.css +0 -0
  109. package/{styles → src/lib/styles}/box/box.responsive.css +0 -0
  110. package/{styles → src/lib/styles}/box/box.responsive.min.css +0 -0
  111. package/{styles → src/lib/styles}/color/color.css +0 -0
  112. package/{styles → src/lib/styles}/color/color.min.css +0 -0
  113. package/{styles → src/lib/styles}/color/color.responsive.css +0 -0
  114. package/{styles → src/lib/styles}/color/color.responsive.min.css +0 -0
  115. package/src/lib/styles/cssfabric.css +129144 -0
  116. package/src/lib/styles/cssfabric.min.css +350 -0
  117. package/src/lib/styles/cssfabric.responsive.css +418463 -0
  118. package/src/lib/styles/cssfabric.responsive.min.css +225 -0
  119. package/{styles → src/lib/styles}/flex/flex.css +0 -0
  120. package/{styles → src/lib/styles}/flex/flex.min.css +0 -0
  121. package/{styles → src/lib/styles}/flex/flex.responsive.css +0 -0
  122. package/{styles → src/lib/styles}/flex/flex.responsive.min.css +0 -0
  123. package/{styles → src/lib/styles}/grid/grid.css +0 -0
  124. package/{styles → src/lib/styles}/grid/grid.min.css +0 -0
  125. package/{styles → src/lib/styles}/grid/grid.responsive.css +0 -0
  126. package/{styles → src/lib/styles}/grid/grid.responsive.min.css +0 -0
  127. package/{styles → src/lib/styles}/menu/menu.css +0 -0
  128. package/{styles → src/lib/styles}/menu/menu.min.css +0 -0
  129. package/{styles → src/lib/styles}/menu/menu.responsive.css +0 -0
  130. package/{styles → src/lib/styles}/menu/menu.responsive.min.css +0 -0
  131. package/{styles → src/lib/styles}/overflow/overflow.css +0 -0
  132. package/{styles → src/lib/styles}/overflow/overflow.min.css +0 -0
  133. package/{styles → src/lib/styles}/overflow/overflow.responsive.css +0 -0
  134. package/{styles → src/lib/styles}/overflow/overflow.responsive.min.css +0 -0
  135. package/{styles → src/lib/styles}/scale/scale.css +0 -0
  136. package/{styles → src/lib/styles}/scale/scale.min.css +0 -0
  137. package/{styles → src/lib/styles}/scale/scale.responsive.css +0 -0
  138. package/{styles → src/lib/styles}/scale/scale.responsive.min.css +0 -0
  139. package/{styles → src/lib/styles}/table/table.css +0 -0
  140. package/{styles → src/lib/styles}/table/table.min.css +0 -0
  141. package/{styles → src/lib/styles}/table/table.responsive.css +0 -0
  142. package/{styles → src/lib/styles}/table/table.responsive.min.css +0 -0
  143. package/{styles → src/lib/styles}/text/text.css +0 -0
  144. package/{styles → src/lib/styles}/text/text.min.css +0 -0
  145. package/{styles → src/lib/styles}/text/text.responsive.css +0 -0
  146. package/{styles → src/lib/styles}/text/text.responsive.min.css +0 -0
  147. package/{styles → src/lib/styles}/theme/theme.css +48 -0
  148. package/{styles → src/lib/styles}/theme/theme.min.css +1 -1
  149. package/{styles → src/lib/styles}/vars.css +1 -1
  150. package/{styles → src/lib/styles}/vars.min.css +0 -0
  151. package/{styles → src/lib/styles}/zindex/zindex.css +0 -0
  152. package/{styles → src/lib/styles}/zindex/zindex.min.css +0 -0
  153. package/src/routes/__layout.svelte +91 -0
  154. package/src/routes/cssfabric-modules/[module]/__layout.svelte +75 -0
  155. package/src/routes/cssfabric-modules/[module]/classnames/index.svelte +24 -0
  156. package/src/routes/cssfabric-modules/[module]/demo/index.svelte +24 -0
  157. package/src/routes/cssfabric-modules/[module]/docs/index.svelte +30 -0
  158. package/src/routes/cssfabric-modules/[module]/index.svelte +3 -0
  159. package/src/routes/cssfabric-modules/__layout.svelte +26 -0
  160. package/src/routes/cssfabric-modules/index.svelte +0 -0
  161. package/src/routes/index.svelte +62 -0
  162. package/src/routes/installation/__layout.svelte +1 -0
  163. package/src/routes/installation/index.svelte +28 -0
  164. package/src/scripts/utils.ts +26 -0
  165. package/src/utils.ts +71 -0
  166. package/src/vendor/index.d.ts +3 -0
  167. package/src/vendor/normalize/normalize.min.css +2 -0
  168. package/src/vendor/sass-json-export/CHANGELOG.md +26 -0
  169. package/src/vendor/sass-json-export/Gruntfile.js +60 -0
  170. package/src/vendor/sass-json-export/LICENSE +20 -0
  171. package/src/vendor/sass-json-export/README.md +90 -0
  172. package/src/vendor/sass-json-export/package.json +60 -0
  173. package/src/vendor/sass-json-export/stylesheets/encode/api/_json.scss +26 -0
  174. package/src/vendor/sass-json-export/stylesheets/encode/encode.scss +17 -0
  175. package/src/vendor/sass-json-export/stylesheets/encode/helpers/_quote.scss +9 -0
  176. package/src/vendor/sass-json-export/stylesheets/encode/mixins/_json.scss +42 -0
  177. package/src/vendor/sass-json-export/stylesheets/encode/types/_bool.scss +7 -0
  178. package/src/vendor/sass-json-export/stylesheets/encode/types/_color.scss +8 -0
  179. package/src/vendor/sass-json-export/stylesheets/encode/types/_list.scss +14 -0
  180. package/src/vendor/sass-json-export/stylesheets/encode/types/_map.scss +15 -0
  181. package/src/vendor/sass-json-export/stylesheets/encode/types/_null.scss +7 -0
  182. package/src/vendor/sass-json-export/stylesheets/encode/types/_number.scss +8 -0
  183. package/src/vendor/sass-json-export/stylesheets/encode/types/_string.scss +8 -0
  184. package/src/vendor/sass-json-export/stylesheets/sass-json-export.scss +2 -0
  185. package/src/vendor/sass-json-export/test/encode/_index.scss +14 -0
  186. package/src/vendor/sass-json-export/test/encode/api/_json.scss +29 -0
  187. package/src/vendor/sass-json-export/test/encode/helpers/_quote.scss +6 -0
  188. package/src/vendor/sass-json-export/test/encode/types/_bool.scss +6 -0
  189. package/src/vendor/sass-json-export/test/encode/types/_color.scss +7 -0
  190. package/src/vendor/sass-json-export/test/encode/types/_list.scss +25 -0
  191. package/src/vendor/sass-json-export/test/encode/types/_map.scss +17 -0
  192. package/src/vendor/sass-json-export/test/encode/types/_null.scss +8 -0
  193. package/src/vendor/sass-json-export/test/encode/types/_number.scss +68 -0
  194. package/src/vendor/sass-json-export/test/encode/types/_string.scss +9 -0
  195. package/src/vendor/sass-json-export/test/test.scss +9 -0
  196. package/static/favicon.png +0 -0
  197. package/static/robots.txt +3 -0
  198. package/svelte.config.js +25 -0
  199. package/tsconfig.json +3 -0
  200. package/webpack.config.js +55 -0
  201. package/init/importCssVars.d.ts +0 -1
  202. package/scripts/cssfabric.d.ts +0 -24
  203. package/scripts/cssfabric.js +0 -43
  204. package/scripts/cssfabricClassNames.d.ts +0 -14
  205. package/scripts/index.js +0 -4
  206. package/scripts/utils.d.ts +0 -5
  207. package/scripts/utils.js +0 -38
  208. package/styles/cssfabric.css +0 -61792
  209. package/styles/cssfabric.min.css +0 -168
  210. package/styles/cssfabric.responsive.css +0 -200596
  211. package/styles/cssfabric.responsive.min.css +0 -108
@@ -0,0 +1,97 @@
1
+ <script lang="ts">
2
+ import cssfabric from '../../lib/scripts/cssfabric';
3
+ import utils from '../../lib/scripts/utils';
4
+ import {htmlUtils} from '../../utils';
5
+ import 'svelte-highlight/styles/github.css';
6
+
7
+ export let module = '';
8
+ const moduleAttributes = cssfabric.getModuleDocsAttributes(module);
9
+
10
+ //$: console.log({module, moduleAttributes});
11
+
12
+ let toParseKeys =
13
+ ['keys',
14
+ 'levels',
15
+ 'levelsDeclin',
16
+ 'levelsLinked',
17
+ 'classNames'];
18
+
19
+ function tre(part: any) {
20
+
21
+ // if object, if array !!!
22
+ // console.log(part)
23
+ let out: any,
24
+ levelValues: any;
25
+
26
+ if (part && !Array.isArray(part) && typeof (part === 'object')) {
27
+
28
+
29
+ out = Object.keys(part).map((levelKey) => {
30
+ let levelValue = part[levelKey];
31
+
32
+ if (Array.isArray(levelValue)) {
33
+ levelValues = levelValue.map(x => `<div class="marg-r-4 w-2-min">${x}</div>`).join('');
34
+ }
35
+
36
+ return `<div class="flex flex-h">
37
+ <div class="color-gray-600 w-small marg-r-1 border-b pad">${levelKey} </div>
38
+ <div class="flex flex-h flex-wrap marg-l-2 pad ">${levelValues}</div>
39
+ </div>`;
40
+ }).join('');
41
+ } else {
42
+
43
+ switch (utils.isArrayOfTypes(part)) {
44
+ case 'strings':
45
+ case 'numbers':
46
+ out = `<div class="flex flex-h flex-wrap gap-tiny">` + part.map((x: string) => `<div class="pad">${x}</div>`).join('') + `</div>`;
47
+ break;
48
+ case 'arrays':
49
+ out = part.map((x: string[]) => x.join('')).map((x: any) => htmlUtils.enclose(x)).join('');
50
+ break;
51
+
52
+ }
53
+ }
54
+
55
+ return out;
56
+ }
57
+ </script>
58
+
59
+ <svelte:head>
60
+ <title>{module} cssfabric documentation</title>
61
+ </svelte:head>
62
+
63
+ <div>
64
+
65
+ <!--{@debug moduleAttributes}-->
66
+ {#each Object.entries(moduleAttributes) as [moduleAttribute, moduleAttributeModel]}
67
+
68
+ <div class={"pad-b-8"}>
69
+ <div class={"flex-h flex-inline border-b theme-border-primary align-middle cell-spacing marg-b-1"}>
70
+ <label>{moduleAttributeModel.tag}</label>
71
+ <div class={"text-400"}>{moduleAttribute}</div>
72
+ </div>
73
+ <div class={"color-gray-500 marg-b-2 pad-l-8 "}>
74
+ <div class={"dsp-inline pad-all-2"}>
75
+ {moduleAttributeModel.about}
76
+ </div>
77
+ </div>
78
+ <div class={"cell-spacing flex-main"}>
79
+ {#each toParseKeys as keyToParse}
80
+ {#if moduleAttributeModel?.[keyToParse]}
81
+ <div class={"flex marg-b-4"}>
82
+ <div class={"w-8 pad-l-4 border-l-4 text-900"}>
83
+ {keyToParse}:
84
+ </div>
85
+ <!--<div>
86
+ <HighlightAuto code={'tre(moduleAttributeModel?.[keyToParse])'} />
87
+ </div>-->
88
+ <div class={"marg-l-4"}>
89
+ {@html tre(moduleAttributeModel?.[keyToParse])}
90
+ </div>
91
+ </div>
92
+ {/if}
93
+ {/each}
94
+ </div>
95
+ </div>
96
+ {/each}
97
+ </div>
@@ -0,0 +1,34 @@
1
+ <script lang="ts">
2
+
3
+ import cssfabric from '../../lib/scripts/cssfabric';
4
+
5
+ export let module;
6
+ const moduleAttributes = cssfabric.getModuleDocsAttributes(module);
7
+
8
+ </script>
9
+
10
+ <div>
11
+ <div class={"flex-v flex-items-end pad-r-4"}>
12
+ <div class={"txt-800 border-b dsp-inline"}>
13
+ cssfabric classnames
14
+ </div>
15
+ <div class={"txt-gray-300 marg-b-1"}>
16
+ generated classnames
17
+ </div>
18
+ </div>
19
+ <div class={"pad"}>
20
+ {#each Object.keys(moduleAttributes) as moduleAttribute }
21
+ <div>
22
+ <h4 class={"pad-tb"}>{moduleAttribute}</h4>
23
+ <div class={"text-gray-400 pad-tb"}>
24
+ {`- cssfabric expressions list for css ${moduleAttribute} rules`}
25
+ </div>
26
+ <div class={"marg-b-8"}>
27
+ {#each cssfabric.getModuleClassNames.getModuleTagClassNames({module, moduleAttribute}) as className}
28
+ <div class={""}>.{className}</div>
29
+ {/each}
30
+ </div>
31
+ </div>
32
+ {/each}
33
+ </div>
34
+ </div>
@@ -0,0 +1,84 @@
1
+ <script lang='ts'>
2
+
3
+
4
+ import cssfabric from '../../lib/scripts/cssfabric';
5
+ import ProxyDsp from '../demo/proxy/ProxyDsp.svelte';
6
+
7
+ export let module = '';
8
+ const moduleAttributes = cssfabric.getModuleDocsAttributes(module);
9
+
10
+ let out;
11
+
12
+ function proxyDsp(val: any, moduleAttribute: any, moduleRule: string = 'default') {
13
+ if (Array.isArray(val)) {
14
+ return DspArray(val, moduleAttribute, moduleRule);
15
+ } else {
16
+ return dspObject(val, moduleAttribute, moduleRule);
17
+ }
18
+ }
19
+
20
+ function DspArray(val: any[], moduleAttribute: any, moduleRule: any) {
21
+ return `<div class={"marg-b-2"}>
22
+ <p class={"marg-b-2 pad-tb"}>cssfabric.${moduleRule} : ${moduleAttribute} classnames for cssfabric</p>
23
+ <div class={"flex-h flex-wrap cell-spacing"}>
24
+ ` + val.map((className, y) => {
25
+ /*return <DemoElement moduleAttribute={moduleAttribute} moduleRule={moduleRule}
26
+ cssFabricClassName={className}>
27
+ [{moduleAttribute}] .{class}
28
+ </DemoElement>*/
29
+ }) + `
30
+ </div>
31
+ </div>`;
32
+ }
33
+
34
+ function dspObject(val: Record<string, any>, moduleAttribute: any, moduleRule: any) {
35
+ return `<div>` +
36
+ Object.keys(val).map((moduleRule) => {
37
+ return `<div>
38
+ <h5 class={"pad-2 pad-r-8 dsp-block-inline border-b"}>${moduleRule}</h5>
39
+ <div class={"marg-l-4"}>` +
40
+ proxyDsp(val[moduleRule], moduleAttribute, moduleRule)
41
+ + `</div>
42
+ </div>`;
43
+ })
44
+ + `</div>`;
45
+ }
46
+
47
+ </script>
48
+ <div>
49
+ <!--<div class={"flex-v flex-items-end pad-r-8"}>
50
+ <div class={"txt-800 border-b dsp-inline"}>
51
+ cssfabric classnames
52
+ </div>
53
+ <div class={"txt-gray-300 marg-b-4"}>
54
+ generated examples
55
+ </div>
56
+ </div> -->
57
+
58
+ <div class="pad-8">
59
+
60
+ {#each Object.entries(moduleAttributes) as [moduleAttribute, moduleAttributeValues] }
61
+
62
+ <div class={"w-sm-full"}>
63
+ <h4 class={"border-l-2 pad-l-2"}>module {moduleAttribute}</h4>
64
+ <div class={"marg-l-4 text-gray-400 pad-tb"}>
65
+ {`- cssfabric demo for css ${moduleAttribute} rules`}
66
+ </div>
67
+ <div class={"marg-b-4 marg-l-4"}>
68
+ {#each [cssfabric.getModuleTagDebug({module, moduleAttribute})] as moduleDebug }
69
+ {#each Object.entries(moduleDebug) as [tag, debugTag]}
70
+ <div>
71
+ <h5>- {tag}</h5>
72
+ <div class={' marg-l-4'}>
73
+ <ProxyDsp val={debugTag} {moduleAttribute}/>
74
+ </div>
75
+ </div>
76
+ {/each}
77
+ {/each}
78
+ </div>
79
+ </div>
80
+ {/each}
81
+
82
+ })
83
+ </div>
84
+ </div>
@@ -0,0 +1,105 @@
1
+ <script lang="ts">
2
+ import logo from './svelte-logo.svg';
3
+ </script>
4
+
5
+ <header>
6
+ <div class="corner">
7
+ <a href="https://kit.svelte.dev">
8
+ <img src={logo} alt="SvelteKit" />
9
+ </a>
10
+ </div>
11
+
12
+ <nav>
13
+ </nav>
14
+
15
+ </header>
16
+
17
+ <style>
18
+ header {
19
+ display: flex;
20
+ justify-content: space-between;
21
+ }
22
+
23
+ .corner {
24
+ width: 3em;
25
+ height: 3em;
26
+ }
27
+
28
+ .corner a {
29
+ display: flex;
30
+ align-items: center;
31
+ justify-content: center;
32
+ width: 100%;
33
+ height: 100%;
34
+ }
35
+
36
+ .corner img {
37
+ width: 2em;
38
+ height: 2em;
39
+ object-fit: contain;
40
+ }
41
+
42
+ nav {
43
+ display: flex;
44
+ justify-content: center;
45
+ --background: rgba(255, 255, 255, 0.7);
46
+ }
47
+
48
+ svg {
49
+ width: 2em;
50
+ height: 3em;
51
+ display: block;
52
+ }
53
+
54
+ path {
55
+ fill: var(--background);
56
+ }
57
+
58
+ ul {
59
+ position: relative;
60
+ padding: 0;
61
+ margin: 0;
62
+ height: 3em;
63
+ display: flex;
64
+ justify-content: center;
65
+ align-items: center;
66
+ list-style: none;
67
+ background: var(--background);
68
+ background-size: contain;
69
+ }
70
+
71
+ li {
72
+ position: relative;
73
+ height: 100%;
74
+ }
75
+
76
+ li.active::before {
77
+ --size: 6px;
78
+ content: '';
79
+ width: 0;
80
+ height: 0;
81
+ position: absolute;
82
+ top: 0;
83
+ left: calc(50% - var(--size));
84
+ border: var(--size) solid transparent;
85
+ border-top: var(--size) solid var(--accent-color);
86
+ }
87
+
88
+ nav a {
89
+ display: flex;
90
+ height: 100%;
91
+ align-items: center;
92
+ padding: 0 1em;
93
+ color: var(--heading-color);
94
+ font-weight: 700;
95
+ font-size: 0.8rem;
96
+ text-transform: uppercase;
97
+ letter-spacing: 0.1em;
98
+ text-decoration: none;
99
+ transition: color 0.2s linear;
100
+ }
101
+
102
+ a:hover {
103
+ color: var(--accent-color);
104
+ }
105
+ </style>
@@ -0,0 +1 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" width="107" height="128" viewBox="0 0 107 128"><title>svelte-logo</title><path d="M94.1566,22.8189c-10.4-14.8851-30.94-19.2971-45.7914-9.8348L22.2825,29.6078A29.9234,29.9234,0,0,0,8.7639,49.6506a31.5136,31.5136,0,0,0,3.1076,20.2318A30.0061,30.0061,0,0,0,7.3953,81.0653a31.8886,31.8886,0,0,0,5.4473,24.1157c10.4022,14.8865,30.9423,19.2966,45.7914,9.8348L84.7167,98.3921A29.9177,29.9177,0,0,0,98.2353,78.3493,31.5263,31.5263,0,0,0,95.13,58.117a30,30,0,0,0,4.4743-11.1824,31.88,31.88,0,0,0-5.4473-24.1157" style="fill:#ff3e00"/><path d="M45.8171,106.5815A20.7182,20.7182,0,0,1,23.58,98.3389a19.1739,19.1739,0,0,1-3.2766-14.5025,18.1886,18.1886,0,0,1,.6233-2.4357l.4912-1.4978,1.3363.9815a33.6443,33.6443,0,0,0,10.203,5.0978l.9694.2941-.0893.9675a5.8474,5.8474,0,0,0,1.052,3.8781,6.2389,6.2389,0,0,0,6.6952,2.485,5.7449,5.7449,0,0,0,1.6021-.7041L69.27,76.281a5.4306,5.4306,0,0,0,2.4506-3.631,5.7948,5.7948,0,0,0-.9875-4.3712,6.2436,6.2436,0,0,0-6.6978-2.4864,5.7427,5.7427,0,0,0-1.6.7036l-9.9532,6.3449a19.0329,19.0329,0,0,1-5.2965,2.3259,20.7181,20.7181,0,0,1-22.2368-8.2427,19.1725,19.1725,0,0,1-3.2766-14.5024,17.9885,17.9885,0,0,1,8.13-12.0513L55.8833,23.7472a19.0038,19.0038,0,0,1,5.3-2.3287A20.7182,20.7182,0,0,1,83.42,29.6611a19.1739,19.1739,0,0,1,3.2766,14.5025,18.4,18.4,0,0,1-.6233,2.4357l-.4912,1.4978-1.3356-.98a33.6175,33.6175,0,0,0-10.2037-5.1l-.9694-.2942.0893-.9675a5.8588,5.8588,0,0,0-1.052-3.878,6.2389,6.2389,0,0,0-6.6952-2.485,5.7449,5.7449,0,0,0-1.6021.7041L37.73,51.719a5.4218,5.4218,0,0,0-2.4487,3.63,5.7862,5.7862,0,0,0,.9856,4.3717,6.2437,6.2437,0,0,0,6.6978,2.4864,5.7652,5.7652,0,0,0,1.602-.7041l9.9519-6.3425a18.978,18.978,0,0,1,5.2959-2.3278,20.7181,20.7181,0,0,1,22.2368,8.2427,19.1725,19.1725,0,0,1,3.2766,14.5024,17.9977,17.9977,0,0,1-8.13,12.0532L51.1167,104.2528a19.0038,19.0038,0,0,1-5.3,2.3287" style="fill:#fff"/></svg>
@@ -0,0 +1,203 @@
1
+ @use "sass:string";
2
+ @use "sass:map";
3
+ @use "sass:math";
4
+ @use "sass:color";
5
+
6
+ // load main fabric vars
7
+ @use 'modules/cssfabric-config' as cssfabric-config;
8
+
9
+ // link to fabric conf scss file, which often move ;)
10
+ @function get_fabric_conf($prop: null,$val: null) {
11
+ @if not $prop {
12
+ @return cssfabric-config.$cssfabric-config;
13
+ }
14
+ @if $prop and not $val {
15
+ @return map-get(cssfabric-config.$cssfabric-config, $prop);
16
+ }
17
+ @if $val {
18
+ $in: map-get(cssfabric-config.$cssfabric-config, $prop);
19
+ @return map-get($in, $prop, $val);
20
+ }
21
+ }
22
+
23
+ // css dimensions rules builder responsive
24
+ @mixin fabricResponsiveEncloser($mq_size_value, $mq_min_size_value: null) {
25
+ // and (min-width: $mq_min_size_value + rem)
26
+ // @debug $mq_size_value $mq_min_size_value;
27
+ $type-width: if($mq_size_value==180, max, max);
28
+ $width: if($mq_size_value==180, $mq_min_size_value, $mq_size_value);
29
+
30
+ // @debug (#{$type-width}-width: $width + rem) ;
31
+ @media only screen and (#{$type-width}-width: $width + px) {
32
+ @content;
33
+ }
34
+ }
35
+
36
+ @mixin fabricAttributes($sep, $frag, $property, $value) {
37
+ #{$sep + $frag} {
38
+ #{$property}: #{$value};
39
+ }
40
+ }
41
+
42
+ @mixin scssVarsToCssVars($module, $module-config) {
43
+ /**
44
+ * cssfabric generated file
45
+ * css vars for #{$module}
46
+ */
47
+ @each $red, $rt in $module-config {
48
+ // list map string
49
+ @if (type_of($rt) == "string") {
50
+ $key: #{$module}-#{$red};
51
+ --cssfabric-#{$key}: #{$rt};
52
+ }
53
+ @if (type_of($rt) == "map") {
54
+ @each $rtkey, $rtval in $rt {
55
+ $type: type_of($rtval);
56
+ $key: #{$module}-#{$red}-#{$rtkey};
57
+ $compval: is-map; // #{string.slice(#{#ss($rtval)}, 4)};
58
+
59
+ $comp: if($type== map or $type == list, #{$compval}, #{$rtval});
60
+
61
+ --cssfabric-#{$key}: #{$comp};
62
+ }
63
+ }
64
+ @if (type_of($rt) == "list") {
65
+ $key: #{$module}-#{$red};
66
+ --cssfabric-#{$key}: #{string.slice(#{#ss($rt)}, 4)};
67
+ }
68
+ }
69
+ }
70
+
71
+ @mixin alphaTize($key,$color,$ranges: (_:0.3,low:0.8,high:0.1)) {
72
+ @each $range, $val in $ranges {
73
+ $rg: if($range==_,'',-#{$range});
74
+ #{$key}-alpha#{$rg} : #{color.change($color,$alpha:$val)};
75
+ }
76
+ }
77
+
78
+ @function getGraySteps($steps, $gray-start, $gray-end) {
79
+ $gray-schemes: ();
80
+
81
+ @for $i from 0 through $steps {
82
+
83
+ $color: mix($gray-end, $gray-start, math.div($i , $steps) * 100%);
84
+
85
+ $gray-schemes: map.set($gray-schemes, #{($i+1) * 100}, $color);
86
+ }
87
+
88
+ @return $gray-schemes;
89
+ }
90
+
91
+ @function applyColorEffect($theme-level, $color) {
92
+ $switch-named: map-get(
93
+ (
94
+ light: lighten($color, 15%),
95
+ lighter: lighten($color, 30%),
96
+ dark: darken($color, 10%),
97
+ darker: darken($color, 20%),
98
+ complement: complement($color),
99
+ invert: invert($color)
100
+ ),
101
+ $theme-level
102
+ );
103
+
104
+ @return $switch-named;
105
+ }
106
+
107
+ @function getColorPropertyType($fabric-tag) {
108
+ /** get property for #{$fabric-tag} */
109
+ @return map-get(
110
+ (
111
+ color: color,
112
+ text: color,
113
+ foreground: color,
114
+ bg: background-color,
115
+ bg-themed: background-color,
116
+ border: border-color
117
+ ),
118
+ $fabric-tag
119
+ );
120
+ }
121
+
122
+ @function getThemeLevels($declinations-config, $color_primary) {
123
+ $out: ();
124
+ // primary secondary tertiary
125
+ @each $color-grade, $color-value in $declinations-config {
126
+ $color: $color-value;
127
+ $out: map.set($out, $color-grade, $color);
128
+ @each $theme-level in (light lighter dark darker complement invert) {
129
+ $new-theme-level: #{$color-grade}-#{$theme-level};
130
+ $newColor: applyColorEffect($theme-level, $color);
131
+ $out: map.set($out, $new-theme-level, $newColor);
132
+ }
133
+ }
134
+
135
+ @return $out;
136
+ }
137
+
138
+ @function getBoxIterator($iterator, $unit-config,$_unit-size-config) {
139
+ $out: ("_": "_");
140
+
141
+ @for $grid_size_value from 1 through $iterator {
142
+ $css_size_value: ($grid_size_value * $_unit-size-config) + $unit-config;
143
+ $out: map.set($out, $grid_size_value, $css_size_value);
144
+ }
145
+ @return $out
146
+ }
147
+
148
+ @function getShadowIterator($factors,$box-shadows-steps) {
149
+ $out: ();
150
+
151
+ $v_fact: map-get($factors, v_fact);
152
+ $h_fact: map-get($factors, h_fact);
153
+
154
+ $v_fact_2: map-get($factors, v_fact_2);
155
+ $h_fact_2: map-get($factors, h_fact_2);
156
+
157
+ $acc: 1;
158
+
159
+ @for $shadows_step from 1 through $box-shadows-steps {
160
+ $acc: $acc * 2;
161
+ $v: $shadows_step * 2;
162
+
163
+ $v_val: math.div($acc, $v_fact);
164
+ $h_val: math.div($acc, $h_fact);
165
+
166
+ $v_val_2: math.div($acc, $v_fact_2);
167
+ $h_val_2: math.div($acc, $h_fact_2);
168
+
169
+ $out: map.set($out, $acc, #{$v_val} + #{$h_val});
170
+ }
171
+
172
+ @return $out;
173
+ }
174
+
175
+ @function cssDimensionPropertyBuilder($scale_prop,$dimensions_grid_ratio) {
176
+ $out: ();
177
+
178
+ @for $z_value from 1 through $dimensions_grid_ratio {
179
+ $key: $z_value + "-" + $dimensions_grid_ratio;
180
+ $val: (math.div($z_value , $dimensions_grid_ratio) * 100) +#{"%"};
181
+
182
+ $out: map.set($out, $key, $val);
183
+ }
184
+
185
+ @return $out
186
+ }
187
+
188
+ @function getObjectKeys($object) {
189
+ $out: ();
190
+ @each $key, $value in $object {
191
+ $out: append($out, $key);
192
+ }
193
+
194
+ @return $out;
195
+ }
196
+
197
+ @function getObjectValues($object) {
198
+ @return $object;
199
+ }
200
+
201
+ @function getObjectKeyValues($object) {
202
+ @return $object;
203
+ }
File without changes
@@ -0,0 +1,173 @@
1
+ @use "sass:map";
2
+ @use "sass:math";
3
+
4
+
5
+ // prefix ?
6
+ // scoped ?
7
+
8
+ // dimensions
9
+
10
+ // grays
11
+ $has-color-gray: true;
12
+ $has-color-gray-responsive: true;
13
+ // text - done conditionals
14
+ $has-text-transform: true;
15
+ $has-text-transform-responsive: false;
16
+ $has-text-align: true;
17
+ $has-text-align-responsive: false;
18
+ $has-text-font: true;
19
+ $has-text-font-responsive: false;
20
+ $has-text-shadow-color-scheme: true;
21
+ $has-text-shadow-color-scheme-responsive: false;
22
+ $has-text-shadow-color-palette: true;
23
+ $has-text-shadow-color-palette-responsive: false;
24
+
25
+ // colors
26
+ $has-color-palette: true;
27
+ $has-color-palette-responsive: false;
28
+ $has-color-scheme: true;
29
+ $has-color-scheme-responsive: false;
30
+ $has-color-gray: true;
31
+ $has-color-gray-responsive: false;
32
+
33
+ $has-color-foreground: true;
34
+ $has-color-bg: true;
35
+ $has-color-bg-themed: true;
36
+ $has-color-border: true;
37
+
38
+
39
+ $theme-color-primary: rgb(32, 23, 0) !default;
40
+ $theme-color-secondary: #D14B02 !default;
41
+ $theme-color-tertiary: #88D102 !default;
42
+ //light theme
43
+ $theme-color-foreground: #282230 !default;
44
+ $theme-color-background: #ffffff !default;
45
+ $theme-color-paper: #f1f1f1 !default;
46
+
47
+ $theme-color-shadow: green !default;
48
+ // dark theme
49
+ $theme-dark-color-foreground: #f1f1f1 !default;
50
+ $theme-dark-color-background: #27323a !default;
51
+ $theme-dark-color-paper: #3a3b3b !default;
52
+
53
+ $theme-dark-color-shadow: black !default;
54
+
55
+ // grays
56
+ $gray-start: #f4f4f4 !default;
57
+ $gray-end: #999 !default;
58
+ $gray-steps: 5 !default;
59
+
60
+ $densities-ratios: (small:0.5, default:1, large:1.75);
61
+
62
+ $box-position-shorthand: pos !default;
63
+ $box-display-shorthand: dsp !default;
64
+ $box-shadow-shorthand: shad !default;
65
+ $box-border-shorthand: border !default;
66
+ $box-padding-shorthand: pad !default;
67
+ $box-margin-shorthand: marg !default;
68
+ $box-gap-shorthand: gap !default;
69
+
70
+ $box-unit-presets: (tiny:0.5, small:1, medium:3, large:4) !default;
71
+ $box-radius: (tiny:4px, small:8px, medium:16px) !default;
72
+
73
+ $scale-tag-width-shorthand: w !default;
74
+ $scale-tag-height-shorthand: h !default;
75
+
76
+ $cssfabric-metadata: (
77
+ title: "cssfabric",
78
+ tag: "cssfabric",
79
+ description: "cssfabric global config variables"
80
+ );
81
+
82
+ // vars
83
+ $vars-box-density: --box-density !default;
84
+ $vars-box-density-preset: --box-density-preset !default;
85
+
86
+ $vars-theme-color-shadow: --theme-color-shadow !default;
87
+ $vars-theme-dark-color-shadow: --theme-dark-color-shadow !default;
88
+
89
+ $cssfabric-config: (
90
+ cfg-has-dimension-strict: true,
91
+ CFG_HAS_DIMENSION_MIN: true,
92
+ CFG_HAS_DIMENSION_MAX: true,
93
+ size_step: 0.5rem,
94
+ size-step-unit: rem,
95
+ sep: "-",
96
+ sizes: (
97
+ tiny: 32,
98
+ small: 64,
99
+ medium: 128,
100
+ large: 256,
101
+ full: 100%
102
+ ),
103
+ media_quey_sizes: (
104
+ xxl: 1300,
105
+ xl: 1200,
106
+ lg: 960,
107
+ md: 760
108
+ ),
109
+ densities-ratios: $densities-ratios,
110
+ themes:(
111
+ light:(
112
+ foreground: $theme-color-foreground,
113
+ background: $theme-color-background,
114
+ paper: $theme-color-paper,
115
+ ),
116
+ dark:(
117
+ foreground: $theme-dark-color-foreground,
118
+ background: $theme-dark-color-background,
119
+ paper: $theme-dark-color-paper
120
+ ),
121
+ ),
122
+ theme: (
123
+ primary: $theme-color-primary,
124
+ secondary: $theme-color-secondary,
125
+ tertiary: $theme-color-tertiary,
126
+ foreground: $theme-color-foreground,
127
+ background: $theme-color-background,
128
+ paper: $theme-color-paper,
129
+ ),
130
+ scheme: (
131
+ discrete: #ccc,
132
+ success: green,
133
+ info: #FFDD57FF,
134
+ warning: hsl(48, 96%, 46%),
135
+ alert: hsl(27, 100%, 50%),
136
+ error: red
137
+ ),
138
+ palette: (
139
+ 'yellow': #ffb900,
140
+ 'orange': #d83b01,
141
+ 'red': #d13438,
142
+ 'magenta': #b4009e,
143
+ 'purple': #5c2d91,
144
+ 'green': #107c10,
145
+ 'teal': #008272,
146
+ 'blue': #0078d4,
147
+ 'dark': #323232,
148
+ ),
149
+ border-radius:(
150
+ tiny:4px, small:8px, medium:16px
151
+ ),
152
+ gray: getGraySteps($gray-steps, $gray-start, $gray-end),
153
+ gray-config: (
154
+ start: $gray-start,
155
+ end: $gray-end,
156
+ steps: $gray-steps
157
+ )
158
+ );
159
+
160
+ @function getGraySteps($steps, $gray-start, $gray-end) {
161
+ $gray-schemes: ();
162
+
163
+ @for $i from 0 through $steps {
164
+
165
+ $color: mix($gray-end, $gray-start, math.div($i , $steps) * 100%);
166
+
167
+ $gray-schemes: map.set($gray-schemes, #{($i+1) * 100}, $color);
168
+ }
169
+
170
+ @return $gray-schemes;
171
+ }
172
+
173
+ $cssfabric-docs: ();