@adnap/krysalicss 0.0.1 → 0.1.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 (217) hide show
  1. package/README.md +23 -5
  2. package/dist/element/badge.css +30 -0
  3. package/dist/element/badge.min.css +1 -1
  4. package/dist/element/box.css +193 -0
  5. package/dist/element/box.min.css +1 -0
  6. package/dist/element/button.css +4 -0
  7. package/dist/element/button.min.css +1 -1
  8. package/dist/element/divider.css +155 -0
  9. package/dist/element/divider.min.css +1 -0
  10. package/dist/element/image.css +434 -0
  11. package/dist/element/image.min.css +1 -0
  12. package/dist/element/range.css +2 -2
  13. package/dist/element/spinner.css +190 -0
  14. package/dist/element/spinner.min.css +1 -0
  15. package/dist/helper/border.css +141 -0
  16. package/dist/helper/border.min.css +1 -0
  17. package/dist/helper/color.css +203 -0
  18. package/dist/helper/color.min.css +1 -0
  19. package/dist/helper/flex.css +277 -0
  20. package/dist/helper/flex.min.css +1 -0
  21. package/dist/helper/font-size.css +137 -0
  22. package/dist/helper/font-size.min.css +1 -0
  23. package/dist/helper/interactions.css +142 -0
  24. package/dist/helper/interactions.min.css +1 -0
  25. package/dist/helper/line-height.css +129 -0
  26. package/dist/helper/line-height.min.css +1 -0
  27. package/dist/helper/object-fit.css +133 -0
  28. package/dist/helper/object-fit.min.css +1 -0
  29. package/dist/helper/overflow.css +165 -0
  30. package/dist/helper/overflow.min.css +1 -0
  31. package/dist/helper/position.css +157 -0
  32. package/dist/helper/position.min.css +1 -0
  33. package/dist/helper/ratio.css +142 -0
  34. package/dist/helper/ratio.min.css +1 -0
  35. package/dist/helper/shadow.css +129 -0
  36. package/dist/helper/shadow.min.css +1 -0
  37. package/dist/helper/sizing.css +177 -0
  38. package/dist/helper/sizing.min.css +1 -0
  39. package/dist/helper/spacing.css +563 -0
  40. package/dist/helper/spacing.min.css +1 -0
  41. package/dist/helper/stack.css +127 -0
  42. package/dist/helper/stack.min.css +1 -0
  43. package/dist/helper/text.css +243 -0
  44. package/dist/helper/text.min.css +1 -0
  45. package/dist/helper/tooltip.css +174 -0
  46. package/dist/helper/tooltip.min.css +1 -0
  47. package/dist/helper/visibility.css +334 -0
  48. package/dist/helper/visibility.min.css +1 -0
  49. package/dist/krysalicss.css +3491 -414
  50. package/dist/krysalicss.css.map +1 -1
  51. package/dist/krysalicss.min.css +1 -1
  52. package/dist/layout/footer.css +155 -0
  53. package/dist/layout/footer.min.css +1 -0
  54. package/dist/layout/hero.css +177 -0
  55. package/dist/layout/hero.min.css +1 -0
  56. package/dist/module/alert.css +30 -0
  57. package/dist/module/alert.min.css +1 -1
  58. package/dist/module/breadcrumb.css +163 -0
  59. package/dist/module/breadcrumb.min.css +1 -0
  60. package/dist/module/buttons.css +158 -0
  61. package/dist/module/buttons.min.css +1 -0
  62. package/dist/module/card.css +89 -0
  63. package/dist/module/card.min.css +1 -1
  64. package/dist/module/dropdown.css +253 -0
  65. package/dist/module/dropdown.min.css +1 -0
  66. package/dist/module/navbar.css +1 -1
  67. package/dist/module/navbar.min.css +1 -1
  68. package/dist/module/pagination.css +301 -0
  69. package/dist/module/pagination.min.css +1 -0
  70. package/dist/module/popover.css +272 -0
  71. package/dist/module/popover.min.css +1 -0
  72. package/dist/module/section.css +138 -0
  73. package/dist/module/section.min.css +1 -0
  74. package/dist/module/toast.css +307 -0
  75. package/dist/module/toast.min.css +1 -0
  76. package/dist/scss-api.json +4672 -0
  77. package/dist/typography/blockquote.css +128 -0
  78. package/dist/typography/blockquote.min.css +1 -0
  79. package/dist/typography/figure.css +132 -0
  80. package/dist/typography/figure.min.css +1 -0
  81. package/dist/typography/lead.css +119 -0
  82. package/dist/typography/lead.min.css +1 -0
  83. package/dist/typography/list.css +125 -0
  84. package/dist/typography/list.min.css +1 -0
  85. package/package.json +8 -2
  86. package/src/base/global/_plugin.scss +2 -0
  87. package/src/base/reset/_plugin.scss +2 -0
  88. package/src/base/reset/_variables.scss +2 -0
  89. package/src/element/_index.scss +4 -0
  90. package/src/element/badge/_plugin.scss +6 -8
  91. package/src/element/badge/_variables.scss +4 -6
  92. package/src/element/box/_index.scss +2 -0
  93. package/src/element/box/_plugin.scss +31 -0
  94. package/src/element/box/_variables.scss +18 -0
  95. package/src/element/button/_plugin.scss +20 -1
  96. package/src/element/checkbox/_plugin.scss +3 -4
  97. package/src/element/checkbox/_variables.scss +2 -5
  98. package/src/element/divider/_index.scss +2 -0
  99. package/src/element/divider/_plugin.scss +69 -0
  100. package/src/element/divider/_variables.scss +16 -0
  101. package/src/element/file/_plugin.scss +2 -0
  102. package/src/element/file/_variables.scss +2 -6
  103. package/src/element/image/_index.scss +2 -0
  104. package/src/element/image/_plugin.scss +106 -0
  105. package/src/element/image/_variables.scss +53 -0
  106. package/src/element/progress/_plugin.scss +9 -28
  107. package/src/element/progress/_variables.scss +2 -8
  108. package/src/element/radio/_plugin.scss +4 -4
  109. package/src/element/radio/_variables.scss +2 -2
  110. package/src/element/range/_plugin.scss +9 -20
  111. package/src/element/range/_variables.scss +7 -1
  112. package/src/element/select/_plugin.scss +3 -4
  113. package/src/element/select/_variables.scss +2 -6
  114. package/src/element/spinner/_index.scss +2 -0
  115. package/src/element/spinner/_plugin.scss +78 -0
  116. package/src/element/spinner/_variables.scss +22 -0
  117. package/src/element/switch/_plugin.scss +6 -10
  118. package/src/element/switch/_variables.scss +2 -10
  119. package/src/element/text-input/_plugin.scss +3 -1
  120. package/src/element/text-input/_variables.scss +5 -5
  121. package/src/element/textarea/_plugin.scss +3 -1
  122. package/src/element/textarea/_variables.scss +2 -2
  123. package/src/helper/_border.scss +43 -0
  124. package/src/helper/_color.scss +29 -0
  125. package/src/helper/{_controls.scss → _controls-internal.scss} +21 -0
  126. package/src/helper/_flex.scss +89 -0
  127. package/src/helper/_font-size.scss +22 -0
  128. package/src/helper/_index.scss +18 -1
  129. package/src/helper/_interactions.scss +41 -0
  130. package/src/helper/_line-height.scss +22 -0
  131. package/src/helper/_object-fit.scss +15 -0
  132. package/src/helper/_overflow.scss +28 -0
  133. package/src/helper/_position.scss +47 -0
  134. package/src/helper/_ratio.scss +35 -0
  135. package/src/helper/_shadow.scss +31 -0
  136. package/src/helper/_sizing.scss +65 -0
  137. package/src/helper/_spacing.scss +95 -0
  138. package/src/helper/_stack.scss +24 -0
  139. package/src/helper/_state.scss +2 -17
  140. package/src/helper/_text.scss +92 -0
  141. package/src/helper/_tooltip.scss +100 -0
  142. package/src/helper/_visibility.scss +80 -0
  143. package/src/layout/_index.scss +2 -0
  144. package/src/layout/container/_plugin.scss +2 -0
  145. package/src/layout/container/_variables.scss +2 -0
  146. package/src/layout/flex/_plugin.scss +2 -1
  147. package/src/layout/flex/_variables.scss +2 -2
  148. package/src/layout/footer/_index.scss +2 -0
  149. package/src/layout/footer/_plugin.scss +24 -0
  150. package/src/layout/footer/_variables.scss +11 -0
  151. package/src/layout/grid/_plugin.scss +2 -0
  152. package/src/layout/grid/_variables.scss +20 -16
  153. package/src/layout/hero/_index.scss +2 -0
  154. package/src/layout/hero/_plugin.scss +54 -0
  155. package/src/layout/hero/_variables.scss +23 -0
  156. package/src/module/_index.scss +7 -0
  157. package/src/module/alert/_plugin.scss +6 -1
  158. package/src/module/alert/_variables.scss +7 -0
  159. package/src/module/breadcrumb/_index.scss +2 -0
  160. package/src/module/breadcrumb/_plugin.scss +73 -0
  161. package/src/module/breadcrumb/_variables.scss +27 -0
  162. package/src/module/buttons/_index.scss +2 -0
  163. package/src/module/buttons/_plugin.scss +67 -0
  164. package/src/module/buttons/_variables.scss +10 -0
  165. package/src/module/card/_plugin.scss +96 -2
  166. package/src/module/card/_variables.scss +39 -0
  167. package/src/module/dropdown/_index.scss +2 -0
  168. package/src/module/dropdown/_plugin.scss +155 -0
  169. package/src/module/dropdown/_variables.scss +50 -0
  170. package/src/module/field/_plugin.scss +2 -0
  171. package/src/module/modal/_plugin.scss +2 -0
  172. package/src/module/navbar/_plugin.scss +4 -1
  173. package/src/module/navbar/_variables.scss +6 -2
  174. package/src/module/pagination/_index.scss +2 -0
  175. package/src/module/pagination/_plugin.scss +276 -0
  176. package/src/module/pagination/_variables.scss +64 -0
  177. package/src/module/popover/_index.scss +2 -0
  178. package/src/module/popover/_plugin.scss +183 -0
  179. package/src/module/popover/_variables.scss +44 -0
  180. package/src/module/section/_index.scss +2 -0
  181. package/src/module/section/_plugin.scss +47 -0
  182. package/src/module/section/_variables.scss +24 -0
  183. package/src/module/tabs/_plugin.scss +3 -1
  184. package/src/module/toast/_index.scss +2 -0
  185. package/src/module/toast/_plugin.scss +184 -0
  186. package/src/module/toast/_variables.scss +56 -0
  187. package/src/typography/_index.scss +4 -0
  188. package/src/typography/base/_plugin.scss +2 -0
  189. package/src/typography/base/_variables.scss +4 -3
  190. package/src/typography/blockquote/_index.scss +2 -0
  191. package/src/typography/blockquote/_plugin.scss +22 -0
  192. package/src/typography/blockquote/_variables.scss +13 -0
  193. package/src/typography/content/_plugin.scss +2 -0
  194. package/src/typography/content/_variables.scss +2 -0
  195. package/src/typography/figure/_index.scss +2 -0
  196. package/src/typography/figure/_plugin.scss +29 -0
  197. package/src/typography/figure/_variables.scss +13 -0
  198. package/src/typography/lead/_index.scss +2 -0
  199. package/src/typography/lead/_plugin.scss +12 -0
  200. package/src/typography/lead/_variables.scss +6 -0
  201. package/src/typography/link/_mixins.scss +2 -0
  202. package/src/typography/link/_plugin.scss +2 -0
  203. package/src/typography/link/_variables.scss +2 -0
  204. package/src/typography/list/_index.scss +2 -0
  205. package/src/typography/list/_plugin.scss +18 -0
  206. package/src/typography/list/_variables.scss +6 -0
  207. package/src/typography/table/_plugin.scss +2 -0
  208. package/src/typography/table/_variables.scss +2 -0
  209. package/src/typography/title/_plugin.scss +2 -0
  210. package/src/typography/title/_variables.scss +2 -0
  211. package/src/variables/_color.scss +20 -12
  212. package/src/variables/_feature.scss +36 -0
  213. package/src/variables/_global.scss +8 -0
  214. package/src/variables/_selector.scss +1 -0
  215. package/dist/tokens/dark.json +0 -85
  216. package/dist/tokens/default.json +0 -85
  217. package/dist/tokens/high-contrast.json +0 -85
