@troennes/minium 0.1.1 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -35,7 +35,13 @@ The library takes on more CSS when it lets users write meaningfully less HTML. F
35
35
  Load the minified stylesheet from jsDelivr without installing anything:
36
36
 
37
37
  ```html
38
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@troennes/minium@0.1.0/dist/minium.min.css">
38
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@troennes/minium@0.2.0/dist/minium.min.css">
39
+ ```
40
+
41
+ To add a color theme, load its stylesheet after the core stylesheet:
42
+
43
+ ```html
44
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@troennes/minium@0.2.0/dist/themes/blue.css">
39
45
  ```
40
46
 
41
47
  ### Install with npm
@@ -95,7 +101,7 @@ Keep the generated `fonts/` directory beside the stylesheet so its relative font
95
101
  <meta charset="utf-8">
96
102
  <meta name="viewport" content="width=device-width, initial-scale=1">
97
103
  <title>Hello, world</title>
98
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@troennes/minium@0.1.0/dist/minium.min.css">
104
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@troennes/minium@0.2.0/dist/minium.min.css">
99
105
  </head>
100
106
  <body>
101
107
  <main class="container flow">
@@ -111,7 +117,14 @@ Explore the [quick-start documentation](https://minium.style/docs/index.html) wh
111
117
 
112
118
  ## Customize the theme
113
119
 
114
- Minium exposes custom properties for colors, type, spacing, radii, shadows, and component density. Override them in your project layer without specificity tricks. See the [customization guide](https://minium.style/docs/customization.html) for details.
120
+ Minium includes 31 color themes. Load one after the core stylesheet:
121
+
122
+ ```html
123
+ <link rel="stylesheet" href="minium.min.css">
124
+ <link rel="stylesheet" href="themes/blue.css">
125
+ ```
126
+
127
+ Custom properties control colors, type, spacing, radii, shadows, and component density. Override them in `@layer theme` without specificity tricks. See the [customization guide](https://minium.style/docs/customization.html) for details.
115
128
 
116
129
  ## Features
117
130
 
@@ -120,14 +133,14 @@ Explore the [quick-start documentation](https://minium.style/docs/index.html) wh
120
133
  - **Common components.** Minium includes cards, alerts, modals, dropdowns, accordions, navigation, tabs, pagination, badges, avatars, skeletons, loading and progress states, and tooltips
121
134
  - **Class-light by design.** Components own their structure and appearance, so meaningful classes replace wrapper stacks and utility chains
122
135
  - **Accessible defaults.** Minium favors native elements and browser behavior, preserves visible focus states, styles semantic and ARIA states, and respects reduced-motion preferences
123
- - **Customization.** Custom properties in `theme.css` control color, type, spacing, radii, shadows, and density
136
+ - **Customization.** Custom properties control color, type, spacing, radii, shadows, and density
124
137
  - **Pure modern CSS.** There is no Sass, preprocessor, build-time configuration, or JavaScript dependency
125
138
  - **MIT licensed.** Use Minium in personal, commercial, and open-source projects
126
139
  - **RTL support.** Logical properties and targeted RTL rules let layouts and components follow the document direction
127
- - **A 396-color palette.** Minium supports 31 twelve-step Radix Color scales plus black and white overlays, matching alpha colors, and Display P3 values for capable displays. The prebuilt library includes only colors referenced by the default theme
140
+ - **31 color themes.** One theme per Radix Color scale, each a 1.3–2.7 KB gzipped stylesheet with light and dark values and Display P3 colors for capable displays. Load one file to switch themes, with no build step
128
141
  - **Light and dark modes.** Theme colors follow the system preference by default and can be explicitly set to light or dark
129
142
  - **Responsive layouts.** Fluid type and spacing, intrinsic layouts, wrapping, and constrained components adapt to available space without a large breakpoint system
130
- - **Small fixed bundle.** The current minified core is ~13.5 KiB gzipped, so its cost is predictable before you write any HTML
143
+ - **Small fixed bundle.** The current minified core is ~14.3 KiB gzipped, so its cost is predictable before you write any HTML
131
144
  - **Token-bounded utilities.** Adjust spacing, gaps, radii, surfaces, and other common values without opening an unlimited utility API or reaching for inline styles
132
145
  - **Cascade layers.** Library styles remain predictable, and project overrides stay straightforward
133
146
  - **Opt-in integrations.** CSS for third-party markup ships separately from the core library
@@ -155,9 +168,9 @@ I have worked on Minium on and off since 2022 and rebuilt it from scratch three
155
168
 
156
169
  After three rebuilds, Minium’s core ideas feel settled. It works well for the sites and interfaces I build. Broader use will help reveal what still needs work before version 1.0.
157
170
 
158
- ## Project status: 0.1
171
+ ## Project status: 0.2
159
172
 
160
- Minium 0.1.0 is the first public release. The library is ready to use, but it has not yet been tested across a wide range of websites, applications, and browsers.
173
+ Minium 0.2 adds 31 color themes. The library is ready to use, but it has not yet been tested across a wide range of websites, applications, and browsers. Expect breaking changes in minor releases before 1.0. The [changelog](CHANGELOG.md) lists each change and the steps to upgrade.
161
174
 
162
175
  Please [open an issue](https://github.com/troennes/minium/issues) if you find rendering or accessibility problems, unclear documentation, awkward component boundaries, or APIs that require unnecessary HTML. Include a small reproduction and browser details when relevant.
163
176
 
@@ -171,8 +184,9 @@ Development requires Node.js 22 or later.
171
184
 
172
185
  ```bash
173
186
  npm install
174
- npm test # lint + gzip size budget
175
- npm run build # build core CSS, minified CSS and fonts
187
+ npm test # lint + theme check + gzip size budget
188
+ npm run build # build core CSS, minified CSS, fonts and themes
189
+ npm run build:themes # regenerate color roles and themes from scripts/themes.json
176
190
  ```
177
191
 
178
192
  ## License
@@ -1,4 +1,4 @@
1
- @layer theme {
1
+ @layer tokens {
2
2
  :root {
3
3
  --syntax-comment: light-dark(#7d8b99, #999);
4
4
  --syntax-punctuation: light-dark(#5f6364, #ccc);