@muibook/components 8.0.2 → 9.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.
@@ -0,0 +1,179 @@
1
+
2
+ /* ================================================================================================== */
3
+ /* Don't edit directly • Generated on Thu, 08 Jan 2026 02:39:52 GMT • muibook.com */
4
+ /* ================================================================================================== */
5
+
6
+ /* ================================================================================================== */
7
+ /* Typography on the Web • Orchestrating Vertical Rhythm */
8
+ /* ================================================================================================== */
9
+ /* An introduction to baseline grids and vertical rhythm in web typography. */
10
+ /* The video below explores the history of type through letterpress and how these */
11
+ /* traditional principles can guide modern decisions. */
12
+ /* ================================================================================================== */
13
+ /* Watch: https://youtu.be/FFGSy0EfA9Y by Michael Trilford */
14
+ /* ================================================================================================== */
15
+
16
+ /* ================================================================================================== */
17
+ /* Type Scale */
18
+ /* -------------------------------------------------------------------------------------------------- */
19
+ /* 6px | 7px | 8px | 9px | 10px | 11px | 12px | 14px | 16px | 18px | 21px | 24px | 36px */
20
+ /* 48px | 60px | 72px | 84px | 96px | 108px | 120px | 132px | 144px | 156px | 168px | 180px | 192px */
21
+ /* ================================================================================================== */
22
+
23
+ /* ================================================================================================= */
24
+ /* Leading Scale */
25
+ /* ------------------------------------------------------------------------------------------------- */
26
+ /* ======================================= 18 / 11 = 1.636 ======================================= */
27
+ /* ======================================= 18 / 12 = 1.500 ======================================= */
28
+ /* ======================================= 21 / 14 = 1.500 ======================================= */
29
+ /* ======================================= 24 / 16 = 1.500 ======================================= */
30
+ /* ======================================= 24 / 18 = 1.333 ======================================= */
31
+ /* ======================================= 24 / 21 = 1.143 ======================================= */
32
+ /* ======================================= 36 / 24 = 1.500 ======================================= */
33
+ /* ======================================= 48 / 36 = 1.333 ======================================= */
34
+ /* ======================================= 60 / 48 = 1.250 ======================================= */
35
+ /* ======================================= 72 / 60 = 1.200 ======================================= */
36
+ /* ======================================= 84 / 72 = 1.167 ======================================= */
37
+ /* ======================================= 96 / 84 = 1.143 ======================================= */
38
+ /* ====================================== 108 / 96 = 1.125 ======================================= */
39
+ /* ================================================================================================= */
40
+
41
+ :where(html) {
42
+ --font-family: system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
43
+ --font-size-15: 1.1rem;
44
+ --font-size-25: 1.2rem;
45
+ --font-size-50: 1.4rem;
46
+ --font-size-100: 1.6rem;
47
+ --font-size-200: 1.8rem;
48
+ --font-size-300: 2.1rem;
49
+ --font-size-400: 2.4rem;
50
+ --font-size-500: 3.6rem;
51
+ --font-size-600: 4.8rem;
52
+ --font-size-700: 6rem;
53
+ --font-size-800: 7.2rem;
54
+ --font-size-900: 8.4rem;
55
+ --font-size-1000: 9.6rem;
56
+ --font-weight-400: 400;
57
+ --font-weight-500: 500;
58
+ --font-weight-600: 600;
59
+ --font-weight-700: 700;
60
+ --line-height-15: 1.63636364;
61
+ --line-height-25: 1.5;
62
+ --line-height-50: 1.5;
63
+ --line-height-100: 1.5;
64
+ --line-height-200: 1.33333333;
65
+ --line-height-300: 1.14285714;
66
+ --line-height-400: 1.5;
67
+ --line-height-500: 1.33333333;
68
+ --line-height-600: 1.25;
69
+ --line-height-700: 1.2;
70
+ --line-height-800: 1.16666667;
71
+ --line-height-900: 1.14285714;
72
+ --line-height-1000: 1.125;
73
+ --black: black;
74
+ --black-opacity-0: oklch(0% 0 0 / 0);
75
+ --black-opacity-10: oklch(0% 0 0 / 0.1);
76
+ --black-opacity-20: oklch(0% 0 0 / 0.2);
77
+ --black-opacity-30: oklch(0% 0 0 / 0.3);
78
+ --black-opacity-40: oklch(0% 0 0 / 0.4);
79
+ --black-opacity-50: oklch(0% 0 0 / 0.5);
80
+ --black-opacity-60: oklch(0% 0 0 / 0.6);
81
+ --black-opacity-70: oklch(0% 0 0 / 0.7);
82
+ --black-opacity-80: oklch(0% 0 0 / 0.8);
83
+ --black-opacity-90: oklch(0% 0 0 / 0.9);
84
+ --black-opacity-100: oklch(0% 0 0);
85
+ --white: #ffffff;
86
+ --white-opacity-0: oklch(100% 0.00011 271.152 / 0);
87
+ --white-opacity-10: oklch(100% 0.00011 271.152 / 0.1);
88
+ --white-opacity-20: oklch(100% 0.00011 271.152 / 0.2);
89
+ --white-opacity-30: oklch(100% 0.00011 271.152 / 0.3);
90
+ --white-opacity-40: oklch(100% 0.00011 271.152 / 0.4);
91
+ --white-opacity-50: oklch(100% 0.00011 271.152 / 0.5);
92
+ --white-opacity-60: oklch(100% 0.00011 271.152 / 0.6);
93
+ --white-opacity-70: oklch(100% 0.00011 271.152 / 0.7);
94
+ --white-opacity-80: oklch(100% 0.00011 271.152 / 0.8);
95
+ --white-opacity-90: oklch(100% 0.00011 271.152 / 0.9);
96
+ --white-opacity-100: oklch(100% 0.00011 271.152);
97
+ --grey-100: oklch(97.015% 0.00011 271.152);
98
+ --grey-200: oklch(92.191% 0.0001 271.152);
99
+ --grey-300: oklch(84.522% 0.0001 271.152);
100
+ --grey-400: oklch(73.802% 0.00008 271.152);
101
+ --grey-500: oklch(62.675% 0.00007 271.152);
102
+ --grey-600: oklch(51.028% 0.00006 271.152);
103
+ --grey-700: oklch(44.953% 0.00005 271.152);
104
+ --grey-800: oklch(38.666% 0.00004 271.152);
105
+ --grey-900: oklch(32.109% 0.00004 271.152);
106
+ --grey-1000: oklch(25.197% 0.00003 271.152);
107
+ --grey-1100: oklch(17.764% 0.00002 271.152);
108
+ --grey-1200: oklch(11.492% 0.00001 271.152);
109
+ --red-100: oklch(98% 0.03 25.0);
110
+ --red-200: oklch(95% 0.10 25.0);
111
+ --red-300: oklch(82% 0.14 25.0);
112
+ --red-400: oklch(72% 0.17 25.0);
113
+ --red-500: oklch(62% 0.19 25.0);
114
+ --red-600: oklch(52% 0.19 25.0);
115
+ --red-700: oklch(46% 0.19 25.0);
116
+ --red-800: oklch(40% 0.19 25.0);
117
+ --red-900: oklch(34% 0.19 25.0);
118
+ --red-1000: oklch(28% 0.19 25.0);
119
+ --orange-100: oklch(98% 0.03 71);
120
+ --orange-200: oklch(94% 0.07 71);
121
+ --orange-300: oklch(90% 0.11 71);
122
+ --orange-400: oklch(85% 0.14 71);
123
+ --orange-500: oklch(78% 0.16 71);
124
+ --orange-600: oklch(70% 0.16 71);
125
+ --orange-700: oklch(64% 0.16 71);
126
+ --orange-800: oklch(57% 0.16 71);
127
+ --orange-900: oklch(51% 0.16 71);
128
+ --orange-1000: oklch(45% 0.16 71);
129
+ --green-100: oklch(96.2% 0.034 145);
130
+ --green-200: oklch(92% 0.075 145);
131
+ --green-300: oklch(88% 0.120 145);
132
+ --green-400: oklch(84.5% 0.160 145);
133
+ --green-500: oklch(70% 0.220 145);
134
+ --green-600: oklch(63% 0.200 145);
135
+ --green-700: oklch(57% 0.180 145);
136
+ --green-800: oklch(52% 0.160 145);
137
+ --green-900: oklch(46% 0.140 145);
138
+ --green-1000: oklch(42% 0.120 145);
139
+ --blue-100: oklch(95.6% 0.022 250);
140
+ --blue-200: oklch(91% 0.045 250);
141
+ --blue-300: oklch(82% 0.091 250);
142
+ --blue-400: oklch(78.8% 0.105 250);
143
+ --blue-500: oklch(73% 0.130 245);
144
+ --blue-600: oklch(67% 0.150 249);
145
+ --blue-700: oklch(63% 0.155 249);
146
+ --blue-800: oklch(57% 0.167 251);
147
+ --blue-900: oklch(52% 0.178 253);
148
+ --blue-1000: oklch(48% 0.151 253);
149
+ --radius-100: 4px;
150
+ --radius-150: 6px;
151
+ --radius-200: 8px;
152
+ --radius-300: 16px;
153
+ --radius-400: 24px;
154
+ --radius-500: 36px;
155
+ --radius-600: 48px;
156
+ --radius-000: 0;
157
+ --space-100: 0.6rem;
158
+ --space-200: 0.8rem;
159
+ --space-300: 1.2rem;
160
+ --space-400: 1.6rem;
161
+ --space-500: 2.4rem;
162
+ --space-600: 3.6rem;
163
+ --space-700: 4.8rem;
164
+ --space-800: 6rem;
165
+ --space-000: 0;
166
+ --space-025: 0.2rem;
167
+ --space-050: 0.4rem;
168
+ --stroke-size-100: 1px;
169
+ --stroke-size-200: 2px;
170
+ --stroke-size-300: 3px;
171
+ --stroke-size-400: 4px;
172
+ --stroke-size-500: 5px;
173
+ --stroke-solid: solid;
174
+ --stroke-outset: outset;
175
+ --speed-100: 0.1s;
176
+ --speed-200: 0.2s;
177
+ --speed-300: 0.3s;
178
+ --speed-400: 0.4s;
179
+ }
@@ -9,228 +9,38 @@
9
9
  /* ==================== */