@@ -0,0 +1,47 @@
1
+ @use "variables" as *;
2
+ @use "../../variables";
3
+
4
+ // Documentation: ../../../docs/src/pages/reference/components/module/section.mdx
5
+
6
+ @if variables.$feature-module-section {
7
+ // Density tokens emitted here (not in `theme/_create.scss`) because
8
+ // density is orthogonal to theme and `.section` is the only consumer.
9
+ // Default tokens land on `:root`; overrides are scoped to any
10
+ // `[data-density]` carrier so consumers can switch density at three
11
+ // granularities — page (`:root[data-density]`), page-region
12
+ // (`<main data-density>`), or per-section (`<section class="section"
13
+ // data-density>`). Variables cascade so the nearest carrier wins.
14
+ //
15
+ // `--kc-section-*` namespacing: gutter and max-width are plugin-private
16
+ // so they don't pollute the global token namespace. `.container` is the
17
+ // only other reader and is shipped alongside.
18
+ :root {
19
+ --kc-section-py: #{$padding-y};
20
+ --kc-section-gutter-x: #{$gutter-x};
21
+ --kc-section-max-w: #{$max-width};
22
+ }
23
+
24
+ [data-density="compact"] {
25
+ --kc-section-py: #{$padding-y-compact};
26
+ --kc-section-gutter-x: #{$gutter-x-compact};
27
+ }
28
+
29
+ [data-density="aere"] {
30
+ --kc-section-py: #{$padding-y-aere};
31
+ --kc-section-gutter-x: #{$gutter-x-aere};
32
+ }
33
+
34
+ #{$selector} {
35
+ position: relative;
36
+ padding: var(--kc-section-py, #{$padding-y})
37
+ var(--kc-section-gutter-x, #{$gutter-x});
38
+ border-bottom: 1px solid var(--kc-border-1, #{$border-fallback});
39
+
40
+ // `:last-of-type` rather than `:last-child` so adjacent non-`.section`
41
+ // siblings (e.g. footer) don't re-enable the border on the preceding
42
+ // section.
43
+ &:last-of-type {
44
+ border-bottom: 0;
45
+ }
46
+ }
47
+ }
@@ -0,0 +1,24 @@
1
+ @use "../../variables";
2
+
3
+ // Documentation: ../../../docs/src/pages/reference/components/module/section.mdx
4
+
5
+ $selector: ".section" !default;
6
+
7
+ // Page-level vertical rhythm. Derived from `$global-gap` so a consumer
8
+ // retuning the framework's spacing scale at the root carries through to
9
+ // section padding. Defaults: 7rem / 3rem (was 112px / 48px), 5rem / 2rem
10
+ // (compact, was 80px / 32px), 9rem / 4rem (aere, was 144px / 64px).
11
+ $padding-y: 7 * variables.$global-gap !default;
12
+ $gutter-x: 3 * variables.$global-gap !default;
13
+
14
+ // Inner content-width cap. 80rem = 1280px at the 16px root. Matches the
15
+ // `widescreen` breakpoint in `variables/_responsive.scss:$breakpoints`.
16
+ $max-width: 80rem !default;
17
+
18
+ $padding-y-compact: 5 * variables.$global-gap !default;
19
+ $gutter-x-compact: 2 * variables.$global-gap !default;
20
+
21
+ $padding-y-aere: 9 * variables.$global-gap !default;
22
+ $gutter-x-aere: 4 * variables.$global-gap !default;
23
+
24
+ $border-fallback: currentColor !default;
@@ -1,7 +1,9 @@
1
1
  @use "sass:list";
2
2
  @use "variables" as *;
3
3
  @use "../../variables";
4
- @use "../../helper/controls" as controls;
4
+ @use "../../helper/controls-internal" as controls;
5
+
6
+ // Documentation: ../../../docs/src/pages/reference/components/module/tabs.mdx
5
7
 
6
8
  // JS-free pattern. Markup contract: each tab is a flat sequence of
7
9
  // input → label → panel siblings inside `.tabs`. The visible panel is
@@ -0,0 +1,2 @@
1
+ @forward "variables";
2
+ @forward "plugin";
@@ -0,0 +1,184 @@
1
+ @use "sass:list";
2
+ @use "variables" as *;
3
+ @use "../../variables";
4
+ @use "../../helper/controls-internal" as controls;
5
+
6
+ // Documentation: ../../../docs/src/pages/reference/components/module/toast.mdx
7
+
8
+ @if variables.$feature-module-toast {
9
+ #{$container-selector} {
10
+ position: fixed;
11
+ z-index: $z-index;
12
+ inset-block-start: 0;
13
+ inset-inline-end: 0;
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: $gap;
17
+ max-width: $max-width;
18
+ padding: $padding-x;
19
+ pointer-events: none;
20
+
21
+ &#{$top-start-modifier} {
22
+ inset-block-start: 0;
23
+ inset-block-end: auto;
24
+ inset-inline-start: 0;
25
+ inset-inline-end: auto;
26
+ align-items: flex-start;
27
+ }
28
+
29
+ &#{$top-center-modifier} {
30
+ inset-block-start: 0;
31
+ inset-block-end: auto;
32
+ inset-inline-start: 50%;
33
+ inset-inline-end: auto;
34
+ transform: translateX(-50%);
35
+ align-items: center;
36
+ }
37
+
38
+ &#{$top-end-modifier} {
39
+ inset-block-start: 0;
40
+ inset-block-end: auto;
41
+ inset-inline-start: auto;
42
+ inset-inline-end: 0;
43
+ align-items: flex-end;
44
+ }
45
+
46
+ &#{$bottom-start-modifier} {
47
+ inset-block-start: auto;
48
+ inset-block-end: 0;
49
+ inset-inline-start: 0;
50
+ inset-inline-end: auto;
51
+ align-items: flex-start;
52
+ }
53
+
54
+ &#{$bottom-center-modifier} {
55
+ inset-block-start: auto;
56
+ inset-block-end: 0;
57
+ inset-inline-start: 50%;
58
+ inset-inline-end: auto;
59
+ transform: translateX(-50%);
60
+ align-items: center;
61
+ }
62
+
63
+ &#{$bottom-end-modifier} {
64
+ inset-block-start: auto;
65
+ inset-block-end: 0;
66
+ inset-inline-start: auto;
67
+ inset-inline-end: 0;
68
+ align-items: flex-end;
69
+ }
70
+ }
71
+
72
+ #{$selector} {
73
+ @include variables.backgroundColor(
74
+ toast-bg,
75
+ list.nth($default-combination, 1),
76
+ );
77
+ @include variables.textColor(toast-fg, list.nth($default-combination, 2));
78
+ width: 100%;
79
+ max-width: $max-width;
80
+ border-radius: $border-radius;
81
+ box-shadow: $shadow;
82
+ pointer-events: auto;
83
+ opacity: 0;
84
+ transition: opacity $transition-duration ease;
85
+
86
+ @media (prefers-reduced-motion: reduce) {
87
+ transition: none;
88
+ }
89
+
90
+ // Hooks for both reveal mechanisms. The JS path adds `.is-show` to
91
+ // fade the toast in, then sets `[hidden]` (or removes the class) to
92
+ // dismiss. The CSS path renders the toast with `.is-show` already
93
+ // on the markup and dismisses via a hidden `<input type="checkbox">`
94
+ // sibling toggled by a `<label class="toast__dismiss">`. The
95
+ // `.is-show` surface is shared between both branches so it lives
96
+ // outside the `@if` to avoid emitting the same rule twice when
97
+ // `$controls` includes both 'css' and 'js'.
98
+ @if variables.has-controls("css", $controls)
99
+ or variables.has-controls("js", $controls) {
100
+ &#{$show-modifier} {
101
+ opacity: 1;
102
+ }
103
+ }
104
+
105
+ @if variables.has-controls("js", $controls) {
106
+ &[hidden] {
107
+ display: none;
108
+ }
109
+ }
110
+
111
+ @if variables.has-controls("css", $controls) {
112
+ &:has(#{$toggle-selector}:checked) {
113
+ display: none;
114
+ }
115
+
116
+ // Focus from the hidden checkbox lights up the paired dismiss
117
+ // label so keyboard users still see a focus ring on the visible
118
+ // close glyph.
119
+ &:has(#{$toggle-selector}:focus-visible) #{$dismiss-selector} {
120
+ @include controls.focus-ring();
121
+ }
122
+ }
123
+
124
+ #{$header-selector} {
125
+ display: flex;
126
+ align-items: center;
127
+ justify-content: space-between;
128
+ gap: $gap;
129
+ padding: $padding-y $padding-x;
130
+ }
131
+
132
+ #{$title-selector} {
133
+ font-weight: 600;
134
+ }
135
+
136
+ #{$dismiss-selector} {
137
+ // Reset UA chrome so a `<button>` renders as a bare glyph slot.
138
+ appearance: none;
139
+ background: none;
140
+ border: 0;
141
+ padding: 0;
142
+ cursor: pointer;
143
+ color: inherit;
144
+ font: inherit;
145
+ // 60% opacity is the smallest value that keeps the glyph legible
146
+ // against the toast surface while still reading as a secondary
147
+ // affordance next to the title. Hover/focus restore full opacity.
148
+ opacity: 0.6;
149
+ transition: opacity $transition-duration ease;
150
+
151
+ @media (prefers-reduced-motion: reduce) {
152
+ transition: none;
153
+ }
154
+
155
+ &:hover,
156
+ &:focus-visible {
157
+ opacity: 1;
158
+ }
159
+
160
+ &:focus-visible {
161
+ @include controls.focus-ring();
162
+ }
163
+ }
164
+
165
+ #{$body-selector} {
166
+ padding: $padding-y $padding-x;
167
+ }
168
+
169
+ // Nested links inherit the surface fg and carry an underline. Same
170
+ // rationale as alert/card: the page-level `--kc-link` is calibrated
171
+ // against the page bg, not the toast surface bg, so pairing with
172
+ // currentColor avoids contrast failures on themed `.is-*` variants.
173
+ @include controls.nestedLinks;
174
+
175
+ @include controls.combinations-apply();
176
+ @if $enable-light {
177
+ @include controls.combinations-apply-light();
178
+ }
179
+
180
+ @media (forced-colors: active) {
181
+ border: 1px solid CanvasText;
182
+ }
183
+ }
184
+ }
@@ -0,0 +1,56 @@
1
+ @use "../../variables";
2
+
3
+ // Documentation: ../../../docs/src/pages/reference/components/module/toast.mdx
4
+
5
+ $selector: ".toast" !default;
6
+ $container-selector: ".toast-container" !default;
7
+ $header-selector: ".toast__header" !default;
8
+ $title-selector: ".toast__title" !default;
9
+ $body-selector: ".toast__body" !default;
10
+ $dismiss-selector: ".toast__dismiss" !default;
11
+
12
+ // Hidden checkbox sibling that drives CSS-only dismissal. Paired with a
13
+ // `<label for=…>` that re-uses `$dismiss-selector` so the same chrome
14
+ // styles both the `<button>` (JS path) and the `<label>` (CSS path).
15
+ $toggle-selector: ".toast__toggle" !default;
16
+
17
+ // State modifiers. `$show-modifier` is the canonical "shown" hook for
18
+ // JS-driven reveals; the toast renders invisible at rest so consumer JS
19
+ // can fade it in by adding the class.
20
+ $show-modifier: "#{variables.$selector-prefix-is}show" !default;
21
+
22
+ // Anchor-position modifiers on the container.
23
+ $top-start-modifier: "#{variables.$selector-prefix-is}top-start" !default;
24
+ $top-center-modifier: "#{variables.$selector-prefix-is}top-center" !default;
25
+ $top-end-modifier: "#{variables.$selector-prefix-is}top-end" !default;
26
+ $bottom-start-modifier: "#{variables.$selector-prefix-is}bottom-start" !default;
27
+ $bottom-center-modifier: "#{variables.$selector-prefix-is}bottom-center"
28
+ !default;
29
+ $bottom-end-modifier: "#{variables.$selector-prefix-is}bottom-end" !default;
30
+
31
+ // Reveal mechanism(s). `'css'` emits the `<input type="checkbox">` +
32
+ // `<label>` dismiss branch (`:has(toggle:checked) { display: none }`).
33
+ // `'js'` emits the `.is-show` reveal + `[hidden]` dismiss hooks for
34
+ // consumer JS to drive. Both ship by default (matches the framework
35
+ // `$global-controls` contract).
36
+ $controls: variables.$global-controls !default;
37
+
38
+ // Local toggle for `.is-<combo>.is-light` emission. Derived from the
39
+ // framework-wide `$feature-light-variants` flag — see
40
+ // `variables/_feature.scss` for the cross-component rationale.
41
+ $enable-light: variables.$feature-light-variants !default;
42
+
43
+ $max-width: 420px !default;
44
+ $gap: variables.$size-extra-small !default;
45
+ $padding-y: variables.$size-small !default;
46
+ $padding-x: variables.$size-normal !default;
47
+
48
+ $border-radius: variables.$global-border-radius !default;
49
+
50
+ $z-index: 1090 !default;
51
+
52
+ $shadow: 0 6px 20px rgb(0 0 0 / 0.15) !default;
53
+
54
+ $transition-duration: variables.$global-transition-duration !default;
55
+
56
+ $default-combination: variables.$color-combination-default !default;
@@ -3,3 +3,7 @@
3
3
  @forward "link" as link-*;
