@digicreon/mucss 1.0.0 → 1.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.
Files changed (59) hide show
  1. package/README.md +67 -17
  2. package/dist/mu.amber.css +2 -2
  3. package/dist/mu.azure.css +2 -2
  4. package/dist/mu.blue.css +2 -2
  5. package/dist/mu.css +2 -2
  6. package/dist/mu.cyan.css +2 -2
  7. package/dist/mu.fuchsia.css +2 -2
  8. package/dist/mu.green.css +2 -2
  9. package/dist/mu.grey.css +2 -2
  10. package/dist/mu.indigo.css +2 -2
  11. package/dist/mu.jade.css +2 -2
  12. package/dist/mu.lime.css +2 -2
  13. package/dist/mu.orange.css +2 -2
  14. package/dist/mu.pink.css +2 -2
  15. package/dist/mu.pumpkin.css +2 -2
  16. package/dist/mu.purple.css +2 -2
  17. package/dist/mu.red.css +2 -2
  18. package/dist/mu.sand.css +2 -2
  19. package/dist/mu.slate.css +2 -2
  20. package/dist/mu.violet.css +2 -2
  21. package/dist/mu.yellow.css +2 -2
  22. package/dist/mu.zinc.css +2 -2
  23. package/documentation/mu.accordion.md +4 -2
  24. package/documentation/mu.alert.md +22 -14
  25. package/documentation/mu.badge.md +35 -15
  26. package/documentation/mu.breadcrumb.md +8 -6
  27. package/documentation/mu.button.md +39 -28
  28. package/documentation/mu.card.md +35 -19
  29. package/documentation/mu.checkbox-radio.md +4 -2
  30. package/documentation/mu.code.md +85 -0
  31. package/documentation/mu.colors.md +307 -0
  32. package/documentation/mu.container.md +87 -0
  33. package/documentation/mu.dark-mode.md +96 -0
  34. package/documentation/mu.dropdown.md +32 -27
  35. package/documentation/mu.embedded.md +101 -0
  36. package/documentation/mu.figure.md +82 -0
  37. package/documentation/mu.forms-advanced.md +6 -4
  38. package/documentation/mu.forms.md +11 -9
  39. package/documentation/mu.grid.md +14 -8
  40. package/documentation/mu.group.md +29 -27
  41. package/documentation/mu.hero.md +200 -0
  42. package/documentation/mu.link.md +108 -0
  43. package/documentation/mu.loading.md +4 -2
  44. package/documentation/mu.modal.md +9 -7
  45. package/documentation/mu.nav.md +191 -0
  46. package/documentation/mu.pagination.md +3 -1
  47. package/documentation/mu.progress.md +31 -14
  48. package/documentation/mu.range.md +4 -2
  49. package/documentation/mu.skeleton.md +111 -0
  50. package/documentation/mu.spinner.md +20 -12
  51. package/documentation/mu.switch.md +4 -2
  52. package/documentation/mu.table.md +20 -6
  53. package/documentation/mu.tabs.md +5 -3
  54. package/documentation/mu.toast.md +134 -0
  55. package/documentation/mu.tooltip.md +30 -28
  56. package/documentation/mu.typography.md +44 -42
  57. package/documentation/mu.utilities.md +83 -0
  58. package/documentation/mu.variables.md +276 -0
  59. package/package.json +5 -3