10
10
 
11
11
  /* ==================================================================================================== */
12
- /* 1. BRAND PRIMITIVES */
12
+ /* 1. BRAND PRIMITIVES ------> ./mui-brand.css */
13
13
  /* ==================================================================================================== */
14
14
  :where(html) {
15
- /* Font-family */
16
- --font-family: system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
17
-
18
- /* ================================================================================================== */
19
- /* Typography on the Web • Orchestrating Vertical Rhythm */
20
- /* ================================================================================================== */
21
- /* An introduction to baseline grids and vertical rhythm in web typography. */
22
- /* The video below explores the history of type through letterpress and how these */
23
- /* traditional principles can guide modern decisions. */
24
- /* ================================================================================================== */
25
- /* Watch: https://youtu.be/FFGSy0EfA9Y by Michael Trilford */
26
- /* ================================================================================================== */
27
-
28
- /* ================================================================================================== */
29
- /* Type Scale */
30
- /* -------------------------------------------------------------------------------------------------- */
31
- /* 6px | 7px | 8px | 9px | 10px | 11px | 12px | 14px | 16px | 18px | 21px | 24px | 36px */
32
- /* 48px | 60px | 72px | 84px | 96px | 108px | 120px | 132px | 144px | 156px | 168px | 180px | 192px */
33
- /* ================================================================================================== */
34
-
35
- /* Font-size */
36
- --font-size-15: 1.1rem;
37
- --font-size-25: 1.2rem;
38
- --font-size-50: 1.4rem;
39
- --font-size-100: 1.6rem;
40
- --font-size-200: 1.8rem;
41
- --font-size-300: 2.1rem;
42
- --font-size-400: 2.4rem;
43
- --font-size-500: 3.6rem;
44
- --font-size-600: 4.8rem;
45
- --font-size-700: 6rem;
46
- --font-size-800: 7.2rem;
47
- --font-size-900: 8.4rem;
48
- --font-size-1000: 9.6rem;
49
-
50
- /* ================================================================================================= */
51
- /* Leading Scale */
52
- /* ------------------------------------------------------------------------------------------------- */
53
- /* ======================================= 18 / 11 = 1.636 ======================================= */
54
- /* ======================================= 18 / 12 = 1.500 ======================================= */
55
- /* ======================================= 21 / 14 = 1.500 ======================================= */
56
- /* ======================================= 24 / 16 = 1.500 ======================================= */
57
- /* ======================================= 24 / 18 = 1.333 ======================================= */
58
- /* ======================================= 24 / 21 = 1.143 ======================================= */
59
- /* ======================================= 36 / 24 = 1.500 ======================================= */
60
- /* ======================================= 48 / 36 = 1.333 ======================================= */
61
- /* ======================================= 60 / 48 = 1.250 ======================================= */
62
- /* ======================================= 72 / 60 = 1.200 ======================================= */
63
- /* ======================================= 84 / 72 = 1.167 ======================================= */
64
- /* ======================================= 96 / 84 = 1.143 ======================================= */
65
- /* ====================================== 108 / 96 = 1.125 ======================================= */
66
- /* ================================================================================================= */
67
-
68
- /* Line-height */
69
- --line-height-15: 1.63636364;
70
- --line-height-25: 1.5;
71
- --line-height-50: 1.5;
72
- --line-height-100: 1.5;
73
- --line-height-200: 1.33333333;
74
- --line-height-300: 1.14285714;
75
- --line-height-400: 1.5;
76
- --line-height-500: 1.33333333;
77
- --line-height-600: 1.25;
78
- --line-height-700: 1.2;
79
- --line-height-800: 1.16666667;
80
- --line-height-900: 1.14285714;
81
- --line-height-1000: 1.125;
82
- /* Font Weight */
83
- --font-weight-400: 400;
84
- --font-weight-500: 500;
85
- --font-weight-600: 600;
86
- --font-weight-700: 700;
87
- /* Black */
88
- --black: black;
89
- --black-opacity-0: hsla(0, 0%, 0%, 0);
90
- --black-opacity-10: hsla(0, 0%, 0%, 0.1);
91
- --black-opacity-20: hsla(0, 0%, 0%, 0.2);
92
- --black-opacity-30: hsla(0, 0%, 0%, 0.3);
93
- --black-opacity-40: hsla(0, 0%, 0%, 0.4);
94
- --black-opacity-50: hsla(0, 0%, 0%, 0.5);
95
- --black-opacity-60: hsla(0, 0%, 0%, 0.6);
96
- --black-opacity-70: hsla(0, 0%, 0%, 0.7);
97
- --black-opacity-80: hsla(0, 0%, 0%, 0.8);
98
- --black-opacity-90: hsla(0, 0%, 0%, 0.9);
99
- --black-opacity-100: hsla(0, 0%, 0%, 1);
100
- /* White */
101
- --white: #ffffff;
102
- --white-opacity-0: hsla(0, 0%, 100%, 0);
103
- --white-opacity-10: hsla(0, 0%, 100%, 0.1);
104
- --white-opacity-20: hsla(0, 0%, 100%, 0.2);
105
- --white-opacity-30: hsla(0, 0%, 100%, 0.3);
106
- --white-opacity-40: hsla(0, 0%, 100%, 0.4);
107
- --white-opacity-50: hsla(0, 0%, 100%, 0.5);
108
- --white-opacity-60: hsla(0, 0%, 100%, 0.6);
109
- --white-opacity-70: hsla(0, 0%, 100%, 0.7);
110
- --white-opacity-80: hsla(0, 0%, 100%, 0.8);
111
- --white-opacity-90: hsla(0, 0%, 100%, 0.9);
112
- --white-opacity-100: hsla(0, 0%, 100%, 1);
113
- /* Grey scale */
114
- --grey-100: #f5f5f5;
115
- --grey-200: #e5e5e5;
116
- --grey-300: #ccc;
117
- --grey-400: #aaa;
118
- --grey-500: #888;
119
- --grey-600: #666;
120
- --grey-700: #555;
121
- --grey-800: #444;
122
- --grey-900: #333;
123
- --grey-1000: #222;
124
- --grey-1100: #111;
125
- --grey-1200: #050505;
126
- /* Red scale */
127
- --red-100: #ffe5e5;
128
- --red-200: #fbbcbc;
129
- --red-300: #f79494;
130
- --red-400: #f36b6b;
131
- --red-500: #f74e4e;
132
- --red-600: #e04343;
133
- --red-700: #c23c3c;
134
- --red-800: #a43535;
135
- --red-900: #862e2e;
136
- --red-1000: #6a2323;
137
- /* Orange scale */
138
- --orange-100: #fff2cc;
139
- --orange-200: #ffe0a3;
140
- --orange-300: #ffcc80;
141
- --orange-400: #ffb84d;
142
- --orange-500: #ffa500;
143
- --orange-600: #e59400;
144
- --orange-700: #cc8300;
145
- --orange-800: #b37300;
146
- --orange-900: #996200;
147
- --orange-1000: #805100;
148
- /* Green scale */
149
- --green-100: #e5f9e5;
150
- --green-200: #c6f3c6;
151
- --green-300: #a6eda6;
152
- --green-400: #86e786;
153
- --green-500: #00bd00;
154
- --green-600: #00a800;
155
- --green-700: #009400;
156
- --green-800: #007f00;
157
- --green-900: #006b00;
158
- --green-1000: #005700;
159
- /* Blue scale */
160
- --blue-100: #e6f2ff;
161
- --blue-200: #cce4ff;
162
- --blue-300: #99caff;
163
- --blue-400: #85bffb;
164
- --blue-500: #62b7fb;
165
- --blue-600: #338fe0;
166
- --blue-700: #3396eb;
167
- --blue-800: #1a86e3;
168
- --blue-900: #0076db;
169
- --blue-1000: #005fb1;
170
- /* Radius */
171
- --radius-000: 0;
172
- --radius-100: 4px;
173
- --radius-150: 6px;
174
- --radius-200: 8px;
175
- --radius-300: 16px;
176
- --radius-400: 24px;
177
- --radius-500: 36px;
178
- --radius-600: 48px;
179
- /* Spacing */
180
- --space-000: 0;
181
- --space-025: 0.2rem;
182
- --space-050: 0.4rem;
183
- --space-100: 0.6rem;
184
- --space-200: 0.8rem;
185
- --space-300: 1.2rem;
186
- --space-400: 1.6rem;
187
- --space-500: 2.4rem;
188
- --space-600: 3.6rem;
189
- --space-700: 4.8rem;
190
- --space-800: 6rem;
191
- /* Stroke */
192
- --stroke-size-100: 1px;
193
- --stroke-size-200: 2px;
194
- --stroke-size-300: 3px;
195
- --stroke-size-400: 4px;
196
- --stroke-size-500: 5px;
197
- --stroke-solid: solid;
198
- --stroke-outset: outset;
199
- /* Animation */
200
- --speed-100: 0.1s;
201
- --speed-200: 0.2s;
202
- --speed-300: 0.3s;
203
- --speed-400: 0.4s;
204
-
205
15
  /* Avatar Colors */
206
- --avatar-purple-200: hsl(270, 55%, 70%);
207
- --avatar-purple-800: hsl(270, 55%, 35%);
208
- --avatar-violet-200: hsl(255, 50%, 70%);
209
- --avatar-violet-800: hsl(255, 50%, 35%);
210
- --avatar-pink-200: hsl(330, 65%, 73%);
211
- --avatar-pink-800: hsl(330, 65%, 40%);
212
- --avatar-magenta-200: hsl(295, 60%, 70%);
213
- --avatar-magenta-800: hsl(295, 60%, 35%);
214
- --avatar-red-200: hsl(0, 65%, 68%);
215
- --avatar-red-800: hsl(0, 65%, 35%);
216
- --avatar-orange-200: hsl(25, 80%, 70%);
217
- --avatar-orange-800: hsl(25, 80%, 35%);
218
- --avatar-amber-200: hsl(45, 85%, 72%);
219
- --avatar-amber-800: hsl(45, 85%, 38%);
220
- --avatar-yellow-200: hsl(55, 80%, 75%);
221
- --avatar-yellow-800: hsl(55, 80%, 40%);
222
- --avatar-lime-200: hsl(90, 55%, 70%);
223
- --avatar-lime-800: hsl(90, 55%, 35%);
224
- --avatar-green-200: hsl(140, 50%, 70%);
225
- --avatar-green-800: hsl(140, 50%, 35%);
226
- --avatar-teal-200: hsl(170, 55%, 70%);
227
- --avatar-teal-800: hsl(170, 55%, 35%);
228
- --avatar-cyan-200: hsl(190, 60%, 70%);
229
- --avatar-cyan-800: hsl(190, 60%, 35%);
230
- --avatar-blue-200: hsl(210, 70%, 70%);
231
- --avatar-blue-800: hsl(210, 70%, 35%);
232
- --avatar-indigo-200: hsl(230, 55%, 70%);
233
- --avatar-indigo-800: hsl(230, 55%, 35%);
16
+ --avatar-purple-200: oklch(69.998% 0.12881 306.598);
17
+ --avatar-purple-800: oklch(39.825% 0.15525 302.768);
18
+ --avatar-violet-200: oklch(68.7% 0.11278 294.579);
19
+ --avatar-violet-800: oklch(37.751% 0.1414 289.195);
20
+ --avatar-pink-200: oklch(75% 0.12171 349.037);
21
+ --avatar-pink-800: oklch(49.567% 0.17587 355.522);
22
+ --avatar-magenta-200: oklch(73.607% 0.1553 324.203);
23
+ --avatar-magenta-800: oklch(46.026% 0.18151 324.267);
24
+ --avatar-red-200: oklch(69.219% 0.13185 21.008);
25
+ --avatar-red-800: oklch(43.588% 0.15193 26.224);
26
+ --avatar-orange-200: oklch(78.978% 0.10803 55.747);
27
+ --avatar-orange-800: oklch(51.737% 0.12922 49.443);
28
+ --avatar-amber-200: oklch(88.238% 0.11573 91.663);
29
+ --avatar-amber-800: oklch(65.465% 0.13065 86.837);
30
+ --avatar-yellow-200: oklch(92.328% 0.116 104.198);
31
+ --avatar-yellow-800: oklch(72.736% 0.14925 103.38);
32
+ --avatar-lime-200: oklch(84.773% 0.11998 130.068);
33
+ --avatar-lime-800: oklch(57.802% 0.13829 132.375);
34
+ --avatar-green-200: oklch(82.146% 0.10519 154.481);
35
+ --avatar-green-800: oklch(55.196% 0.1248 150.768);
36
+ --avatar-teal-200: oklch(83.949% 0.08537 182.617);
37
+ --avatar-teal-800: oklch(57.358% 0.092 179.632);
38
+ --avatar-cyan-200: oklch(81.649% 0.07802 211.528);
39
+ --avatar-cyan-800: oklch(54.656% 0.08505 214.39);
40
+ --avatar-blue-200: oklch(74.949% 0.09578 248.783);
41
+ --avatar-blue-800: oklch(45.925% 0.11981 252.499);
42
+ --avatar-indigo-200: oklch(69.039% 0.10593 274.775);
43
+ --avatar-indigo-800: oklch(38.197% 0.13614 269.807);
234
44
  }