4
4
  @forward "content" as content-*;
5
5
  @forward "table" as table-*;
6
+ @forward "lead" as lead-*;
7
+ @forward "blockquote" as blockquote-*;
8
+ @forward "list" as list-*;
9
+ @forward "figure" as figure-*;
@@ -1,6 +1,8 @@
1
1
  @use "variables" as *;
2
2
  @use "../../variables";
3
3
 
4
+ // Documentation: ../../../docs/src/pages/reference/components/typography/typography.mdx
5
+
4
6
  @if variables.$feature-typography-base {
5
7
  html {
6
8
  -moz-osx-font-smoothing: grayscale;
@@ -1,11 +1,12 @@
1
1
  @use "sass:map";
2
2
  @use "../../variables";
3
3
 
4
+ // Reference: ../../../docs/src/pages/reference/components/typography/typography.mdx
5
+
4
6
  $default-color: map.get(variables.$color-palette, black) !default;
5
7
 
6
- // Typography fundamentals derive from `$global-*` so consumers can configure
7
- // once at the top level. Per-component override still works: the local
8
- // `!default` accepts an explicit `@use 'typography/base' with (...)`.
8
+ // Fundamentals derive from `$global-*` so consumers configure once at the
9
+ // top level; per-component override still works via the local `!default`.
9
10
  $family-sans-serif: variables.$global-family-sans-serif !default;
10
11
  $family-monospace: variables.$global-family-monospace !default;
11
12
  $base-size: variables.$global-base-size !default;
@@ -0,0 +1,2 @@
1
+ @forward "variables";
2
+ @forward "plugin";
@@ -0,0 +1,22 @@
1
+ @use "variables" as *;
2
+ @use "../../variables";
3
+
4
+ // Documentation: ../../../docs/src/pages/reference/components/typography/blockquote.mdx
5
+
6
+ @if variables.$feature-typography-blockquote {
7
+ #{$selector} {
8
+ padding-inline-start: $padding-inline-start;
9
+ border-inline-start: $border-inline-start;
10
+ font-size: $font-size;
11
+
12
+ #{$footer-selector} {
13
+ display: block;
14
+ font-size: $footer-font-size;
15
+ color: color-mix(in srgb, currentColor $footer-color-mix, transparent);
16
+
17
+ &::before {
18
+ content: "— ";
19
+ }
20
+ }
21
+ }
22
+ }
@@ -0,0 +1,13 @@
1
+ // Reference: ../../../docs/src/pages/reference/components/typography/blockquote.mdx
2
+
3
+ $selector: "blockquote, .blockquote" !default;
4
+ $footer-selector: ".blockquote-footer" !default;
5
+ $padding-inline-start: 1rem !default;
6
+
7
+ $border-inline-start: 4px
8
+ solid
9
+ color-mix(in srgb, currentColor 30%, transparent) !default;
10
+
11
+ $font-size: 1.125rem !default;
12
+ $footer-font-size: 0.875rem !default;
13
+ $footer-color-mix: 70% !default;
@@ -2,6 +2,8 @@
2
2
  @use "variables" as *;
