@ui-doc/html-renderer 0.3.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (102) hide show
  1. package/README.md +586 -151
  2. package/dist/HtmlCurlyBraceLexer.d.ts +4 -1
  3. package/dist/HtmlRenderer.d.ts +5 -5
  4. package/dist/InlineReader.d.ts +3 -2
  5. package/dist/{types/lexer.d.ts → Lexer.types.d.ts} +8 -5
  6. package/dist/NodeParser.d.ts +3 -2
  7. package/dist/{types/parser.d.ts → Parser.types.d.ts} +8 -8
  8. package/dist/{types/base.d.ts → Primitive.types.d.ts} +1 -1
  9. package/dist/{types/reader.d.ts → Reader.types.d.ts} +9 -7
  10. package/dist/Renderer.types.d.ts +14 -0
  11. package/dist/TemplateLoader.d.ts +3 -2
  12. package/dist/{types/token.d.ts → Token.types.d.ts} +1 -1
  13. package/dist/assets/services/expand.d.ts +19 -0
  14. package/dist/assets/ui-doc.cjs +283 -9
  15. package/dist/assets/ui-doc.cjs.map +1 -1
  16. package/dist/assets/ui-doc.css +1169 -250
  17. package/dist/assets/ui-doc.css.map +1 -1
  18. package/dist/assets/ui-doc.min.css +9 -1
  19. package/dist/assets/ui-doc.min.js +1 -1
  20. package/dist/assets/ui-doc.mjs +283 -9
  21. package/dist/assets/ui-doc.mjs.map +1 -1
  22. package/dist/assets/utils/delay.d.ts +1 -0
  23. package/dist/assets/utils/dom.d.ts +31 -0
  24. package/dist/assets/utils/select.d.ts +12 -0
  25. package/dist/index.cjs +161 -126
  26. package/dist/index.cjs.map +1 -1
  27. package/dist/index.d.ts +6 -1
  28. package/dist/index.mjs +160 -126
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/nodes/CommentNode.d.ts +2 -1
  31. package/dist/nodes/Node.d.ts +1 -1
  32. package/dist/nodes/TemplateNode.d.ts +2 -1
  33. package/dist/nodes/index.d.ts +4 -2
  34. package/dist/nodes/tags/debug.d.ts +2 -1
  35. package/dist/nodes/tags/for.d.ts +4 -3
  36. package/dist/nodes/tags/if.d.ts +5 -4
  37. package/dist/nodes/tags/index.d.ts +1 -1
  38. package/dist/nodes/tags/page.d.ts +2 -1
  39. package/dist/nodes/tags/partial.d.ts +2 -1
  40. package/dist/nodes/tags/var.d.ts +2 -1
  41. package/dist/utils/index.d.ts +1 -1
  42. package/package.json +32 -29
  43. package/scripts/app.ts +5 -3
  44. package/scripts/{src → services}/example.ts +3 -3
  45. package/scripts/services/expand.ts +214 -0
  46. package/scripts/{src → services}/sidebar.ts +4 -3
  47. package/scripts/utils/delay.ts +12 -0
  48. package/scripts/utils/dom.ts +77 -0
  49. package/scripts/utils/select.ts +46 -0
  50. package/styles/01_resets/initial.css +8 -3
  51. package/styles/01_resets/root/color.css +19 -0
  52. package/styles/01_resets/root/font.css +28 -0
  53. package/styles/01_resets/root/space.css +30 -0
  54. package/styles/01_resets/root/witdh.css +12 -0
  55. package/styles/01_resets/root.css +61 -23
  56. package/styles/01_resets/typography.css +105 -8
  57. package/styles/02_utils/background.css +14 -0
  58. package/styles/02_utils/control.css +41 -0
  59. package/styles/02_utils/margin.css +150 -0
  60. package/styles/02_utils/padding.css +134 -0
  61. package/styles/02_utils/width.css +39 -0
  62. package/styles/03_components/button.css +42 -0
  63. package/styles/03_components/colors.css +7 -19
  64. package/styles/03_components/container.css +16 -0
  65. package/styles/03_components/example-markup.css +1 -6
  66. package/styles/03_components/grid-auto.css +49 -0
  67. package/styles/03_components/icons.css +7 -19
  68. package/styles/03_components/navigation/burger-control.css +75 -0
  69. package/styles/03_components/{nav → navigation}/list.css +9 -11
  70. package/styles/03_components/navigation/main.css +102 -0
  71. package/styles/03_components/spaces.css +8 -7
  72. package/styles/04_layout/body.css +22 -0
  73. package/styles/04_layout/inline-code.css +6 -0
  74. package/styles/04_layout/page.css +73 -0
  75. package/styles/index.css +58 -17
  76. package/templates/layouts/default.html +4 -6
  77. package/templates/layouts/example.html +1 -1
  78. package/templates/pages/default.html +13 -13
  79. package/templates/pages/index.html +9 -3
  80. package/templates/partials/code.html +1 -1
  81. package/templates/partials/colors.html +2 -2
  82. package/templates/partials/content.html +1 -1
  83. package/templates/partials/icons.html +3 -3
  84. package/templates/partials/nav-main.html +19 -8
  85. package/templates/partials/section.html +1 -1
  86. package/templates/partials/spaces.html +2 -2
  87. package/LICENSE.md +0 -9
  88. package/dist/assets/src/utils.d.ts +0 -2
  89. package/dist/types/index.d.ts +0 -6
  90. package/dist/types/renderer.d.ts +0 -14
  91. package/scripts/src/utils.ts +0 -20
  92. package/styles/02_objects/background.css +0 -7
  93. package/styles/02_objects/control.css +0 -25
  94. package/styles/02_objects/margin.css +0 -44
  95. package/styles/02_objects/padding.css +0 -44
  96. package/styles/02_objects/text.css +0 -3
  97. package/styles/02_objects/width.css +0 -16
  98. package/styles/03_components/nav/main.css +0 -39
  99. package/styles/03_components/text-flow.css +0 -5
  100. package/styles/04_layouts/page.css +0 -70
  101. /package/dist/assets/{src → services}/example.d.ts +0 -0
  102. /package/dist/assets/{src → services}/sidebar.d.ts +0 -0