235
45
 
236
46
  /* ==================================================================================================== */
@@ -359,7 +169,7 @@ html[data-theme="light"] {
359
169
  --text-color-success: var(--green-600);
360
170
  --text-color-warning: var(--orange-600);
361
171
  --text-color-error: var(--red-600);
362
- --text-color-optional: var(--grey-600);
172
+ --text-color-optional: var(--grey-500);
363
173
  /* Overlay */
364
174
  --backdrop-overlay: var(--black-opacity-70);
365
175
  /* ================================================================================================== */
@@ -616,7 +426,7 @@ html[data-theme="dark"] {
616
426
  --text-color-success: var(--green-400);
617
427
  --text-color-warning: var(--orange-400);
618
428
  --text-color-error: var(--red-400);
619
- --text-color-optional: var(--grey-300);
429
+ --text-color-optional: var(--grey-400);
620
430
  /* Overlay */
621
431
  --backdrop-overlay: var(--black-opacity-70);
622
432
  /* ================================================================================================== */
@@ -0,0 +1,129 @@
1
+ # Michael UI System — CSS Architecture
2
+
3
+ ## ⚡ Usage Notes
4
+
5
+ ⛔ Don't use brand primitives directly in components.
6
+ ✅ Use semantic tokens only.
7
+
8
+ ### Theming Ethos
9
+
10
+ - Themes should override semantic tokens, not brand primitives.
11
+ - Advanced users can also craft or extend the token file,
12
+ - For example: Adding a yellow warning alert instead of orange.
13
+
14
+ ### Why Brand is External
15
+
16
+ - Brand primitives are defined in a separate brand-<name>.css file to keep them independent from semantic tokens.
17
+ - This separation aligns with Design Token Module specifications.
18
+ - The system can use a JSON source of truth for brand primitives, which is then transformed into CSS via a tool.
19
+ - This allows multiple brands to share the same token structure and theme mappings without collisions.
20
+
21
+ ### Brand file
22
+
23
+ - Use `brand-<name>.css` to define new brands.
24
+ - Each brand file should have a unique name
25
+ - For example: `brand-coke.css` to avoid collisions when defining brand primitives.
26
+
27
+ ### Tokens file
28
+
29
+ - Use `tokens.css` to define light/dark or other theme mappings.
30
+ - Advanced users can add a `token-<name>.css` file to extend semantic tokens
31
+ - For example: New alert colors, without modifying brand primitives.
32
+
33
+ ### Brand vs Semantic Tokens vs Themes
34
+
35
+ - Brand primitives (`let`) — immutable, define brand identity.
36
+ - Semantic tokens (`var`) — map to brand primitives, consumed by components.
37
+ - Themes — override semantic tokens only to change appearance without touching brand identity.
38
+
39
+ ### How Overrides Work
40
+
41
+ - Components read semantic tokens (`var(--token-name)`).
42
+ - Changing a theme (light/dark) updates semantic tokens only.
43
+ - Brand primitives (`let`) remain constant; they are never changed by themes.
44
+
45
+ This repository defines the CSS foundation for Michael UI System, including resets, base styles, brand primitives, and semantic tokens. It is designed to support multiple brands and themes (light/dark) while keeping components brand-agnostic.
46
+
47
+ ## FILE OVERVIEW
48
+
49
+ ## 1. Reset (`mui-reset.css`)
50
+
51
+ - Resets default browser styles.
52
+ - Normalizes spacing, font inheritance, list styles, and box-sizing.
53
+ - **Goal:** Provide a clean slate for all themes and components.
54
+
55
+ ```css
56
+ *,
57
+ *::before,
58
+ *::after {
59
+ box-sizing: border-box;
60
+ margin: 0;
61
+ padding: 0;
62
+ }
63
+
64
+ body {
65
+ line-height: 1.5;
66
+ font-family: var(--font-family);
67
+ }
68
+ ```
69
+
70
+ ### 2. Foundation `mui-base.css`
71
+
72
+ - Defines global layout and typography defaults.
73
+ - Sets defaults for body, headings, links, buttons, and form elements.
74
+ - Includes utility classes if needed.
75
+ - **Goal:** Establish foundational design system behavior.
76
+
77
+ ```css
78
+ body {
79
+ font-size: var(--font-size-100);
80
+ color: var(--text-color);
81
+ background: var(--color-bg);
82
+ }
83
+
84
+ a {
85
+ color: var(--color-primary);
86
+ text-decoration: none;
87
+ }
88
+ ```
89
+
90
+ ### 3. Brand Primitives: `mui-brand.css`
91
+
92
+ - Contains raw brand primitives for a specific brand.
93
+ - Includes colors, font scales, radii, spacing, and strokes.
94
+ - Uses OKLCH values for perceptual accuracy.
95
+ - **Goal:** Define immutable brand identity.
96
+
97
+ ```css
98
+ html[data-brand="insert-your-brand"] {
99
+ --font-family: system-ui;
100
+ /* GREY */
101
+ --grey-800: oklch(38.666% 0.00004 271.152);
102
+ /* RED */
103
+ --red-400: oklch(69.42% 0.16807 22.436);
104
+ /* BLUE */
105
+ --blue-500: oklch(75.415% 0.12865 244.876);
106
+ }
107
+ ```
108
+
109
+ ### 4. Semantic & Theme Layer: `mui-tokens.css`
110
+
111
+ - Maps semantic purposes to brand primitives.
112
+ - Handles themes (light/dark) without altering brand primitives.
113
+ - Components consume only semantic tokens.
114
+ - **Goal:** Separate brand identity from functional usage.
115
+
116
+ ```css
117
+ :where(html) {
118
+ --color-bg: var(--white);
119
+ --text-color: var(--grey-900);
120
+ --text-color-error: var(--red-400);
121
+ --surface-elevated: var(--grey-100);
122
+ }
123
+
124
+ html[data-theme="dark"] {
125
+ --color-bg: var(--grey-900);
126
+ --text-color: var(--grey-100);
127
+ --text-color-error: var(--red-200);
128
+ }
129
+ ```