@medyll/cssfabric 0.2.0 → 0.2.1-beta.2
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.
- package/README.md +58 -38
- package/dist/NewMenu.svelte +41 -0
- package/dist/NewMenu.svelte.d.ts +19 -0
- package/dist/css/animation/animation.css +2 -0
- package/dist/css/base/base.css +47 -0
- package/dist/css/base/base.min.css +1 -0
- package/{styles → dist/css}/box/box.css +118 -0
- package/dist/css/box/box.min.css +1 -0
- package/{styles → dist/css}/box/box.responsive.css +3063 -1550
- package/dist/css/box/box.responsive.min.css +1 -0
- package/{styles → dist/css}/color/color.css +11 -9
- package/{styles → dist/css}/color/color.responsive.css +3446 -1932
- package/dist/css/color/color.responsive.min.css +1 -0
- package/dist/css/cssfabric.css +5167 -0
- package/dist/css/cssfabric.min.css +4877 -0
- package/dist/css/cssfabric.responsive.css +20419 -0
- package/dist/css/cssfabric.responsive.min.css +1 -0
- package/{styles → dist/css}/flex/flex.css +2 -0
- package/{styles → dist/css}/flex/flex.responsive.css +192 -114
- package/dist/css/flex/flex.responsive.min.css +1 -0
- package/{styles → dist/css}/grid/grid.css +2 -0
- package/{styles → dist/css}/grid/grid.responsive.css +230 -212
- package/dist/css/grid/grid.responsive.min.css +1 -0
- package/{styles → dist/css}/menu/menu.css +2 -0
- package/{styles → dist/css}/menu/menu.responsive.css +165 -78
- package/dist/css/menu/menu.responsive.min.css +1 -0
- package/{styles → dist/css}/overflow/overflow.css +2 -0
- package/{styles → dist/css}/overflow/overflow.responsive.css +98 -105
- package/dist/css/overflow/overflow.responsive.min.css +1 -0
- package/{styles → dist/css}/scale/scale.css +2 -0
- package/{styles → dist/css}/scale/scale.responsive.css +1520 -1152
- package/dist/css/scale/scale.responsive.min.css +1 -0
- package/{styles → dist/css}/table/table.css +2 -0
- package/{styles → dist/css}/table/table.responsive.css +162 -86
- package/dist/css/table/table.responsive.min.css +1 -0
- package/{styles → dist/css}/text/text.css +2 -0
- package/{styles → dist/css}/text/text.responsive.css +76 -55
- package/dist/css/text/text.responsive.min.css +1 -0
- package/{styles → dist/css}/theme/theme.css +51 -0
- package/{styles → dist/css}/theme/theme.min.css +1 -1
- package/{styles → dist/css}/vars.css +66 -67
- package/dist/css/vars.min.css +1 -0
- package/{styles → dist/css}/zindex/zindex.css +2 -0
- package/dist/cssFabric/config.d.ts +29 -0
- package/dist/cssFabric/config.js +29 -0
- package/dist/cssFabric/cssFabricSheet.d.ts +1226 -0
- package/dist/cssFabric/cssFabricSheet.js +1270 -0
- package/dist/cssFabric/cssProperties.d.ts +27 -0
- package/dist/cssFabric/cssProperties.js +343 -0
- package/dist/cssFabric/cssVariationsAi.d.ts +12 -0
- package/dist/cssFabric/cssVariationsAi.js +111 -0
- package/dist/cssFabric/index.d.ts +113 -0
- package/dist/cssFabric/index.js +341 -0
- package/dist/cssf/README.md +197 -0
- package/{init/importCssVars.d.ts → dist/cssf/cssf.d.ts} +1 -1
- package/dist/cssf/cssf.js +12 -0
- package/dist/cssf/cssfGuide.d.ts +14 -0
- package/dist/cssf/cssfGuide.js +50 -0
- package/dist/cssf/cssfLib.d.ts +134 -0
- package/dist/cssf/cssfLib.js +116 -0
- package/dist/cssf/cssfModel.d.ts +8 -0
- package/dist/cssf/cssfModel.js +59 -0
- package/dist/cssf/cssfPlugin.d.ts +3 -0
- package/dist/cssf/cssfPlugin.js +37 -0
- package/dist/cssf/cssfTransformer.d.ts +2 -0
- package/dist/cssf/cssfTransformer.js +100 -0
- package/dist/cssf/index.d.ts +6 -0
- package/dist/cssf/index.js +7 -0
- package/dist/cssfVsCode/.vscode/launch.json +17 -0
- package/dist/cssfVsCode/.vscodeignore +4 -0
- package/dist/cssfVsCode/CHANGELOG.md +9 -0
- package/dist/cssfVsCode/README.md +65 -0
- package/dist/cssfVsCode/language-configuration.json +36 -0
- package/dist/cssfVsCode/package.json +40 -0
- package/dist/cssfVsCode/syntaxes/cssf.tmLanguage.json +1868 -0
- package/dist/cssfVsCode/test.cssf +6 -0
- package/dist/cssfVsCode/vsc-extension-quickstart.md +29 -0
- package/{_generated → dist/generated}/cssFabric.vars.json +4 -4
- package/{_generated/export.variables.md → dist/generated/cssFabric.vars.md} +268 -240
- package/dist/index.d.ts +119 -0
- package/dist/index.js +120 -0
- package/dist/scripts/cssfabric.d.ts +24 -0
- package/{scripts → dist/scripts}/cssfabric.js +43 -43
- package/{scripts → dist/scripts}/cssfabricClassNames.d.ts +14 -14
- package/{scripts → dist/scripts}/cssfabricClassNames.js +146 -146
- package/dist/scripts/index.d.ts +2 -0
- package/{scripts → dist/scripts}/index.js +4 -4
- package/{scripts → dist/scripts}/utils.d.ts +5 -5
- package/{scripts → dist/scripts}/utils.js +38 -38
- package/dist/scss/_utils.scss +203 -0
- package/dist/scss/modules/_cssfabric-config.scss +178 -0
- package/dist/scss/modules/_mixins.scss +1 -0
- package/dist/scss/modules/animation/_animation-vars.scss +17 -0
- package/dist/scss/modules/animation/animation.scss +3 -0
- package/dist/scss/modules/base/_base-vars.scss +19 -0
- package/dist/scss/modules/base/base.scss +58 -0
- package/dist/scss/modules/box/_box-build.scss +305 -0
- package/dist/scss/modules/box/_box-vars.scss +121 -0
- package/dist/scss/modules/box/box-responsive.scss +18 -0
- package/dist/scss/modules/box/box.scss +3 -0
- package/dist/scss/modules/color/_color-build.scss +196 -0
- package/dist/scss/modules/color/_color-vars.scss +80 -0
- package/dist/scss/modules/color/color-responsive.scss +23 -0
- package/dist/scss/modules/color/color.scss +9 -0
- package/dist/scss/modules/css-fabric.scss +1 -0
- package/dist/scss/modules/flex/_flex-build.scss +150 -0
- package/dist/scss/modules/flex/_flex-vars.scss +84 -0
- package/dist/scss/modules/flex/flex-responsive.scss +25 -0
- package/dist/scss/modules/flex/flex.scss +3 -0
- package/dist/scss/modules/grid/_grid-build.scss +87 -0
- package/dist/scss/modules/grid/_grid-vars.scss +88 -0
- package/dist/scss/modules/grid/grid-responsive.scss +25 -0
- package/dist/scss/modules/grid/grid.scss +6 -0
- package/dist/scss/modules/menu/_menu-build.scss +120 -0
- package/dist/scss/modules/menu/_menu-vars.scss +29 -0
- package/dist/scss/modules/menu/menu-responsive.scss +19 -0
- package/dist/scss/modules/menu/menu.scss +6 -0
- package/dist/scss/modules/overflow/_overflow-build.scss +22 -0
- package/dist/scss/modules/overflow/_overflow-vars.scss +31 -0
- package/dist/scss/modules/overflow/overflow-responsive.scss +25 -0
- package/dist/scss/modules/overflow/overflow.scss +7 -0
- package/dist/scss/modules/scale/_scale-build.scss +142 -0
- package/dist/scss/modules/scale/_scale-vars.scss +84 -0
- package/dist/scss/modules/scale/scale-responsive.scss +23 -0
- package/dist/scss/modules/scale/scale.scss +8 -0
- package/dist/scss/modules/table/_table-build.scss +134 -0
- package/dist/scss/modules/table/_table-vars.scss +30 -0
- package/dist/scss/modules/table/table-responsive.scss +24 -0
- package/dist/scss/modules/table/table.scss +8 -0
- package/dist/scss/modules/text/_text-build.scss +166 -0
- package/dist/scss/modules/text/_text-vars.scss +87 -0
- package/dist/scss/modules/text/text-responsive.scss +26 -0
- package/dist/scss/modules/text/text.scss +6 -0
- package/dist/scss/modules/theme/_theme-build.scss +128 -0
- package/dist/scss/modules/theme/_theme-vars.scss +46 -0
- package/dist/scss/modules/theme/theme.scss +6 -0
- package/dist/scss/modules/vars.scss +46 -0
- package/dist/scss/modules/zindex/_zindex-vars.scss +14 -0
- package/dist/scss/modules/zindex/zindex.scss +15 -0
- package/package.json +70 -113
- package/_generated/readme.md +0 -0
- package/init/importCssVars.js +0 -2
- package/scripts/cssfabric.d.ts +0 -24
- package/scripts/index.d.ts +0 -2
- package/styles/animation/animation.css +0 -0
- package/styles/base/base.css +0 -215
- package/styles/base/base.min.css +0 -1
- package/styles/box/box.min.css +0 -1
- package/styles/box/box.responsive.min.css +0 -1
- package/styles/color/color.responsive.min.css +0 -1
- package/styles/cssfabric.css +0 -61792
- package/styles/cssfabric.min.css +0 -168
- package/styles/cssfabric.responsive.css +0 -200596
- package/styles/cssfabric.responsive.min.css +0 -108
- package/styles/flex/flex.responsive.min.css +0 -1
- package/styles/grid/grid.responsive.min.css +0 -1
- package/styles/menu/menu.responsive.min.css +0 -1
- package/styles/overflow/overflow.responsive.min.css +0 -1
- package/styles/scale/scale.responsive.min.css +0 -1
- package/styles/table/table.responsive.min.css +0 -1
- package/styles/text/text.responsive.min.css +0 -1
- package/styles/vars.min.css +0 -1
- /package/{styles → dist/css}/animation/animation.min.css +0 -0
- /package/{styles → dist/css}/color/color.min.css +0 -0
- /package/{styles → dist/css}/flex/flex.min.css +0 -0
- /package/{styles → dist/css}/grid/grid.min.css +0 -0
- /package/{styles → dist/css}/menu/menu.min.css +0 -0
- /package/{styles → dist/css}/overflow/overflow.min.css +0 -0
- /package/{styles → dist/css}/scale/scale.min.css +0 -0
- /package/{styles → dist/css}/table/table.min.css +0 -0
- /package/{styles → dist/css}/text/text.min.css +0 -0
- /package/{styles → dist/css}/zindex/zindex.min.css +0 -0
- /package/{_generated → dist/scss}/index.d.ts +0 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/** generated ! */
|
|
2
|
+
import postcss from 'postcss';
|
|
3
|
+
export interface CssfInterfaceT {
|
|
4
|
+
gutter: {
|
|
5
|
+
type: (decl: postcss.Declaration, ...value: CssfInterface['gutter']['type'][]) => void;
|
|
6
|
+
gap: (decl: postcss.Declaration, ...value: CssfInterface['gutter']['gap'][]) => void;
|
|
7
|
+
padding: (decl: postcss.Declaration, ...value: CssfInterface['gutter']['padding'][]) => void;
|
|
8
|
+
};
|
|
9
|
+
position: {
|
|
10
|
+
left: (decl: postcss.Declaration, ...value: CssfInterface['position']['left'][]) => void;
|
|
11
|
+
top: (decl: postcss.Declaration, ...value: CssfInterface['position']['top'][]) => void;
|
|
12
|
+
right: (decl: postcss.Declaration, ...value: CssfInterface['position']['right'][]) => void;
|
|
13
|
+
bottom: (decl: postcss.Declaration, ...value: CssfInterface['position']['bottom'][]) => void;
|
|
14
|
+
margin: (decl: postcss.Declaration, ...value: CssfInterface['position']['margin'][]) => void;
|
|
15
|
+
};
|
|
16
|
+
box: {
|
|
17
|
+
border: (decl: postcss.Declaration, ...value: CssfInterface['box']['border'][]) => void;
|
|
18
|
+
shadow: (decl: postcss.Declaration, ...value: CssfInterface['box']['shadow'][]) => void;
|
|
19
|
+
radius: (decl: postcss.Declaration, ...value: CssfInterface['box']['radius'][]) => void;
|
|
20
|
+
overflow: (decl: postcss.Declaration, ...value: CssfInterface['box']['overflow'][]) => void;
|
|
21
|
+
};
|
|
22
|
+
size: {
|
|
23
|
+
width: (decl: postcss.Declaration, ...value: CssfInterface['size']['width'][]) => void;
|
|
24
|
+
height: (decl: postcss.Declaration, ...value: CssfInterface['size']['height'][]) => void;
|
|
25
|
+
ratio: (decl: postcss.Declaration, ...value: CssfInterface['size']['ratio'][]) => void;
|
|
26
|
+
};
|
|
27
|
+
typography: {
|
|
28
|
+
font: (decl: postcss.Declaration, ...value: CssfInterface['typography']['font'][]) => void;
|
|
29
|
+
size: (decl: postcss.Declaration, ...value: CssfInterface['typography']['size'][]) => void;
|
|
30
|
+
style: (decl: postcss.Declaration, ...value: CssfInterface['typography']['style'][]) => void;
|
|
31
|
+
underline: (decl: postcss.Declaration, ...value: CssfInterface['typography']['underline'][]) => void;
|
|
32
|
+
shadow: (decl: postcss.Declaration, ...value: CssfInterface['typography']['shadow'][]) => void;
|
|
33
|
+
};
|
|
34
|
+
color: {
|
|
35
|
+
text: (decl: postcss.Declaration, ...value: CssfInterface['color']['text'][]) => void;
|
|
36
|
+
bg: (decl: postcss.Declaration, ...value: CssfInterface['color']['bg'][]) => void;
|
|
37
|
+
opacity: (decl: postcss.Declaration, ...value: CssfInterface['color']['opacity'][]) => void;
|
|
38
|
+
};
|
|
39
|
+
animate: {
|
|
40
|
+
transition: (decl: postcss.Declaration, ...value: CssfInterface['animate']['transition'][]) => void;
|
|
41
|
+
all: (decl: postcss.Declaration, ...value: CssfInterface['animate']['all'][]) => void;
|
|
42
|
+
duration: (decl: postcss.Declaration, ...value: CssfInterface['animate']['duration'][]) => void;
|
|
43
|
+
timing: (decl: postcss.Declaration, ...value: CssfInterface['animate']['timing'][]) => void;
|
|
44
|
+
delay: (decl: postcss.Declaration, ...value: CssfInterface['animate']['delay'][]) => void;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
export interface CssfInterface {
|
|
48
|
+
gutter: {
|
|
49
|
+
type: 'flex' | 'grid';
|
|
50
|
+
gap: 'string';
|
|
51
|
+
padding: 'all' | ['top' | 'bottom'] | ['top' | 'bottom' | 'left' | 'right'];
|
|
52
|
+
};
|
|
53
|
+
position: {
|
|
54
|
+
left: 'string';
|
|
55
|
+
top: 'string';
|
|
56
|
+
right: 'string';
|
|
57
|
+
bottom: 'string';
|
|
58
|
+
margin: 'all' | ['top' | 'bottom'] | ['top' | 'bottom' | 'left' | 'right'];
|
|
59
|
+
};
|
|
60
|
+
box: {
|
|
61
|
+
border: 'all' | ['top' | 'bottom'] | ['top' | 'bottom' | 'left' | 'right'];
|
|
62
|
+
shadow: [];
|
|
63
|
+
radius: 'string' | 'string?' | 'string?' | 'string?';
|
|
64
|
+
overflow: ['visible | hidden' | ['x' | 'y']];
|
|
65
|
+
};
|
|
66
|
+
size: {
|
|
67
|
+
width: 'string' | 'min?' | 'max?';
|
|
68
|
+
height: 'string' | 'min?' | 'max?';
|
|
69
|
+
ratio: 'string , string?';
|
|
70
|
+
};
|
|
71
|
+
typography: {
|
|
72
|
+
font: 'string';
|
|
73
|
+
size: 'string';
|
|
74
|
+
style: 'bold' | 'italic' | 'normal' | 'string';
|
|
75
|
+
underline: 'none' | 'dotted' | 'dashed' | 'solid' | 'double' | 'wavy' | 'string';
|
|
76
|
+
shadow: 'string' | 'string?' | 'string?' | 'string?';
|
|
77
|
+
};
|
|
78
|
+
color: {
|
|
79
|
+
text: 'string';
|
|
80
|
+
bg: 'string';
|
|
81
|
+
opacity: 'string' | 'number';
|
|
82
|
+
};
|
|
83
|
+
animate: {
|
|
84
|
+
transition: ['duration' | 'timing' | 'delay'];
|
|
85
|
+
all: 'all' | 'none' | 'cssProp';
|
|
86
|
+
duration: 'string';
|
|
87
|
+
timing: 'string';
|
|
88
|
+
delay: 'string';
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
export declare class CssfClass {
|
|
92
|
+
gutter(decl: postcss.Declaration): {
|
|
93
|
+
type: (...args: CssfInterface['gutter']['type'][]) => ("flex" | "grid")[];
|
|
94
|
+
gap: (...args: CssfInterface['gutter']['gap'][]) => "string"[];
|
|
95
|
+
padding: (...args: CssfInterface['gutter']['padding'][]) => ("all" | ["top" | "bottom"] | ["top" | "bottom" | "left" | "right"])[];
|
|
96
|
+
};
|
|
97
|
+
position(decl: postcss.Declaration): {
|
|
98
|
+
left: (...args: CssfInterface['position']['left'][]) => "string"[];
|
|
99
|
+
top: (...args: CssfInterface['position']['top'][]) => "string"[];
|
|
100
|
+
right: (...args: CssfInterface['position']['right'][]) => "string"[];
|
|
101
|
+
bottom: (...args: CssfInterface['position']['bottom'][]) => "string"[];
|
|
102
|
+
margin: (...args: CssfInterface['position']['margin'][]) => ("all" | ["top" | "bottom"] | ["top" | "bottom" | "left" | "right"])[];
|
|
103
|
+
};
|
|
104
|
+
box(decl: postcss.Declaration): {
|
|
105
|
+
border: (...args: CssfInterface['box']['border'][]) => ("all" | ["top" | "bottom"] | ["top" | "bottom" | "left" | "right"])[];
|
|
106
|
+
shadow: (...args: CssfInterface['box']['shadow'][]) => [][];
|
|
107
|
+
radius: (...args: CssfInterface['box']['radius'][]) => ("string" | "string?")[];
|
|
108
|
+
overflow: (...args: CssfInterface['box']['overflow'][]) => ["visible | hidden" | ["x" | "y"]][];
|
|
109
|
+
};
|
|
110
|
+
size(decl: postcss.Declaration): {
|
|
111
|
+
width: (...args: CssfInterface['size']['width'][]) => ("string" | "min?" | "max?")[];
|
|
112
|
+
height: (...args: CssfInterface['size']['height'][]) => ("string" | "min?" | "max?")[];
|
|
113
|
+
ratio: (...args: CssfInterface['size']['ratio'][]) => "string , string?"[];
|
|
114
|
+
};
|
|
115
|
+
typography(decl: postcss.Declaration): {
|
|
116
|
+
font: (...args: CssfInterface['typography']['font'][]) => "string"[];
|
|
117
|
+
size: (...args: CssfInterface['typography']['size'][]) => "string"[];
|
|
118
|
+
style: (...args: CssfInterface['typography']['style'][]) => ("string" | "bold" | "italic" | "normal")[];
|
|
119
|
+
underline: (...args: CssfInterface['typography']['underline'][]) => ("string" | "none" | "dotted" | "dashed" | "solid" | "double" | "wavy")[];
|
|
120
|
+
shadow: (...args: CssfInterface['typography']['shadow'][]) => ("string" | "string?")[];
|
|
121
|
+
};
|
|
122
|
+
color(decl: postcss.Declaration): {
|
|
123
|
+
text: (...args: CssfInterface['color']['text'][]) => "string"[];
|
|
124
|
+
bg: (...args: CssfInterface['color']['bg'][]) => "string"[];
|
|
125
|
+
opacity: (...args: CssfInterface['color']['opacity'][]) => ("string" | "number")[];
|
|
126
|
+
};
|
|
127
|
+
animate(decl: postcss.Declaration): {
|
|
128
|
+
transition: (...args: CssfInterface['animate']['transition'][]) => ["duration" | "timing" | "delay"][];
|
|
129
|
+
all: (...args: CssfInterface['animate']['all'][]) => ("all" | "none" | "cssProp")[];
|
|
130
|
+
duration: (...args: CssfInterface['animate']['duration'][]) => "string"[];
|
|
131
|
+
timing: (...args: CssfInterface['animate']['timing'][]) => "string"[];
|
|
132
|
+
delay: (...args: CssfInterface['animate']['delay'][]) => "string"[];
|
|
133
|
+
};
|
|
134
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
/** generated ! */
|
|
2
|
+
import postcss from 'postcss';
|
|
3
|
+
export class CssfClass {
|
|
4
|
+
gutter(decl) {
|
|
5
|
+
return {
|
|
6
|
+
type: (...args) => {
|
|
7
|
+
return args;
|
|
8
|
+
},
|
|
9
|
+
gap: (...args) => {
|
|
10
|
+
return args;
|
|
11
|
+
},
|
|
12
|
+
padding: (...args) => {
|
|
13
|
+
return args;
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
position(decl) {
|
|
18
|
+
return {
|
|
19
|
+
left: (...args) => {
|
|
20
|
+
return args;
|
|
21
|
+
},
|
|
22
|
+
top: (...args) => {
|
|
23
|
+
return args;
|
|
24
|
+
},
|
|
25
|
+
right: (...args) => {
|
|
26
|
+
return args;
|
|
27
|
+
},
|
|
28
|
+
bottom: (...args) => {
|
|
29
|
+
return args;
|
|
30
|
+
},
|
|
31
|
+
margin: (...args) => {
|
|
32
|
+
return args;
|
|
33
|
+
},
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
box(decl) {
|
|
37
|
+
return {
|
|
38
|
+
border: (...args) => {
|
|
39
|
+
return args;
|
|
40
|
+
},
|
|
41
|
+
shadow: (...args) => {
|
|
42
|
+
return args;
|
|
43
|
+
},
|
|
44
|
+
radius: (...args) => {
|
|
45
|
+
return args;
|
|
46
|
+
},
|
|
47
|
+
overflow: (...args) => {
|
|
48
|
+
return args;
|
|
49
|
+
},
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
size(decl) {
|
|
53
|
+
return {
|
|
54
|
+
width: (...args) => {
|
|
55
|
+
return args;
|
|
56
|
+
},
|
|
57
|
+
height: (...args) => {
|
|
58
|
+
return args;
|
|
59
|
+
},
|
|
60
|
+
ratio: (...args) => {
|
|
61
|
+
return args;
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
typography(decl) {
|
|
66
|
+
return {
|
|
67
|
+
font: (...args) => {
|
|
68
|
+
return args;
|
|
69
|
+
},
|
|
70
|
+
size: (...args) => {
|
|
71
|
+
return args;
|
|
72
|
+
},
|
|
73
|
+
style: (...args) => {
|
|
74
|
+
return args;
|
|
75
|
+
},
|
|
76
|
+
underline: (...args) => {
|
|
77
|
+
return args;
|
|
78
|
+
},
|
|
79
|
+
shadow: (...args) => {
|
|
80
|
+
return args;
|
|
81
|
+
},
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
color(decl) {
|
|
85
|
+
return {
|
|
86
|
+
text: (...args) => {
|
|
87
|
+
return args;
|
|
88
|
+
},
|
|
89
|
+
bg: (...args) => {
|
|
90
|
+
return args;
|
|
91
|
+
},
|
|
92
|
+
opacity: (...args) => {
|
|
93
|
+
return args;
|
|
94
|
+
},
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
animate(decl) {
|
|
98
|
+
return {
|
|
99
|
+
transition: (...args) => {
|
|
100
|
+
return args;
|
|
101
|
+
},
|
|
102
|
+
all: (...args) => {
|
|
103
|
+
return args;
|
|
104
|
+
},
|
|
105
|
+
duration: (...args) => {
|
|
106
|
+
return args;
|
|
107
|
+
},
|
|
108
|
+
timing: (...args) => {
|
|
109
|
+
return args;
|
|
110
|
+
},
|
|
111
|
+
delay: (...args) => {
|
|
112
|
+
return args;
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type CssfModelTypes = typeof cssfModelTypes;
|
|
2
|
+
export type cssfModelRoot = Record<string, cssfModelDeclaration>;
|
|
3
|
+
export type cssfModelDeclaration = Record<string, any>;
|
|
4
|
+
export declare const cssfModelTypes: string[];
|
|
5
|
+
/**
|
|
6
|
+
* Display property of the outer element
|
|
7
|
+
*/
|
|
8
|
+
export declare const cssfModel: cssfModelRoot;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
export const cssfModelTypes = [
|
|
2
|
+
'all',
|
|
3
|
+
'top',
|
|
4
|
+
'bottom',
|
|
5
|
+
'left',
|
|
6
|
+
'right',
|
|
7
|
+
'cssProp=CSSPropertyRule',
|
|
8
|
+
'overflow=string'
|
|
9
|
+
];
|
|
10
|
+
/**
|
|
11
|
+
* Display property of the outer element
|
|
12
|
+
*/
|
|
13
|
+
export const cssfModel = {
|
|
14
|
+
/* outer: {
|
|
15
|
+
flow: ['absolute', 'fixed', 'static', 'relative']
|
|
16
|
+
}, */
|
|
17
|
+
gutter: {
|
|
18
|
+
type: ['flex', 'grid'],
|
|
19
|
+
gap: 'string',
|
|
20
|
+
padding: ['all', ['top', 'bottom'], ['top', 'bottom', 'left', 'right']]
|
|
21
|
+
},
|
|
22
|
+
position: {
|
|
23
|
+
left: 'string',
|
|
24
|
+
top: 'string',
|
|
25
|
+
right: 'string',
|
|
26
|
+
bottom: 'string',
|
|
27
|
+
margin: ['all', ['top', 'bottom'], ['top', 'bottom', 'left', 'right']]
|
|
28
|
+
},
|
|
29
|
+
box: {
|
|
30
|
+
border: ['all', ['top', 'bottom'], ['top', 'bottom', 'left', 'right']],
|
|
31
|
+
shadow: [[]],
|
|
32
|
+
radius: ['string', 'string?', 'string?', 'string?'],
|
|
33
|
+
overflow: [['visible | hidden', ['x', 'y']]]
|
|
34
|
+
},
|
|
35
|
+
size: {
|
|
36
|
+
width: ['string', 'min?', 'max?'],
|
|
37
|
+
height: ['string', 'min?', 'max?'],
|
|
38
|
+
ratio: ['string , string?']
|
|
39
|
+
},
|
|
40
|
+
typography: {
|
|
41
|
+
font: 'string',
|
|
42
|
+
size: 'string',
|
|
43
|
+
style: ['bold', 'italic', 'normal', 'string'],
|
|
44
|
+
underline: ['none', 'dotted', 'dashed', 'solid', 'double', 'wavy', 'string'],
|
|
45
|
+
shadow: ['string', 'string?', 'string?', 'string?']
|
|
46
|
+
},
|
|
47
|
+
color: {
|
|
48
|
+
text: 'string',
|
|
49
|
+
bg: 'string',
|
|
50
|
+
opacity: ['string', 'number']
|
|
51
|
+
},
|
|
52
|
+
animate: {
|
|
53
|
+
transition: [['duration', 'timing', 'delay']],
|
|
54
|
+
all: ['all', 'none', 'cssProp'],
|
|
55
|
+
duration: 'string',
|
|
56
|
+
timing: 'string',
|
|
57
|
+
delay: 'string'
|
|
58
|
+
}
|
|
59
|
+
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import postcss from 'postcss';
|
|
2
|
+
import { CssfClass } from './cssfLib.js';
|
|
3
|
+
export const myPlugin = () => (root) => {
|
|
4
|
+
const cssfClass = new CssfClass();
|
|
5
|
+
root.walkDecls((decl) => {
|
|
6
|
+
const parent = decl?.parent?.selector;
|
|
7
|
+
const value = decl.value;
|
|
8
|
+
const prop = decl.prop;
|
|
9
|
+
const method = cssfClass?.[parent];
|
|
10
|
+
if (method) {
|
|
11
|
+
console.log(method(decl)?.[prop](value));
|
|
12
|
+
}
|
|
13
|
+
//decl.prop = 'my-fed-' + decl.prop;
|
|
14
|
+
// if (decl?.parent) decl.parent.append({ prop: 'my-prefix-' + decl.prop, value: decl.value });
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
export const cssfProcessor = postcss([myPlugin()]);
|
|
18
|
+
cssfProcessor
|
|
19
|
+
.process(`{
|
|
20
|
+
|
|
21
|
+
element {
|
|
22
|
+
position: top() left() right() bottom() margin();
|
|
23
|
+
box: border() shadow() radius() overflow( x auto, y hidden);
|
|
24
|
+
gutter: type() gap() padding();
|
|
25
|
+
size: width() height() ratio();
|
|
26
|
+
typography: font() size() style() underline() shadow();
|
|
27
|
+
color: text() bg() opacity();
|
|
28
|
+
animate: transition() all() duration() timing() delay();
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
`)
|
|
35
|
+
.then((result) => {
|
|
36
|
+
console.log(result.css);
|
|
37
|
+
});
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export const cssfTransformer = {
|
|
2
|
+
gutter: {
|
|
3
|
+
type: function (decl, ...value) {
|
|
4
|
+
throw new Error('Function not implemented.');
|
|
5
|
+
},
|
|
6
|
+
gap: function (decl, ...value) {
|
|
7
|
+
throw new Error('Function not implemented.');
|
|
8
|
+
},
|
|
9
|
+
padding: function (decl, ...value) {
|
|
10
|
+
throw new Error('Function not implemented.');
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
position: {
|
|
14
|
+
left: function (decl, ...value) {
|
|
15
|
+
throw new Error('Function not implemented.');
|
|
16
|
+
},
|
|
17
|
+
top: function (decl, ...value) {
|
|
18
|
+
throw new Error('Function not implemented.');
|
|
19
|
+
},
|
|
20
|
+
right: function (decl, ...value) {
|
|
21
|
+
throw new Error('Function not implemented.');
|
|
22
|
+
},
|
|
23
|
+
bottom: function (decl, ...value) {
|
|
24
|
+
throw new Error('Function not implemented.');
|
|
25
|
+
},
|
|
26
|
+
margin: function (decl, ...value) {
|
|
27
|
+
throw new Error('Function not implemented.');
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
box: {
|
|
31
|
+
border: function (decl, ...value) {
|
|
32
|
+
throw new Error('Function not implemented.');
|
|
33
|
+
},
|
|
34
|
+
shadow: function (decl, ...value) {
|
|
35
|
+
throw new Error('Function not implemented.');
|
|
36
|
+
},
|
|
37
|
+
radius: function (decl, ...value) {
|
|
38
|
+
throw new Error('Function not implemented.');
|
|
39
|
+
},
|
|
40
|
+
overflow: function (decl, ...value) {
|
|
41
|
+
throw new Error('Function not implemented.');
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
width: function (decl, ...value) {
|
|
46
|
+
throw new Error('Function not implemented.');
|
|
47
|
+
},
|
|
48
|
+
height: function (decl, ...value) {
|
|
49
|
+
throw new Error('Function not implemented.');
|
|
50
|
+
},
|
|
51
|
+
ratio: function (decl, ...value) {
|
|
52
|
+
throw new Error('Function not implemented.');
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
typography: {
|
|
56
|
+
font: function (decl, ...value) {
|
|
57
|
+
throw new Error('Function not implemented.');
|
|
58
|
+
},
|
|
59
|
+
size: function (decl, ...value) {
|
|
60
|
+
throw new Error('Function not implemented.');
|
|
61
|
+
},
|
|
62
|
+
style: function (decl, ...value) {
|
|
63
|
+
throw new Error('Function not implemented.');
|
|
64
|
+
},
|
|
65
|
+
underline: function (decl, ...value) {
|
|
66
|
+
throw new Error('Function not implemented.');
|
|
67
|
+
},
|
|
68
|
+
shadow: function (decl, ...value) {
|
|
69
|
+
throw new Error('Function not implemented.');
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
color: {
|
|
73
|
+
text: function (decl, ...value) {
|
|
74
|
+
throw new Error('Function not implemented.');
|
|
75
|
+
},
|
|
76
|
+
bg: function (decl, ...value) {
|
|
77
|
+
throw new Error('Function not implemented.');
|
|
78
|
+
},
|
|
79
|
+
opacity: function (decl, ...value) {
|
|
80
|
+
throw new Error('Function not implemented.');
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
animate: {
|
|
84
|
+
transition: function (decl, ...value) {
|
|
85
|
+
throw new Error('Function not implemented.');
|
|
86
|
+
},
|
|
87
|
+
all: function (decl, ...value) {
|
|
88
|
+
throw new Error('Function not implemented.');
|
|
89
|
+
},
|
|
90
|
+
duration: function (decl, ...value) {
|
|
91
|
+
throw new Error('Function not implemented.');
|
|
92
|
+
},
|
|
93
|
+
timing: function (decl, ...value) {
|
|
94
|
+
throw new Error('Function not implemented.');
|
|
95
|
+
},
|
|
96
|
+
delay: function (decl, ...value) {
|
|
97
|
+
throw new Error('Function not implemented.');
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// A launch configuration that launches the extension inside a new window
|
|
2
|
+
// Use IntelliSense to learn about possible attributes.
|
|
3
|
+
// Hover to view descriptions of existing attributes.
|
|
4
|
+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
|
5
|
+
{
|
|
6
|
+
"version": "0.2.0",
|
|
7
|
+
"configurations": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Extension",
|
|
10
|
+
"type": "extensionHost",
|
|
11
|
+
"request": "launch",
|
|
12
|
+
"args": [
|
|
13
|
+
"--extensionDevelopmentPath=${workspaceFolder}"
|
|
14
|
+
]
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# cssf README
|
|
2
|
+
|
|
3
|
+
This is the README for your extension "cssf". After writing up a brief description, we recommend including the following sections.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
|
|
8
|
+
|
|
9
|
+
For example if there is an image subfolder under your extension project workspace:
|
|
10
|
+
|
|
11
|
+
\!\[feature X\]\(images/feature-x.png\)
|
|
12
|
+
|
|
13
|
+
> Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
|
|
14
|
+
|
|
15
|
+
## Requirements
|
|
16
|
+
|
|
17
|
+
If you have any requirements or dependencies, add a section describing those and how to install and configure them.
|
|
18
|
+
|
|
19
|
+
## Extension Settings
|
|
20
|
+
|
|
21
|
+
Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
|
|
22
|
+
|
|
23
|
+
For example:
|
|
24
|
+
|
|
25
|
+
This extension contributes the following settings:
|
|
26
|
+
|
|
27
|
+
* `myExtension.enable`: Enable/disable this extension.
|
|
28
|
+
* `myExtension.thing`: Set to `blah` to do something.
|
|
29
|
+
|
|
30
|
+
## Known Issues
|
|
31
|
+
|
|
32
|
+
Calling out known issues can help limit users opening duplicate issues against your extension.
|
|
33
|
+
|
|
34
|
+
## Release Notes
|
|
35
|
+
|
|
36
|
+
Users appreciate release notes as you update your extension.
|
|
37
|
+
|
|
38
|
+
### 1.0.0
|
|
39
|
+
|
|
40
|
+
Initial release of ...
|
|
41
|
+
|
|
42
|
+
### 1.0.1
|
|
43
|
+
|
|
44
|
+
Fixed issue #.
|
|
45
|
+
|
|
46
|
+
### 1.1.0
|
|
47
|
+
|
|
48
|
+
Added features X, Y, and Z.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Working with Markdown
|
|
53
|
+
|
|
54
|
+
You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
|
|
55
|
+
|
|
56
|
+
* Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
|
|
57
|
+
* Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
|
|
58
|
+
* Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
|
|
59
|
+
|
|
60
|
+
## For more information
|
|
61
|
+
|
|
62
|
+
* [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
|
|
63
|
+
* [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
|
|
64
|
+
|
|
65
|
+
**Enjoy!**
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"comments": {
|
|
3
|
+
"lineComment": "//",
|
|
4
|
+
"blockComment": [ "/*", "*/" ]
|
|
5
|
+
},
|
|
6
|
+
"brackets": [
|
|
7
|
+
["{", "}"],
|
|
8
|
+
["[", "]"],
|
|
9
|
+
["(", ")"]
|
|
10
|
+
],
|
|
11
|
+
"autoClosingPairs": [
|
|
12
|
+
{ "open": "{", "close": "}", "notIn": ["string", "comment"] },
|
|
13
|
+
{ "open": "[", "close": "]", "notIn": ["string", "comment"] },
|
|
14
|
+
{ "open": "(", "close": ")", "notIn": ["string", "comment"] },
|
|
15
|
+
{ "open": "\"", "close": "\"", "notIn": ["string", "comment"] },
|
|
16
|
+
{ "open": "'", "close": "'", "notIn": ["string", "comment"] }
|
|
17
|
+
],
|
|
18
|
+
"surroundingPairs": [
|
|
19
|
+
["{", "}"],
|
|
20
|
+
["[", "]"],
|
|
21
|
+
["(", ")"],
|
|
22
|
+
["\"", "\""],
|
|
23
|
+
["'", "'"]
|
|
24
|
+
],
|
|
25
|
+
"folding": {
|
|
26
|
+
"markers": {
|
|
27
|
+
"start": "^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/",
|
|
28
|
+
"end": "^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
"indentationRules": {
|
|
32
|
+
"increaseIndentPattern": "(^.*\\{[^}]*$)",
|
|
33
|
+
"decreaseIndentPattern": "^\\s*\\}"
|
|
34
|
+
},
|
|
35
|
+
"wordPattern": "(#?-?\\d*\\.\\d\\w*%?)|(::?[\\w-]*(?=[^,{;]*[,{]))|(([@#.!])?[\\w-?]+%?|[@#!.])"
|
|
36
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "cssf",
|
|
3
|
+
"displayName": "cssFabric",
|
|
4
|
+
"description": "loop cool",
|
|
5
|
+
"version": "0.0.1",
|
|
6
|
+
"engines": {
|
|
7
|
+
"vscode": "^1.87.0"
|
|
8
|
+
},
|
|
9
|
+
"categories": [
|
|
10
|
+
"Programming Languages"
|
|
11
|
+
],
|
|
12
|
+
"contributes": {
|
|
13
|
+
"languages": [
|
|
14
|
+
{
|
|
15
|
+
"id": "cssf",
|
|
16
|
+
"aliases": [
|
|
17
|
+
"CSSF",
|
|
18
|
+
"cssf"
|
|
19
|
+
],
|
|
20
|
+
"extensions": [
|
|
21
|
+
".cssf"
|
|
22
|
+
],
|
|
23
|
+
"mimetypes": [
|
|
24
|
+
"text/css"
|
|
25
|
+
],
|
|
26
|
+
"configuration": "./language-configuration.json"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"grammars": [
|
|
30
|
+
{
|
|
31
|
+
"language": "cssf",
|
|
32
|
+
"scopeName": "source.cssf",
|
|
33
|
+
"path": "./syntaxes/cssf.tmLanguage.json",
|
|
34
|
+
"tokenTypes": {
|
|
35
|
+
"meta.function.url string.quoted": "other"
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|