3
3
  @use "../../variables";
4
4
 
5
+ // Documentation: ../../../docs/src/pages/reference/components/typography/typography.mdx
6
+
5
7
  @function _repeat($string, $times) {
6
8
  $content: $string;
7
9
  @for $_ from 1 to $times {
@@ -1 +1,3 @@
1
+ // Reference: ../../../docs/src/pages/reference/components/typography/typography.mdx
2
+
1
3
  $ul-styles: (disc, circle, square) !default;
@@ -0,0 +1,2 @@
1
+ @forward "variables";
2
+ @forward "plugin";
@@ -0,0 +1,29 @@
1
+ @use "variables" as *;
2
+ @use "../../variables";
3
+
4
+ // Documentation: ../../../docs/src/pages/reference/components/typography/figure.mdx
5
+
6
+ @if variables.$feature-typography-figure {
7
+ #{$selector} {
8
+ display: $display;
9
+ margin-block-end: $margin-block-end;
10
+
11
+ > img,
12
+ > picture > img,
13
+ > #{$img-selector} {
14
+ display: block;
15
+ max-inline-size: 100%;
16
+ block-size: auto;
17
+ margin-block-end: $img-margin-block-end;
18
+ }
19
+
20
+ #{$caption-selector} {
21
+ font-size: $caption-font-size;
22
+ color: color-mix(
23
+ in srgb,
24
+ currentColor #{$caption-color-mix},
25
+ transparent
26
+ );
27
+ }
28
+ }
29
+ }
@@ -0,0 +1,13 @@
1
+ // Reference: ../../../docs/src/pages/reference/components/typography/figure.mdx
2
+
3
+ $selector: "figure, .figure" !default;
4
+ $img-selector: ".figure-img" !default;
5
+ $caption-selector: "figcaption, .figure-caption" !default;
6
+
7
+ $display: inline-block !default;
8
+ $margin-block-end: 1rem !default;
9
+
10
+ $img-margin-block-end: 0.5rem !default;
11
+
12
+ $caption-font-size: 0.875rem !default;
13
+ $caption-color-mix: 70% !default;
@@ -0,0 +1,2 @@
1
+ @forward "variables";
2
+ @forward "plugin";
@@ -0,0 +1,12 @@
1
+ @use "variables" as *;
2
+ @use "../../variables";
3
+
4
+ // Documentation: ../../../docs/src/pages/reference/components/typography/lead.mdx
5
+
6
+ @if variables.$feature-typography-lead {
7
+ #{$selector} {
8
+ font-size: $font-size;
9
+ font-weight: $font-weight;
10
+ line-height: $line-height;
11
+ }
12
+ }
@@ -0,0 +1,6 @@
1
+ // Reference: ../../../docs/src/pages/reference/components/typography/lead.mdx
2
+
3
+ $selector: ".lead" !default;
4
+ $font-size: 1.25rem !default;
5
+ $font-weight: 300 !default;
6
+ $line-height: 1.5 !default;
@@ -1,6 +1,8 @@
1
1
  @use "variables" as *;
