@ui-doc/html-renderer 0.3.0 → 0.4.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.
- package/dist/HtmlCurlyBraceLexer.d.ts +4 -1
- package/dist/HtmlRenderer.d.ts +2 -2
- package/dist/InlineReader.d.ts +2 -1
- package/dist/{types/lexer.d.ts → Lexer.types.d.ts} +3 -1
- package/dist/NodeParser.d.ts +2 -1
- package/dist/{types/parser.d.ts → Parser.types.d.ts} +3 -3
- package/dist/{types/reader.d.ts → Reader.types.d.ts} +1 -1
- package/dist/{types/renderer.d.ts → Renderer.types.d.ts} +1 -1
- package/dist/TemplateLoader.d.ts +3 -2
- package/dist/{types/token.d.ts → Token.types.d.ts} +1 -1
- package/dist/assets/services/expand.d.ts +17 -0
- package/dist/assets/ui-doc.cjs +272 -9
- package/dist/assets/ui-doc.cjs.map +1 -1
- package/dist/assets/ui-doc.css +1169 -250
- package/dist/assets/ui-doc.css.map +1 -1
- package/dist/assets/ui-doc.min.css +9 -1
- package/dist/assets/ui-doc.min.js +1 -1
- package/dist/assets/ui-doc.mjs +272 -9
- package/dist/assets/ui-doc.mjs.map +1 -1
- package/dist/assets/{src/utils.d.ts → utils/delay.d.ts} +0 -1
- package/dist/assets/utils/dom.d.ts +28 -0
- package/dist/assets/utils/select.d.ts +12 -0
- package/dist/index.cjs +21 -18
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.mjs +21 -18
- package/dist/index.mjs.map +1 -1
- package/dist/nodes/Node.d.ts +1 -1
- package/dist/nodes/tags/debug.d.ts +2 -1
- package/dist/nodes/tags/for.d.ts +2 -1
- package/dist/nodes/tags/if.d.ts +2 -1
- package/dist/nodes/tags/index.d.ts +1 -1
- package/dist/nodes/tags/page.d.ts +2 -1
- package/dist/nodes/tags/partial.d.ts +2 -1
- package/dist/nodes/tags/var.d.ts +2 -1
- package/package.json +3 -3
- package/scripts/app.ts +5 -3
- package/scripts/services/expand.ts +207 -0
- package/scripts/{src/utils.ts → utils/delay.ts} +0 -8
- package/scripts/utils/dom.ts +73 -0
- package/scripts/utils/select.ts +46 -0
- package/styles/01_resets/initial.css +8 -3
- package/styles/01_resets/root/color.css +19 -0
- package/styles/01_resets/root/font.css +28 -0
- package/styles/01_resets/root/space.css +30 -0
- package/styles/01_resets/root/witdh.css +12 -0
- package/styles/01_resets/root.css +61 -23
- package/styles/01_resets/typography.css +105 -8
- package/styles/02_utils/background.css +14 -0
- package/styles/02_utils/control.css +41 -0
- package/styles/02_utils/margin.css +150 -0
- package/styles/02_utils/padding.css +134 -0
- package/styles/02_utils/width.css +39 -0
- package/styles/03_components/button.css +42 -0
- package/styles/03_components/colors.css +7 -19
- package/styles/03_components/container.css +16 -0
- package/styles/03_components/example-markup.css +1 -6
- package/styles/03_components/grid-auto.css +49 -0
- package/styles/03_components/icons.css +7 -19
- package/styles/03_components/navigation/burger-control.css +75 -0
- package/styles/03_components/{nav → navigation}/list.css +9 -11
- package/styles/03_components/navigation/main.css +102 -0
- package/styles/03_components/spaces.css +8 -7
- package/styles/04_layout/body.css +22 -0
- package/styles/04_layout/inline-code.css +6 -0
- package/styles/04_layout/page.css +73 -0
- package/styles/index.css +58 -17
- package/templates/layouts/default.html +4 -6
- package/templates/layouts/example.html +1 -1
- package/templates/pages/default.html +13 -13
- package/templates/pages/index.html +9 -3
- package/templates/partials/code.html +1 -1
- package/templates/partials/colors.html +2 -2
- package/templates/partials/content.html +1 -1
- package/templates/partials/icons.html +3 -3
- package/templates/partials/nav-main.html +19 -8
- package/templates/partials/section.html +1 -1
- package/templates/partials/spaces.html +2 -2
- package/dist/types/index.d.ts +0 -6
- package/styles/02_objects/background.css +0 -7
- package/styles/02_objects/control.css +0 -25
- package/styles/02_objects/margin.css +0 -44
- package/styles/02_objects/padding.css +0 -44
- package/styles/02_objects/text.css +0 -3
- package/styles/02_objects/width.css +0 -16
- package/styles/03_components/nav/main.css +0 -39
- package/styles/03_components/text-flow.css +0 -5
- package/styles/04_layouts/page.css +0 -70
- /package/dist/{types/base.d.ts → Primitive.types.d.ts} +0 -0
- /package/dist/assets/{src → services}/example.d.ts +0 -0
- /package/dist/assets/{src → services}/sidebar.d.ts +0 -0
- /package/scripts/{src → services}/example.ts +0 -0
- /package/scripts/{src → services}/sidebar.ts +0 -0
|
@@ -1,3 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @location resets.typography Typography
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @location resets.typography.font Font Style
|
|
7
|
+
* @example
|
|
8
|
+
* <div style="font-weight: bold;">Bold | bold | 700</div>
|
|
9
|
+
* <div style="font-weight: normal;">Normal | normal | 400</div>
|
|
10
|
+
* <div style="font-weight: bold; font-style: italic;">Bold Italic</div>
|
|
11
|
+
* <div style="font-weight: normal; font-style: italic;">Normal Italic</div>
|
|
12
|
+
* @hideCode
|
|
13
|
+
*/
|
|
1
14
|
html {
|
|
2
15
|
font-size: var(--font-size-base);
|
|
3
16
|
-webkit-font-smoothing: antialiased;
|
|
@@ -7,7 +20,9 @@ html {
|
|
|
7
20
|
}
|
|
8
21
|
|
|
9
22
|
body,
|
|
10
|
-
.font
|
|
23
|
+
.font,
|
|
24
|
+
.control,
|
|
25
|
+
.btn {
|
|
11
26
|
font-family: var(--font-family);
|
|
12
27
|
font-size: var(--font-size);
|
|
13
28
|
font-weight: var(--font-weight);
|
|
@@ -23,40 +38,122 @@ textarea {
|
|
|
23
38
|
font-family: inherit;
|
|
24
39
|
}
|
|
25
40
|
|
|
41
|
+
/**
|
|
42
|
+
* You can use html headline tags or the class `.headline` to define headlines. The hedline class comes in handy if you want to display
|
|
43
|
+
* a headline without the semantic meaning of a headline tag.
|
|
44
|
+
*
|
|
45
|
+
* @location resets.typography.headlines Headlines
|
|
46
|
+
* @example
|
|
47
|
+
* <h1>Headline h1</h1>
|
|
48
|
+
* <h2>Headline h2</h2>
|
|
49
|
+
* <h3>Headline h3</h3>
|
|
50
|
+
* <h4>Headline h4</h4>
|
|
51
|
+
* <h5>Headline h5</h5>
|
|
52
|
+
* <h6>Headline h6</h6>
|
|
53
|
+
* <span class="headline h1">Class Headline h1</span>
|
|
54
|
+
* <span class="headline h2">Class Headline h2</span>
|
|
55
|
+
* <span class="headline h3">Class Headline h3</span>
|
|
56
|
+
* <span class="headline h4">Class Headline h4</span>
|
|
57
|
+
* <span class="headline h5">Class Headline h5</span>
|
|
58
|
+
* <span class="headline h6">Class Headline h6</span>
|
|
59
|
+
*/
|
|
26
60
|
h1,
|
|
27
61
|
h2,
|
|
28
62
|
h3,
|
|
29
63
|
h4,
|
|
30
64
|
h5,
|
|
31
|
-
h6
|
|
65
|
+
h6,
|
|
66
|
+
.headline {
|
|
67
|
+
display: block;
|
|
68
|
+
|
|
69
|
+
margin-top: calc(var(--font-space-unit) * var(--headline-space, var(--space-normal)));
|
|
70
|
+
margin-bottom: 0;
|
|
71
|
+
|
|
32
72
|
font-family: var(--headline-family, inherit);
|
|
33
73
|
font-size: calc(var(--font-size-normal) * var(--headline-scale, 1));
|
|
34
|
-
font-weight: var(--headline-weight,
|
|
74
|
+
font-weight: var(--headline-weight, var(--font-weight-bold));
|
|
35
75
|
line-height: var(--headline-line-height, inherit);
|
|
36
76
|
color: rgb(var(--headline-color, inherit));
|
|
37
77
|
}
|
|
38
78
|
|
|
39
|
-
h1
|
|
79
|
+
h1,
|
|
80
|
+
.headline.h1 {
|
|
40
81
|
--headline-scale: 2.5;
|
|
41
82
|
}
|
|
42
83
|
|
|
43
|
-
h2
|
|
84
|
+
h2,
|
|
85
|
+
.headline.h2 {
|
|
44
86
|
--headline-scale: 2;
|
|
45
87
|
}
|
|
46
88
|
|
|
47
|
-
h3
|
|
89
|
+
h3,
|
|
90
|
+
.headline.h3 {
|
|
48
91
|
--headline-scale: 1.75;
|
|
49
92
|
}
|
|
50
93
|
|
|
51
|
-
h4
|
|
94
|
+
h4,
|
|
95
|
+
.headline.h4 {
|
|
52
96
|
--headline-scale: 1.5;
|
|
53
97
|
}
|
|
54
98
|
|
|
99
|
+
h5,
|
|
100
|
+
.headline.h5 {
|
|
101
|
+
--headline-scale: 1.2;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
h6,
|
|
105
|
+
.headline.h6 {
|
|
106
|
+
--headline-scale: 1.1;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
/**
|
|
110
|
+
* You can use the `.no-space` class to remove the margin from the headline class.
|
|
111
|
+
*
|
|
112
|
+
* @location resets.typography.headlines.no-space Headlines without space
|
|
113
|
+
* @example
|
|
114
|
+
* <span class="headline h1 no-space">Class Headline h1</span>
|
|
115
|
+
* <span class="headline h2 no-space">Class Headline h2</span>
|
|
116
|
+
*/
|
|
117
|
+
.headline.no-space {
|
|
118
|
+
--headline-space: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* @location resets.typography.text Text / Paragraph
|
|
123
|
+
* @example
|
|
124
|
+
* <p>Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. </p>
|
|
125
|
+
* <p>Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
|
|
126
|
+
* <p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</p>
|
|
127
|
+
*/
|
|
128
|
+
|
|
129
|
+
/* p {} */
|
|
130
|
+
|
|
131
|
+
/**
|
|
132
|
+
* @location resets.typography.link Link
|
|
133
|
+
* @example
|
|
134
|
+
* <a href="#">Link Text</a>
|
|
135
|
+
*/
|
|
55
136
|
a {
|
|
56
137
|
color: rgb(var(--link-color, inherit));
|
|
57
|
-
text-decoration: var(--link-decoration,
|
|
138
|
+
text-decoration: var(--link-decoration, underline);
|
|
139
|
+
transition: color ease var(--link-animation-time, var(--animation-time)) text-decoration ease
|
|
140
|
+
var(--link-animation-time, var(--animation-time));
|
|
141
|
+
|
|
142
|
+
&:hover {
|
|
143
|
+
--link-color: var(--link-hover-color, var(--accent-color));
|
|
144
|
+
--link-decoration: var(--link-hover-decoration, none);
|
|
145
|
+
}
|
|
58
146
|
}
|
|
59
147
|
|
|
148
|
+
/**
|
|
149
|
+
* @location resets.typography.format Format
|
|
150
|
+
* @example
|
|
151
|
+
* <span>Normal Text</span><br>
|
|
152
|
+
* <strong>Strong Text</strong><br>
|
|
153
|
+
* <small>Small Text</small><br>
|
|
154
|
+
* <em>Emphasis Text</em><br>
|
|
155
|
+
* <i>Italic Text</i>
|
|
156
|
+
*/
|
|
60
157
|
b,
|
|
61
158
|
strong {
|
|
62
159
|
--font-weight: var(--font-weight-bold);
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `.bg` class can be used to set backgrounds, depending on the selected
|
|
3
|
+
* variant css variables will be changed, so all colors used inside will fit to
|
|
4
|
+
* the background.
|
|
5
|
+
*
|
|
6
|
+
* @location utils.background Background
|
|
7
|
+
*/
|
|
8
|
+
.bg {
|
|
9
|
+
--selection-bg-color: var(--font-color);
|
|
10
|
+
--selection-color: var(--bg-color);
|
|
11
|
+
|
|
12
|
+
color: rgb(var(--font-color));
|
|
13
|
+
background: rgb(var(--bg-color));
|
|
14
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `.control` class is used as base for all controls either by extending or using the class directly.
|
|
3
|
+
*
|
|
4
|
+
* @location utils.control Control
|
|
5
|
+
* @example
|
|
6
|
+
* <a class="control">Link control</a><br>
|
|
7
|
+
* <button type="button" class="control">Button control</button><br>
|
|
8
|
+
* <button type="button" class="control" disabled>Button control disabeled</button><br>
|
|
9
|
+
* <button type="button" class="control no-hover">Disable hover effect</button><br>
|
|
10
|
+
*/
|
|
11
|
+
.control,
|
|
12
|
+
.btn {
|
|
13
|
+
--space-px: 0;
|
|
14
|
+
--space-py: 0;
|
|
15
|
+
|
|
16
|
+
cursor: pointer;
|
|
17
|
+
|
|
18
|
+
display: inline-block;
|
|
19
|
+
|
|
20
|
+
padding: var(--py, calc(var(--space-unit) * var(--space-py)))
|
|
21
|
+
var(--px, calc(var(--space-unit) * var(--space-px)));
|
|
22
|
+
|
|
23
|
+
text-align: center;
|
|
24
|
+
text-decoration: none;
|
|
25
|
+
word-break: keep-all;
|
|
26
|
+
|
|
27
|
+
appearance: none;
|
|
28
|
+
background: rgb(var(--control-bg-color, transparent));
|
|
29
|
+
border: none;
|
|
30
|
+
border-radius: unset;
|
|
31
|
+
outline: none;
|
|
32
|
+
|
|
33
|
+
&:hover:not([aria-disabled="true"], [disabled], .btn[class*="bg-"], .no-hover) {
|
|
34
|
+
--font-color: var(--control-hover-color, var(--accent-color));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
&[aria-disabled="true"],
|
|
38
|
+
&:disabled {
|
|
39
|
+
cursor: not-allowed;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Using `margin` to add margins top, right, bottom and left to your element.
|
|
3
|
+
* Possible variables are:
|
|
4
|
+
* - **--[space]** - set direclty a spacing unit
|
|
5
|
+
* - **--space-[space]** - set a predefined space
|
|
6
|
+
*
|
|
7
|
+
* Possible <spaces> are:
|
|
8
|
+
* - **mt** - margin-top
|
|
9
|
+
* - **mr** - margin-right
|
|
10
|
+
* - **mb** - margin-bottom
|
|
11
|
+
* - **ml** - margin-left
|
|
12
|
+
*
|
|
13
|
+
* @location utils.margin Margin
|
|
14
|
+
* @example
|
|
15
|
+
* <div class="bg bg-black" style="display: flow-root;">
|
|
16
|
+
* <div class="margin bg bg-white">text</div>
|
|
17
|
+
* </div>
|
|
18
|
+
*/
|
|
19
|
+
.margin,
|
|
20
|
+
.mxy {
|
|
21
|
+
margin: var(--mt, calc(var(--space-unit) * var(--space-mt, var(--space-normal))))
|
|
22
|
+
var(--mr, calc(var(--space-unit) * var(--space-mr, var(--space-normal))))
|
|
23
|
+
var(--mb, calc(var(--space-unit) * var(--space-mb, var(--space-normal))))
|
|
24
|
+
var(--ml, calc(var(--space-unit) * var(--space-ml, var(--space-normal))));
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* Using `mt` to add margin top to your element.
|
|
29
|
+
* Possible variables are:
|
|
30
|
+
* - **--mt** - set direclty a spacing unit
|
|
31
|
+
* - **--space-mt** - set a predefined space
|
|
32
|
+
*
|
|
33
|
+
* @location utils.margin.top Margin top
|
|
34
|
+
* @example
|
|
35
|
+
* <div class="bg bg-black" style="display: flow-root;">
|
|
36
|
+
* <div class="mt bg bg-white">text</div>
|
|
37
|
+
* </div>
|
|
38
|
+
*/
|
|
39
|
+
.mt,
|
|
40
|
+
.my {
|
|
41
|
+
margin-top: var(--mt, calc(var(--space-unit) * var(--space-mt, var(--space-normal))));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Using `mr` to add margin right to your element.
|
|
46
|
+
* Possible variables are:
|
|
47
|
+
* - **--mr** - set direclty a spacing unit
|
|
48
|
+
* - **--space-mr** - set a predefined space
|
|
49
|
+
*
|
|
50
|
+
* @location utils.margin.right Margin right
|
|
51
|
+
* @example
|
|
52
|
+
* <div class="bg bg-black" style="display: flow-root;">
|
|
53
|
+
* <div class="mr bg bg-white">text</div>
|
|
54
|
+
* </div>
|
|
55
|
+
*/
|
|
56
|
+
.mr,
|
|
57
|
+
.mx {
|
|
58
|
+
margin-right: var(--mr, calc(var(--space-unit) * var(--space-mr, var(--space-normal))));
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Using `mb` to add margin bottom to your element.
|
|
63
|
+
* Possible variables are:
|
|
64
|
+
* - **--mb** - set direclty a spacing unit
|
|
65
|
+
* - **--space-mb** - set a predefined space
|
|
66
|
+
*
|
|
67
|
+
* @location utils.margin.bottom Margin bottom
|
|
68
|
+
* @example
|
|
69
|
+
* <div class="bg bg-black" style="display: flow-root;">
|
|
70
|
+
* <div class="mb bg bg-white">text</div>
|
|
71
|
+
* </div>
|
|
72
|
+
*/
|
|
73
|
+
.mb,
|
|
74
|
+
.my {
|
|
75
|
+
margin-bottom: var(--mb, calc(var(--space-unit) * var(--space-mb, var(--space-normal))));
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Using `ml` to add margin left to your element.
|
|
80
|
+
* Possible variables are:
|
|
81
|
+
* - **--ml** - set direclty a spacing unit
|
|
82
|
+
* - **--space-ml** - set a predefined space
|
|
83
|
+
*
|
|
84
|
+
* @location utils.margin.left Margin left
|
|
85
|
+
* @example
|
|
86
|
+
* <div class="bg bg-black" style="display: flow-root;">
|
|
87
|
+
* <div class="ml bg bg-white">text</div>
|
|
88
|
+
* </div>
|
|
89
|
+
*/
|
|
90
|
+
.ml,
|
|
91
|
+
.mx {
|
|
92
|
+
margin-left: var(--ml, calc(var(--space-unit) * var(--space-ml, var(--space-normal))));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Using `mxy` to add margin for the x and y axies to your element.
|
|
97
|
+
* Possible variables are:
|
|
98
|
+
* - **--[space]** - set direclty a spacing unit
|
|
99
|
+
* - **--space-[space]** - set a predefined space
|
|
100
|
+
*
|
|
101
|
+
* Possible <spaces> are:
|
|
102
|
+
* - **my** - margin-top and margin-bottom
|
|
103
|
+
* - **mx** - margin-left and margin-right
|
|
104
|
+
|
|
105
|
+
* @location utils.margin.xy Margin y-axis and x-axis
|
|
106
|
+
* @example
|
|
107
|
+
* <div class="bg bg-black" style="display: flow-root;">
|
|
108
|
+
* <div class="mxy bg bg-white">text</div>
|
|
109
|
+
* </div>
|
|
110
|
+
*/
|
|
111
|
+
.mxy {
|
|
112
|
+
--mt: var(--my, calc(var(--space-unit) * var(--space-my, var(--space-normal))));
|
|
113
|
+
--mb: var(--my, calc(var(--space-unit) * var(--space-my, var(--space-normal))));
|
|
114
|
+
--ml: var(--mx, calc(var(--space-unit) * var(--space-mx, var(--space-normal))));
|
|
115
|
+
--mr: var(--mx, calc(var(--space-unit) * var(--space-mx, var(--space-normal))));
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Using `my` to add margins tob and bottom with same size to your element.
|
|
120
|
+
* Possible variables are:
|
|
121
|
+
* - **--my** - set direclty a spacing unit
|
|
122
|
+
* - **--space-my** - set a predefined space
|
|
123
|
+
*
|
|
124
|
+
* @location utils.margin.y Margin y-axis
|
|
125
|
+
* @example
|
|
126
|
+
* <div class="bg bg-black" style="display: flow-root;">
|
|
127
|
+
* <div class="my bg bg-white">text</div>
|
|
128
|
+
* </div>
|
|
129
|
+
*/
|
|
130
|
+
.my {
|
|
131
|
+
--mt: var(--my, calc(var(--space-unit) * var(--space-my, var(--space-normal))));
|
|
132
|
+
--mb: var(--my, calc(var(--space-unit) * var(--space-my, var(--space-normal))));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Using `mx` to add margins left and right with same size to your element.
|
|
137
|
+
* Possible variables are:
|
|
138
|
+
* - **--mx** - set direclty a spacing unit
|
|
139
|
+
* - **--space-mx** - set a predefined space
|
|
140
|
+
*
|
|
141
|
+
* @location utils.margin.x Margin x-axis
|
|
142
|
+
* @example
|
|
143
|
+
* <div class="bg bg-black" style="display: flow-root;">
|
|
144
|
+
* <div class="mx bg bg-white">text</div>
|
|
145
|
+
* </div>
|
|
146
|
+
*/
|
|
147
|
+
.mx {
|
|
148
|
+
--ml: var(--mx, calc(var(--space-unit) * var(--space-mx, var(--space-normal))));
|
|
149
|
+
--mr: var(--mx, calc(var(--space-unit) * var(--space-mx, var(--space-normal))));
|
|
150
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Using `padding` to add paddings top, right, bottom and left to your element.
|
|
3
|
+
* Possible variables are:
|
|
4
|
+
* - **--[space]** - set direclty a spacing unit
|
|
5
|
+
* - **--space-[space]** - set a predefined space
|
|
6
|
+
*
|
|
7
|
+
* Possible <spaces> are:
|
|
8
|
+
* - **pt** - padding-top
|
|
9
|
+
* - **pr** - padding-right
|
|
10
|
+
* - **pb** - padding-bottom
|
|
11
|
+
* - **pl** - padding-left
|
|
12
|
+
*
|
|
13
|
+
* @location utils.padding Padding
|
|
14
|
+
* @example
|
|
15
|
+
* <div class="padding bg bg-black"><div class="bg bg-white">text</div></div>
|
|
16
|
+
*/
|
|
17
|
+
.padding,
|
|
18
|
+
.pxy {
|
|
19
|
+
padding: var(--pt, calc(var(--space-unit) * var(--space-pt, var(--space-normal))))
|
|
20
|
+
var(--pr, calc(var(--space-unit) * var(--space-pr, var(--space-normal))))
|
|
21
|
+
var(--pb, calc(var(--space-unit) * var(--space-pb, var(--space-normal))))
|
|
22
|
+
var(--pl, calc(var(--space-unit) * var(--space-pl, var(--space-normal))));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Using `pt` to add padding top to your element.
|
|
27
|
+
* Possible variables are:
|
|
28
|
+
* - **--pt** - set direclty a spacing unit
|
|
29
|
+
* - **--space-pt** - set a predefined space
|
|
30
|
+
*
|
|
31
|
+
* @location utils.padding.top Padding top
|
|
32
|
+
* @example
|
|
33
|
+
* <div class="pt bg bg-black"><div class="bg bg-white">text</div></div>
|
|
34
|
+
*/
|
|
35
|
+
.pt,
|
|
36
|
+
.py {
|
|
37
|
+
padding-top: var(--pt, calc(var(--space-unit) * var(--space-pt, var(--space-normal))));
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Using `pr` to add padding right to your element.
|
|
42
|
+
* Possible variables are:
|
|
43
|
+
* - **--pr** - set direclty a spacing unit
|
|
44
|
+
* - **--space-pr** - set a predefined space
|
|
45
|
+
*
|
|
46
|
+
* @location utils.padding.right Padding right
|
|
47
|
+
* @example
|
|
48
|
+
* <div class="pr bg bg-black"><div class="bg bg-white">text</div></div>
|
|
49
|
+
*/
|
|
50
|
+
.pr,
|
|
51
|
+
.px {
|
|
52
|
+
padding-right: var(--pr, calc(var(--space-unit) * var(--space-pr, var(--space-normal))));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Using `pb` to add padding bottom to your element.
|
|
57
|
+
* Possible variables are:
|
|
58
|
+
* - **--pb** - set direclty a spacing unit
|
|
59
|
+
* - **--space-pb** - set a predefined space
|
|
60
|
+
*
|
|
61
|
+
* @location utils.padding.bottom Padding bottom
|
|
62
|
+
* @example
|
|
63
|
+
* <div class="pb bg bg-black"><div class="bg bg-white">text</div></div>
|
|
64
|
+
*/
|
|
65
|
+
.pb,
|
|
66
|
+
.py {
|
|
67
|
+
padding-bottom: var(--pb, calc(var(--space-unit) * var(--space-pb, var(--space-normal))));
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Using `pl` to add padding left to your element.
|
|
72
|
+
* Possible variables are:
|
|
73
|
+
* - **--pl** - set direclty a spacing unit
|
|
74
|
+
* - **--space-pl** - set a predefined space
|
|
75
|
+
*
|
|
76
|
+
* @location utils.padding.left Padding left
|
|
77
|
+
* @example
|
|
78
|
+
* <div class="pl bg bg-black"><div class="bg bg-white">text</div></div>
|
|
79
|
+
*/
|
|
80
|
+
.pl,
|
|
81
|
+
.px {
|
|
82
|
+
padding-left: var(--pl, calc(var(--space-unit) * var(--space-pl, var(--space-normal))));
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Using `pxy` to add padding for the x and y axies to your element.
|
|
87
|
+
* Possible variables are:
|
|
88
|
+
* - **--[space]** - set direclty a spacing unit
|
|
89
|
+
* - **--space-[space]** - set a predefined space
|
|
90
|
+
*
|
|
91
|
+
* Possible <spaces> are:
|
|
92
|
+
* - **my** - padding-top and padding-bottom
|
|
93
|
+
* - **mx** - padding-left and padding-right
|
|
94
|
+
|
|
95
|
+
* @location utils.padding.xy padding y-axis and x-axis
|
|
96
|
+
* @example
|
|
97
|
+
* <div class="pxy bg bg-black"><div class="bg bg-white">text</div></div>
|
|
98
|
+
*/
|
|
99
|
+
.pxy {
|
|
100
|
+
--pt: var(--py, calc(var(--space-unit) * var(--space-py, var(--space-normal))));
|
|
101
|
+
--pb: var(--py, calc(var(--space-unit) * var(--space-py, var(--space-normal))));
|
|
102
|
+
--pl: var(--px, calc(var(--space-unit) * var(--space-px, var(--space-normal))));
|
|
103
|
+
--pr: var(--px, calc(var(--space-unit) * var(--space-px, var(--space-normal))));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/**
|
|
107
|
+
* Using `py` to add paddings tob and bottom with same size to your element.
|
|
108
|
+
* Possible variables are:
|
|
109
|
+
* - **--py** - set direclty a spacing unit
|
|
110
|
+
* - **--space-py** - set a predefined space
|
|
111
|
+
*
|
|
112
|
+
* @location utils.padding.y Padding y-axis
|
|
113
|
+
* @example
|
|
114
|
+
* <div class="py bg bg-black"><div class="bg bg-white">text</div></div>
|
|
115
|
+
*/
|
|
116
|
+
.py {
|
|
117
|
+
--pt: var(--py, calc(var(--space-unit) * var(--space-py, var(--space-normal))));
|
|
118
|
+
--pb: var(--py, calc(var(--space-unit) * var(--space-py, var(--space-normal))));
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Using `px` to add paddings left and right with same size to your element.
|
|
123
|
+
* Possible variables are:
|
|
124
|
+
* - **--px** - set direclty a spacing unit
|
|
125
|
+
* - **--space-px** - set a predefined space
|
|
126
|
+
*
|
|
127
|
+
* @location utils.padding.x Padding x-axis
|
|
128
|
+
* @example
|
|
129
|
+
* <div class="px bg bg-black"><div class="bg bg-white">text</div></div>
|
|
130
|
+
*/
|
|
131
|
+
.px {
|
|
132
|
+
--pl: var(--px, calc(var(--space-unit) * var(--space-px, var(--space-normal))));
|
|
133
|
+
--pr: var(--px, calc(var(--space-unit) * var(--space-px, var(--space-normal))));
|
|
134
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Limit width of content. Use the `--width-content` variable to set the width and the `--width-min-offset-x` to
|
|
3
|
+
* set the minimum required space on the left and right side. If you want to offset the content a little bit but
|
|
4
|
+
* keep the same settings from `--width-content` and `--width-min-offset-x` you can use the `--width-content-offset`
|
|
5
|
+
* variable.
|
|
6
|
+
*
|
|
7
|
+
* @location utils.width Width (Content)
|
|
8
|
+
*/
|
|
9
|
+
[class^="width-"],
|
|
10
|
+
[class*=" width-"] {
|
|
11
|
+
/* use padding to get content to a specific width https://css-tricks.com/using-max-for-an-inner-element-max-width/ */
|
|
12
|
+
--width-calc: max(
|
|
13
|
+
calc(var(--width-min-offset-x) - var(--width-content-offset, 0px)),
|
|
14
|
+
calc((100% - var(--width-content)) / 2 - var(--width-content-offset, 0px))
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
padding-inline: var(--width-calc);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* @location utils.width.content Width base/default
|
|
22
|
+
* @example
|
|
23
|
+
* <div class="width-content">
|
|
24
|
+
* <div class="bg bg-black" style="min-height: 1em"></div>
|
|
25
|
+
* </div>
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
/* .width-content {} */
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* @location utils.width.small Width small
|
|
32
|
+
* @example
|
|
33
|
+
* <div class="width-sm">
|
|
34
|
+
* <div class="bg bg-black" style="min-height: 1em"></div>
|
|
35
|
+
* </div>
|
|
36
|
+
*/
|
|
37
|
+
.width-sm {
|
|
38
|
+
--width-content: var(--width-sm);
|
|
39
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Buttons extend the `.control` class and can be used with different html attributes.
|
|
3
|
+
*
|
|
4
|
+
* @location components.button Button
|
|
5
|
+
* @example
|
|
6
|
+
* <button class="btn">Button</button>
|
|
7
|
+
* <button class="btn" disabled>Button disabled</button>
|
|
8
|
+
* <a href="#" class="btn">Link Button</a>
|
|
9
|
+
* <input type="submit" class="btn" value="Submit button" />
|
|
10
|
+
*/
|
|
11
|
+
.btn {
|
|
12
|
+
--space-py: var(--btn-space-py, var(--space-xs));
|
|
13
|
+
--space-px: var(--btn-space-px, var(--space-sm));
|
|
14
|
+
--font-size: var(--btn-font-size, var(--font-size-normal));
|
|
15
|
+
--font-weight: var(--btn-font-weight, var(--font-weight-bold));
|
|
16
|
+
|
|
17
|
+
color: rgb(var(--btn-font-color, var(--font-color)));
|
|
18
|
+
background: rgb(var(--btn-bg-color, var(--bg-color)));
|
|
19
|
+
transition: all ease var(--btn-animation-time, var(--animation-time));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* We are using the bg colors to modify the btn color. In combination with the accent color for hover effects.
|
|
24
|
+
*
|
|
25
|
+
* @location components.button.colors Colors
|
|
26
|
+
* @example
|
|
27
|
+
* <button class="btn bg-white">Button</button>
|
|
28
|
+
* <button class="btn bg-black">Button</button>
|
|
29
|
+
*/
|
|
30
|
+
.btn[class*="bg-"]:hover:not([aria-disabled="true"], [disabled], .no-hover) {
|
|
31
|
+
--btn-bg-color: var(--accent-color);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The hover effect when using bg colors is disabled when using disabled attributes. Or you can manually disable it with `.no-hover`.
|
|
36
|
+
*
|
|
37
|
+
* @location components.button.colors.hover Hover effect
|
|
38
|
+
* @example
|
|
39
|
+
* <button class="btn bg-black" aria-disabled="true">Disabled by aria</button>
|
|
40
|
+
* <button class="btn bg-black" disabled>Disabled</button>
|
|
41
|
+
* <button class="btn bg-black no-hover">No hover</button>
|
|
42
|
+
*/
|
|
@@ -1,32 +1,20 @@
|
|
|
1
1
|
.colors {
|
|
2
|
-
|
|
3
|
-
grid-
|
|
4
|
-
gap: var(--colors-gap, var(--size-normal));
|
|
5
|
-
|
|
6
|
-
@container content (width > 300px) {
|
|
7
|
-
--colors-columns: 2;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
@container content (width > 620px) {
|
|
11
|
-
--colors-columns: 3;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
@container content (width > 940px) {
|
|
15
|
-
--colors-columns: 4;
|
|
16
|
-
}
|
|
2
|
+
--grid-columns: 4;
|
|
3
|
+
--grid-item-min-width: 200px;
|
|
17
4
|
}
|
|
18
5
|
|
|
19
6
|
.colors > .item {
|
|
7
|
+
--space-px: var(--space-md);
|
|
8
|
+
--space-py: var(--space-xl);
|
|
9
|
+
|
|
20
10
|
display: flex;
|
|
21
11
|
flex-direction: column;
|
|
22
|
-
gap: var(--
|
|
12
|
+
gap: calc(var(--space-xs) * var(--space-unit));
|
|
23
13
|
justify-content: center;
|
|
24
14
|
|
|
25
|
-
padding: var(--size-xl) var(--size-md);
|
|
26
|
-
|
|
27
15
|
text-align: center;
|
|
28
16
|
|
|
29
|
-
border: 1px solid rgb(var(--border-color,
|
|
17
|
+
border: 1px solid rgb(var(--border-color, var(--font-color)));
|
|
30
18
|
|
|
31
19
|
> .text {
|
|
32
20
|
font-size: var(--font-size-md);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* You can use the container class to wrap your content in a container.
|
|
3
|
+
*
|
|
4
|
+
* @location components.container Container
|
|
5
|
+
* @code
|
|
6
|
+
* <div class="container"></div>
|
|
7
|
+
*/
|
|
8
|
+
.container {
|
|
9
|
+
> *:first-child {
|
|
10
|
+
margin-top: 0;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
> *:last-child {
|
|
14
|
+
margin-bottom: 0;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
1
|
.example,
|
|
2
2
|
.markup {
|
|
3
|
-
border: 1px solid rgb(var(--code-border-color, var(--border-color)));
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
.example,
|
|
7
|
-
.markup > .code > .hljs {
|
|
8
|
-
padding: 1em;
|
|
3
|
+
border: 1px solid rgb(var(--code-border-color, var(--border-color, var(--font-color))));
|
|
9
4
|
}
|
|
10
5
|
|
|
11
6
|
.example {
|