@@ -0,0 +1,276 @@
1
+ # µVariables
2
+
3
+ **µVariables** is the reference for CSS variables (`--mu-*`) available in [µCSS](.). All variables are defined on `:root` and can be overridden to customize the framework.
4
+
5
+ ---
6
+
7
+ ## Typography
8
+
9
+ | Variable | Default | Description |
10
+ |----------|---------|-------------|
11
+ | `--mu-font-family-sans-serif` | `system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif` | Sans-serif font stack |
12
+ | `--mu-font-family-monospace` | `ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace` | Monospace font stack |
13
+ | `--mu-font-family` | `var(--mu-font-family-sans-serif)` | Active font |
14
+ | `--mu-font-size` | `100%` | Base size (responsive: 106.25% to 131.25%) |
15
+ | `--mu-font-weight` | `400` | Normal weight |
16
+ | `--mu-line-height` | `1.5` | Line height |
17
+ | `--mu-text-underline-offset` | `0.1rem` | Underline offset |
18
+
19
+ ### Responsive sizing
20
+
21
+ The base font size increases at each breakpoint:
22
+
23
+ | Breakpoint | `--mu-font-size` |
24
+ |------------|------------------|
25
+ | < 576px | 100% |
26
+ | ≥ 576px | 106.25% |
27
+ | ≥ 768px | 112.5% |
28
+ | ≥ 1024px | 118.75% |
29
+ | ≥ 1280px | 125% |
30
+ | ≥ 1536px | 131.25% |
31
+
32
+ ---
33
+
34
+ ## Spacing
35
+
36
+ | Variable | Default | Description |
37
+ |----------|---------|-------------|
38
+ | `--mu-spacing` | `1rem` | Base unit (padding, margins) |
39
+ | `--mu-typography-spacing-vertical` | `1rem` | Typographic vertical spacing |
40
+ | `--mu-block-spacing-vertical` | `var(--mu-spacing)` | Vertical spacing between sections |
41
+ | `--mu-block-spacing-horizontal` | `var(--mu-spacing)` | Horizontal spacing between sections |
42
+ | `--mu-grid-column-gap` | `var(--mu-spacing)` | Grid column gutter |
43
+ | `--mu-grid-row-gap` | `var(--mu-spacing)` | Grid row gutter |
44
+
45
+ ---
46
+
47
+ ## Borders and outlines
48
+
49
+ | Variable | Default | Description |
50
+ |----------|---------|-------------|
51
+ | `--mu-border-radius` | `0.25rem` | Corner rounding |
52
+ | `--mu-border-width` | `0.0625rem` | Border thickness (1px) |
53
+ | `--mu-outline-width` | `0.125rem` | Focus outline thickness (2px) |
54
+
55
+ ---
56
+
57
+ ## Transitions
58
+
59
+ | Variable | Default | Description |
60
+ |----------|---------|-------------|
61
+ | `--mu-transition` | `0.2s ease-in-out` | Animation duration and easing |
62
+
63
+ ---
64
+
65
+ ## Navigation
66
+
67
+ | Variable | Default | Description |
68
+ |----------|---------|-------------|
69
+ | `--mu-nav-element-spacing-vertical` | `1rem` | Vertical padding of nav items |
70
+ | `--mu-nav-element-spacing-horizontal` | `0.5rem` | Horizontal padding of nav items |
71
+ | `--mu-nav-link-spacing-vertical` | `0.5rem` | Vertical padding of nav links |
72
+ | `--mu-nav-link-spacing-horizontal` | `0.5rem` | Horizontal padding of nav links |
73
+ | `--mu-nav-breadcrumb-divider` | `">"` | Breadcrumb separator |
74
+
75
+ ---
76
+
77
+ ## Forms
78
+
79
+ | Variable | Default | Description |
80
+ |----------|---------|-------------|
81
+ | `--mu-form-element-spacing-vertical` | `0.75rem` | Vertical padding of fields |
82
+ | `--mu-form-element-spacing-horizontal` | `1rem` | Horizontal padding of fields |
83
+ | `--mu-form-element-border-color` | `#cfd5e2` | Field border |
84
+ | `--mu-form-element-active-border-color` | `var(--mu-primary-border)` | Border on focus |
85
+ | `--mu-form-element-disabled-opacity` | `0.5` | Opacity of disabled fields |
86
+
87
+ ---
88
+
89
+ ## Base colors
90
+
91
+ These variables change between light and dark themes (see [µDark Mode](mu.dark-mode.md)).
92
+
93
+ | Variable | Light | Dark | Description |
94
+ |----------|-------|------|-------------|
95
+ | `--mu-background-color` | `#fff` | `rgb(19, 22.5, 30.5)` | Page background |
96
+ | `--mu-color` | `#373c44` | `#c2c7d0` | Main text |
97
+ | `--mu-muted-color` | `#646b79` | `#8891a4` | Secondary text |
98
+ | `--mu-muted-border-color` | `rgb(231, 234, 239.5)` | `rgb(48, 54.5, 69)` | Subtle borders |
99
+ | `--mu-text-selection-color` | `rgba(2, 154, 232, 0.25)` | `rgba(1, 170, 255, 0.1875)` | Selection highlight |
100
+
101
+ ---
102
+
103
+ ## Role colors
104
+
105
+ 11 color roles, each providing 7 variants. Values depend on the theme (see `build/mu.theme.json`).
106
+
107
+ ### Variants per role
108
+
109
+ For each role (`primary`, `secondary`, `tertiary`, `contrast`, `accent`, `success`, `info`, `warning`, `error`, `pop`, `spark`):
110
+
111
+ | Suffix | Description |
112
+ |--------|-------------|
113
+ | *(base)* | Main color of the role |
114
+ | `-background` | Colored background (light tint in light mode, dark tint in dark mode) |
115
+ | `-hover` | Hover color |
116
+ | `-hover-background` | Hover background |
117
+ | `-focus` | Focus ring color (semi-transparent) |
118
+ | `-inverse` | Text on colored background (`#fff` or `#000`) |
119
+ | `-underline` | Semi-transparent underline |
120
+
121
+ ### Example
122
+
123
+ ```css
124
+ .custom-element {
125
+ color: var(--mu-primary);
126
+ background-color: var(--mu-primary-background);
127
+ border: 1px solid var(--mu-primary);
128
+ }
129
+
130
+ .custom-element:hover {
131
+ color: var(--mu-primary-hover);
132
+ background-color: var(--mu-primary-hover-background);
133
+ }
134
+ ```
135
+
136
+ ---
137
+
138
+ ## Headings
139
+
140
+ | Variable | Description |
141
+ |----------|-------------|
142
+ | `--mu-h1-color` | `<h1>` color |
143
+ | `--mu-h2-color` | `<h2>` color |
144
+ | `--mu-h3-color` | `<h3>` color |
145
+ | `--mu-h4-color` | `<h4>` color |
146
+ | `--mu-h5-color` | `<h5>` color |
147
+ | `--mu-h6-color` | `<h6>` color |
148
+
149
+ Each heading level uses a slightly lighter shade than the previous one.
150
+
151
+ ---
152
+
153
+ ## Components
154
+
155
+ ### Code
156
+
157
+ | Variable | Description |
158
+ |----------|-------------|
159
+ | `--mu-code-background-color` | Background of `<code>`, `<pre>`, `<samp>` elements |
160
+ | `--mu-code-color` | Code text |
161
+ | `--mu-code-kbd-background-color` | Background of `<kbd>` |
162
+ | `--mu-code-kbd-color` | Text of `<kbd>` |
163
+
164
+ ### Card
165
+
166
+ | Variable | Description |
167
+ |----------|-------------|
168
+ | `--mu-card-background-color` | Card background |
169
+ | `--mu-card-border-color` | Card border |
170
+ | `--mu-card-box-shadow` | Card shadow |
171
+ | `--mu-card-sectioning-background-color` | Header/footer background |
172
+
173
+ ### Table
174
+
175
+ | Variable | Description |
176
+ |----------|-------------|
177
+ | `--mu-table-border-color` | Table border |
178
+ | `--mu-table-row-stripped-background-color` | Striped row background |
179
+
180
+ ### Accordion
181
+
182
+ | Variable | Description |
183
+ |----------|-------------|
184
+ | `--mu-accordion-border-color` | Accordion border |
185
+ | `--mu-accordion-active-summary-color` | Active title color |
186
+ | `--mu-accordion-close-summary-color` | Closed title color |
187
+ | `--mu-accordion-open-summary-color` | Open title color |
188
+
189
+ ### Dropdown
190
+
191
+ | Variable | Description |
192
+ |----------|-------------|
193
+ | `--mu-dropdown-background-color` | Menu background |
194
+ | `--mu-dropdown-border-color` | Menu border |
195
+ | `--mu-dropdown-color` | Menu text |
196
+ | `--mu-dropdown-hover-background-color` | Hover background |
197
+ | `--mu-dropdown-box-shadow` | Menu shadow |
198
+
199
+ ### Progress
200
+
201
+ | Variable | Description |
202
+ |----------|-------------|
203
+ | `--mu-progress-background-color` | Bar background |
204
+ | `--mu-progress-color` | Progress color |
205
+
206
+ ### Tooltip
207
+
208
+ | Variable | Description |
209
+ |----------|-------------|
210
+ | `--mu-tooltip-background-color` | Tooltip background |
211
+ | `--mu-tooltip-color` | Tooltip text |
212
+
213
+ ### Switch
214
+
215
+ | Variable | Description |
216
+ |----------|-------------|
217
+ | `--mu-switch-background-color` | Unchecked background |
218
+ | `--mu-switch-checked-background-color` | Checked background |
219
+ | `--mu-switch-color` | Thumb color |
220
+
221
+ ### Range
222
+
223
+ | Variable | Description |
224
+ |----------|-------------|
225
+ | `--mu-range-border-color` | Track border |
226
+ | `--mu-range-active-border-color` | Active border |
227
+ | `--mu-range-thumb-color` | Thumb color |
228
+ | `--mu-range-thumb-active-color` | Active thumb |
229
+
230
+ ### Blockquote
231
+
232
+ | Variable | Description |
233
+ |----------|-------------|
234
+ | `--mu-blockquote-border-color` | Quote border |
235
+ | `--mu-blockquote-footer-color` | Quote footer color |
236
+
237
+ ### Modal
238
+
239
+ | Variable | Description |
240
+ |----------|-------------|
241
+ | `--mu-modal-overlay-background-color` | Overlay background |
242
+ | `--mu-modal-overlay-backdrop-filter` | Blur filter (`blur(0.375rem)`) |
243
+
244
+ ### Buttons
245
+
246
+ | Variable | Description |
247
+ |----------|-------------|
248
+ | `--mu-button-box-shadow` | Button shadow |
249
+ | `--mu-button-hover-box-shadow` | Hover shadow |
250
+
251
+ ### Shadows
252
+
253
+ | Variable | Description |
254
+ |----------|-------------|
255
+ | `--mu-box-shadow` | Default shadow (used by cards, dropdowns) |
256
+
257
+ ---
258
+
259
+ ## Global override
260
+
261
+ To customize the framework, override the variables on `:root`:
262
+
263
+ ```css
264
+ :root {
265
+ --mu-font-family: "Inter", sans-serif;
266
+ --mu-border-radius: 0.5rem;
267
+ --mu-spacing: 1.25rem;
268
+ --mu-primary: #e63946;
269
+ }
270
+ ```
271
+
272
+ For theme-specific overrides, target the corresponding selectors (see [µDark Mode](mu.dark-mode.md)).
273
+
274
+ ---
275
+
276
+ > See also : [µDark Mode](mu.dark-mode.md) · [µContainer](mu.container.md) · [µGrid](mu.grid.md)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digicreon/mucss",
3
- "version": "1.0.0",
4
- "description": "µCSS — A CSS framework built on PicoCSS v2",
3
+ "version": "1.4.0",
4
+ "description": "µCSS — Full-featured themeable CSS framework.",
5
5
  "main": "dist/mu.css",
6
6
  "style": "dist/mu.css",
7
7
  "files": [
@@ -12,12 +12,14 @@
12
12
  "keywords": [
13
13
  "css",
14
14
  "framework",
15
+ "web",
15
16
  "picocss",
16
17
  "responsive",
17
18
  "grid",
18
19
  "components",
19
20
  "dark-mode",
20
- "accessible"
21
+ "front-end",
22
+ "mobile-first"
21
23
  ],
22
24
  "homepage": "https://www.mucss.org",
23
25
  "repository": {