2
2
  @use "../../variables";
3
3
 
4
+ // Reference: ../../../docs/src/pages/reference/components/typography/typography.mdx
5
+
4
6
  // Visual contract shared between bare `<a>` and `.button.is-link`. Both
5
7
  // surfaces emit the same underline + pointer affordance + `--kc-link` /
6
8
  // `--kc-link-hover` token wiring; per-surface concerns (button's transparent
@@ -2,6 +2,8 @@
2
2
  @use "../../variables";
3
3
  @use "mixins" as *;
4
4
 
5
+ // Documentation: ../../../docs/src/pages/reference/components/typography/typography.mdx
6
+
5
7
  @if variables.$feature-typography-link {
6
8
  a {
7
9
  @include linkSurface;
@@ -1,6 +1,8 @@
1
1
  @use "sass:map";
2
2
  @use "../../variables";
3
3
 
4
+ // Reference: ../../../docs/src/pages/reference/components/typography/typography.mdx
5
+
4
6
  $default-color: map.get(variables.$color-palette, black) !default;
5
7
  $color: $default-color !default;
6
8
  $hover-color: $color !default;
@@ -0,0 +1,2 @@
1
+ @forward "variables";
2
+ @forward "plugin";
@@ -0,0 +1,18 @@
1
+ @use "variables" as *;
2
+ @use "../../variables";
3
+
4
+ // Documentation: ../../../docs/src/pages/reference/components/typography/list.mdx
5
+
6
+ @if variables.$feature-typography-list {
7
+ #{$unstyled-selector},
8
+ #{$inline-selector} {
9
+ list-style: none;
10
+ padding-inline-start: 0;
11
+ }
12
+
13
+ #{$inline-selector} > li,
14
+ #{$inline-item-selector} {
15
+ display: inline-block;
16
+ margin-inline-end: $inline-item-gap;
17
+ }
18
+ }
@@ -0,0 +1,6 @@
1
+ // Reference: ../../../docs/src/pages/reference/components/typography/list.mdx
2
+
3
+ $unstyled-selector: ".list-unstyled" !default;
4
+ $inline-selector: ".list-inline" !default;
5
+ $inline-item-selector: ".list-inline-item" !default;
6
+ $inline-item-gap: 0.5rem !default;
@@ -1,6 +1,8 @@
1
1
  @use "variables" as *;