@@ -0,0 +1,12 @@
1
+ export function throttle<T extends unknown[]>(callback: (...args: T) => void, delay: number) {
2
+ let timerFlag: number | null = null
3
+
4
+ return (...args: T) => {
5
+ if (timerFlag === null) {
6
+ callback(...args)
7
+ timerFlag = window.setTimeout(() => {
8
+ timerFlag = null
9
+ }, delay)
10
+ }
11
+ }
12
+ }
@@ -0,0 +1,77 @@
1
+ /**
2
+ * Run function when dom is ready
3
+ *
4
+ * @param callback function to run when dom is ready
5
+ */
6
+ export function ready(callback: (this: Document) => void): void {
7
+ if (document.readyState !== 'loading') {
8
+ callback.call(document)
9
+ } else {
10
+ document.addEventListener('DOMContentLoaded', callback)
11
+ }
12
+ }
13
+
14
+ /**
15
+ * Animate an element using css animations/transitions. This function will add the necessary
16
+ * classes to the element to trigger the animation.
17
+ * When doing an entering animation following classes will be added:
18
+ * - `[animation-name]-enter-active`
19
+ * - `[animation-name]-enter-from`
20
+ * - `[animation-name]-enter-to`
21
+ * When doing a leaving animation following classes will be added:
22
+ * - `[animation-name]-leave-active`
23
+ * - `[animation-name]-leave-from`
24
+ * - `[animation-name]-leave-to`
25
+ *
26
+ * The animation classes will be removed after the animation is done. If a callback is provided
27
+ * it will be called after the animation is done.
28
+ *
29
+ * The `-active` class will stay on the element until the animation is done. The `-from` class will
30
+ * be removed after the first frame and the `-to`
31
+ * class will be added after the first frame.
32
+ *
33
+ * @param target html element to animate
34
+ * @param animationName animation name to be used
35
+ * @param entering determine if the elements animation should be entering or leaving
36
+ * @param callback to be called after the animation is done
37
+ */
38
+ export function animate(
39
+ target: HTMLElement,
40
+ animationName: string,
41
+ entering: boolean,
42
+ callback?: () => void,
43
+ ): void {
44
+ const animationState = entering ? 'enter' : 'leave'
45
+ const animateClassActive = `${animationName}-${animationState}-active`
46
+ const animateClassTo = `${animationName}-${animationState}-to`
47
+ const animateClassFrom = `${animationName}-${animationState}-from`
48
+ const afterAnimation = (): void => {
49
+ target.classList.remove(animateClassTo, animateClassActive)
50
+ target.removeEventListener('animationend', afterAnimation)
51
+ target.removeEventListener('transitionend', afterAnimation)
52
+
53
+ if (callback) {
54
+ callback()
55
+ }
56
+ }
57
+
58
+ target.addEventListener('animationend', afterAnimation)
59
+ target.addEventListener('transitionend', afterAnimation)
60
+
61
+ target.addEventListener('animationcancel', afterAnimation)
62
+ target.addEventListener('transitioncancel', afterAnimation)
63
+
64
+ target.classList.add(animateClassActive, animateClassFrom)
65
+ requestAnimationFrame(() => {
66
+ const styles = window.getComputedStyle(target)
67
+
68
+ // if the element has no transition or animation we can call the afterAnimation function in the
69
+ // next frame
70
+ if (['all', 'none'].includes(styles.transition) && styles.animationName === 'none') {
71
+ requestAnimationFrame(afterAnimation)
72
+ }
73
+
74
+ target.classList.remove(animateClassFrom)
75
+ target.classList.add(animateClassTo)
76
+ })
77
+ }
@@ -0,0 +1,46 @@
1
+ /**
2
+ * Query the first parent element that matches the selector
3
+ *
4
+ * @param element to search in
5
+ * @param selector to be matched
6
+ * @param maxDepth maximum depth to search
7
+ * @returns element that matches the selector
8
+ */
9
+
10
+ export function queryParentSelector<K extends keyof HTMLElementTagNameMap>(
11
+ element: HTMLElement | null,
12
+ selector: K,
13
+ maxDepth?: number,
14
+ ): HTMLElementTagNameMap[K] | null
15
+ export function queryParentSelector<K extends keyof SVGElementTagNameMap>(
16
+ element: HTMLElement | null,
17
+ selector: K,
18
+ maxDepth?: number,
19
+ ): SVGElementTagNameMap[K] | null
20
+ export function queryParentSelector<K extends keyof MathMLElementTagNameMap>(
21
+ element: HTMLElement | null,
22
+ selectors: K,
23
+ maxDepth?: number,
24
+ ): MathMLElementTagNameMap[K] | null
25
+ export function queryParentSelector<E extends Element = Element>(
26
+ element: HTMLElement | null,
27
+ selector: string,
28
+ maxDepth?: number,
29
+ ): E | null
30
+ export function queryParentSelector(
31
+ element: HTMLElement | null,
32
+ selector: string,
33
+ maxDepth = 10,
34
+ ): Element | null {
35
+ if (maxDepth <= 0 || element === null) {
36
+ return null
37
+ }
38
+
39
+ if (element.matches(selector)) {
40
+ return element as Element
41
+ }
42
+
43
+ return element.parentElement
44
+ ? queryParentSelector(element.parentElement, selector, maxDepth - 1)
45
+ : null
46
+ }
@@ -1,6 +1,5 @@
1
1
  * {
2
2
  box-sizing: border-box;
3
- margin: 0;
4
3
  }
5
4
 
6
5
  *::after,
@@ -10,9 +9,15 @@
10
9
 
11
10
  ::selection {
12
11
  color: rgb(var(--selection-color));
13
- background-color: rgb(var(--selection-bg-color));
12
+ background: rgb(var(--selection-bg-color));
13
+ }
14
+
15
+ html {
16
+ scroll-behavior: smooth;
17
+ scroll-padding-top: var(--scroll-padding-top, 0);
14
18
  }
15
19
 
16
20
  body {
17
- background-color: rgb(var(--bg-color));
21
+ margin: 0;
22
+ background: rgb(var(--bg-color));
18
23
  }
@@ -0,0 +1,19 @@
1
+ /**
2
+ * The color variables are used to define the color palette.
3
+ *
4
+ * The color variables are defined by RGB value. When you want to use a color you need use the `rgb()` function. For example: `rgb(var(--color-black))`.
5
+ *
6
+ * @location variables.colors Colors
7
+ * @color {0 0 0|255 255 255} --color-black | Black
8
+ * @color {20 33 61|255 255 255} --color-blue | Blue
9
+ * @color {252 163 17} --color-yellow | Yellow
10
+ * @color {229 229 229} --color-gray | Gray
11
+ * @color {255 255 255} --color-white | White
12
+ */
13
+ :root {
14
+ --color-black: 0 0 0;
15
+ --color-blue: 20 33 61;
16
+ --color-yellow: 252 163 17;
17
+ --color-gray: 229 229 229;
18
+ --color-white: 255 255 255;
19
+ }
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Set of predefined font variables.
3
+ *
4
+ * @location variables.font Font
5
+ */
6
+ :root {
7
+ /**
8
+ * Font weights are a set of predefined values that can be used to define the weight of a font:
9
+ * - **--font-weight-normal**
10
+ * - **--font-weight-bold**
11
+ *
12
+ * @location variables.font.weight Font weight
13
+ */
14
+ --font-weight-normal: 400;
15
+ --font-weight-bold: 700;
16
+
17
+ /**
18
+ * Font sizes are a set of predefined values that can be used to define the size of a font:
19
+ * - **--font-size-sm**
20
+ * - **--font-size-normal**
21
+ * - **--font-size-md**
22
+ *
23
+ * @location variables.font.size Font size
24
+ */
25
+ --font-size-sm: 0.85em;
26
+ --font-size-normal: 1em;
27
+ --font-size-md: 1.2em;
28
+ }
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Space are a set of predefined values that can be used to define the space of an element.
3
+ * When spaces are used there is always a set of two variables you can use the `--space-unit` and `--space-<size>`.
4
+ * The `--space-unit` is the base unit that will be multiplied by the `--space-<size>`. Depending on the context
5
+ * you are using the space `<size>` changes.
6
+ *
7
+ * The predefined space can the be set in a specific context by defining the `--space-<size>` variable.
8
+ * For example the space unit is `1rem` and we are in the padding context, we can use `--space-pt: var(--space-md);` to change the padding
9
+ * top to the medium space.
10
+ *
11
+ * @location variables.spaces Spaces
12
+ * @space {0.35em} --space-xxs | Extra extra small
13
+ * @space {0.5em} --space-xs | Extra small
14
+ * @space {0.7em} --space-sm | Small
15
+ * @space {1em} --space-normal | Normal
16
+ * @space {1.3em} --space-md | Medium
17
+ * @space {1.8em} --space-lg | Large
18
+ * @space {3.2em} --space-xl | Extra large
19
+ * @space {4.8em} --space-xxl | Extra extra large
20
+ */
21
+ :root {
22
+ --space-xxs: 0.35;
23
+ --space-xs: 0.5;
24
+ --space-sm: 0.7;
25
+ --space-normal: 1;
26
+ --space-md: 1.3;
27
+ --space-lg: 1.8;
28
+ --space-xl: 3.2;
29
+ --space-xxl: 4.8;
30
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Widths are a set of predefined values that can be used to limit the content width.
3
+ *
4
+ * - `--width-min-offset-x` - The minimum space on the left and right side.
5
+ * - `--width-content` - The width of the content.
6
+ *
7
+ * @location variables.width Width (Content)
8
+ */
9
+ :root {
10
+ --width-min-offset-x: 22px;
11
+ --width-content: 1200px;
12
+ }
@@ -1,36 +1,74 @@
1
+ @import url("./root/color.css");
2
+ @import url("./root/font.css");
3
+ @import url("./root/space.css");
4
+ @import url("./root/witdh.css");
5
+
6
+ /**
7
+ * There are some global veriables that are used in the project. These variables are a base set and can be changed depending on context and requirements. All components are using these variables to define the style or as a fallback if there more specific named variable is not present.
8
+ *
9
+ * @location variables.global Globals
10
+ */
1
11
  :root {
2
- --font-weight-normal: 400;
3
- --font-weight-bold: 700;
4
- --font-size-sm: 0.85em;
5
- --font-size-normal: 1em;
6
- --font-size-md: 1.2em;
7
- --font-size-lg: 1.7em;
12
+ /**
13
+ * - `--font-space-unit` - The spacing unit when using font related spaces (see the spaces documentation for mor details).
14
+ * - `--font-size-base` - The base font size.
15
+ * - `--font-color` - used font color.
16
+ * - `--font-family` - uded font family.
17
+ * - `--font-weight` - used font weight.
18
+ * - `--font-size` - used font size.
19
+ * - `--font-line-height` - used font line height.
20
+ *
21
+ * @location variables.global.font Font
22
+ */
23
+ --font-space-unit: 1em;
8
24
  --font-size-base: 16px;
9
- --font-color: 3 3 3;
25
+ --font-color: var(--color-black);
10
26
  --font-family: system-ui, "Segoe UI", roboto, helvetica, arial, sans-serif, "Apple Color Emoji",
11
27
  "Segoe UI Emoji", "Segoe UI Symbol";
12
28
  --font-weight: var(--font-weight-normal);
13
29
  --font-size: var(--font-size-normal);
14
30
  --font-line-height: 1.4;
15
- --headline-weight: var(--font-weight-bold);
16
- --bg-color: 255 255 255;
17
- --accent-color: 3 3 200;
18
- --border-color: 5 5 5;
31
+
32
+ /**
33
+ * - `--bg-color` - used background color
34
+ * - `--accent-color` - used accent color
35
+ * - `--selection-color` - used selection color
36
+ * - `--selection-bg-color` - used selection background color
37
+ * - `--animation-time` - used animation time
38
+ *
39
+ * @location variables.global.colors Colors
40
+ */
41
+ --bg-color: var(--color-white);
42
+ --accent-color: var(--color-yellow);
19
43
  --selection-color: var(--bg-color);
20
44
  --selection-bg-color: var(--font-color);
21
- --size-base-unit: 1rem;
22
- --size-xs: calc(0.5 * var(--size-base-unit));
23
- --size-sm: calc(0.8 * var(--size-base-unit));
24
- --size-normal: var(--size-base-unit);
25
- --size-md: calc(1.2 * var(--size-base-unit));
26
- --size-lg: calc(1.6 * var(--size-base-unit));
27
- --size-xl: calc(2.4 * var(--size-base-unit));
28
- --nav-main-menu-item-px: var(--size-sm);
29
- --nav-main-menu-item-py: var(--size-xs);
30
- --nav-main-menu-item-font-size: var(--font-size-md);
31
- --nav-main-height: calc(
32
- var(--nav-main-menu-item-py) * 2 + var(--nav-main-menu-item-font-size) * var(--font-line-height)
45
+ --space-unit: 1em;
46
+
47
+ /**
48
+ *
49
+ * - `--animation-time` - used animation time
50
+ *
51
+ * @location variables.global.animation Animation
52
+ */
53
+ --animation-time: 0.25s;
54
+
55
+ /**
56
+ * @location variables.global.nav-main Main navigation
57
+ */
58
+ --nav-main-bar-item-space-x: var(--space-normal);
59
+ --nav-main-bar-item-space-y: var(--space-sm);
60
+ --nav-main-bar-item-height: calc(
61
+ (var(--font-size) * var(--font-line-height)) +
62
+ (var(--space-unit) * var(--nav-main-bar-item-space-y) * 2)
33
63
  );
64
+ --nav-main-menu-space-t: var(--space-sm);
65
+ --nav-main-menu-space-b: var(--space-normal);
66
+ --nav-main-height: var(--nav-main-bar-item-height);
67
+
68
+ /**
69
+ * @location variables.global.nav-main Main navigation
70
+ */
71
+ --scroll-padding-top: var(--nav-main-height);
34
72
 
35
73
  color-scheme: light;
36
74
  }
@@ -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, inherit);
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, none);
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
+ }