2
2
  @use "../../variables";
3
3
 
4
+ // Documentation: ../../../docs/src/pages/reference/components/typography/typography.mdx
5
+
4
6
  @if variables.$feature-typography-table {
5
7
  #{$selector} {
6
8
  vertical-align: top;
@@ -1,6 +1,8 @@
1
1
  @use "sass:math";
2
2
  @use "../../variables";
3
3
 
4
+ // Reference: ../../../docs/src/pages/reference/components/typography/typography.mdx
5
+
4
6
  $selector: ".table" !default;
5
7
  $gap: variables.$global-gap !default;
6
8
  $gutter: math.div($gap, 2) !default;
@@ -4,6 +4,8 @@
4
4
  @use "variables" as *;
5
5
  @use "../../variables";
6
6
 
7
+ // Documentation: ../../../docs/src/pages/reference/components/typography/typography.mdx
8
+
7
9
  @if variables.$feature-typography-title {
8
10
  @each $label, $args in $levels {
9
11
  #{$label} {
@@ -1,5 +1,7 @@
1
1
  @use "sass:list";
2
2
 
3
+ // Reference: ../../../docs/src/pages/reference/components/typography/typography.mdx
4
+
3
5
  $sizes: (2.5rem, 1.75rem, 1.25rem, 1rem, 0.75rem, 0.5rem) !default;
4
6
  $levels: (
5
7
  ".title": (list.nth($sizes, 1), 800),
@@ -2,17 +2,23 @@
2
2
  @use "sass:list";
3
3
  @use "sass:map";
4
4
 
5
- // Deep-accent palette, hex-encoded. The functional accents (sage / moss /
6
- // amber / coral) are tuned so `colour + white text` clears WCAG 1.4.6 AAA
7
- // body (≥ 7:1) and the colour-vs-white page boundary clears WCAG 1.4.11
8
- // (≥ 3:1). `emerald` is the brand green from the Krysalicss logo, darkened
9
- // from its logo-literal value to clear WCAG 1.4.3 AA body (~5.06:1 vs white)
10
- // while staying recognisable as the brand hue. Pushing further into AAA
11
- // territory (≥ 7:1) would require a forest-dark green that loses the brand
12
- // identity, so `primary` is the one combination that trades AAA body for
13
- // brand fidelity. The functional accents (success / warning / danger) all
14
- // stay on AAA-tuned colours so the colour-as-state contract holds regardless.
15
- // Hex keeps swatches stable on round-trips through design tools.
5
+ // Deep-accent palette, hex-encoded. Most functional accents (sage / moss /
6
+ // amber) are tuned so `colour + white text` clears WCAG 1.4.6 AAA body
7
+ // (≥ 7:1) and the colour-vs-white page boundary clears WCAG 1.4.11 (≥ 3:1).
8
+ // Verified ratios vs white: sage ~7.19:1, moss ~7.38:1, amber ~7.16:1 (all
9
+ // PASS AAA). `coral` (`#8c351a`) is the one functional accent that lands at
10
+ // ~6.27:1 vs white PASS AA body, FAIL AAA body. It carries the `danger`
11
+ // semantic and the default-theme `link-visited` colour; darkening it
12
+ // further to push past 7:1 would drift the hue away from a recognisable
13
+ // orange-red into a brown-red that reads as muddy. `emerald` is the brand
14
+ // green from the Krysalicss logo, darkened from its logo-literal value to
15
+ // clear WCAG 1.4.3 AA body (~5.06:1 vs white) while staying recognisable
16
+ // as the brand hue. Pushing further into AAA territory (≥ 7:1) would
17
+ // require a forest-dark green that loses the brand identity, so `primary`
18
+ // trades AAA body for brand fidelity. Net: `primary` (emerald) and
19
+ // `danger` / `link-visited` (coral) clear WCAG 2.2 AA body but not AAA;
20
+ // every other shipped (bg, fg) pair clears AAA. Hex keeps swatches stable
21
+ // on round-trips through design tools.
16
22
  $palette: (
17
23
  sage: #1a6347,
18
24
  moss: #525a22,
@@ -50,7 +56,9 @@ $complement-overrides: () !default;
50
56
  // First entry is the default applied to components without a modifier.
51
57
  // `primary` uses `emerald` (brand green): clears AA body against white
52
58
  // (~5.06:1) but not AAA — see palette comment for the brand-fidelity
53
- // trade-off. `success` / `warning` / `danger` stay on AAA-tuned accents.
59
+ // trade-off. `success` (moss ~7.38:1) and `warning` (amber ~7.16:1) clear
60
+ // AAA on white. `danger` (coral ~6.27:1) clears AA but not AAA — same
61
+ // hue-fidelity trade-off as `primary`, documented in the palette comment.
54
62
  $combinations: (
55
63
  default: (map.get($palette, white), map.get($palette, black)),
56
64
  primary: (map.get($palette, emerald), map.get($palette, white)),