@troennes/minium 0.1.0 → 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 +47 -11
- package/dist/integrations/prism.css +1 -1
- package/dist/minium.css +437 -332
- package/dist/minium.min.css +1 -1
- package/dist/themes/amber.css +128 -0
- package/dist/themes/blue.css +128 -0
- package/dist/themes/bronze.css +100 -0
- package/dist/themes/brown.css +128 -0
- package/dist/themes/crimson.css +159 -0
- package/dist/themes/cyan.css +100 -0
- package/dist/themes/gold.css +100 -0
- package/dist/themes/grass.css +159 -0
- package/dist/themes/gray.css +107 -0
- package/dist/themes/green.css +131 -0
- package/dist/themes/indigo.css +156 -0
- package/dist/themes/iris.css +128 -0
- package/dist/themes/jade.css +160 -0
- package/dist/themes/lime.css +131 -0
- package/dist/themes/mauve.css +107 -0
- package/dist/themes/mint.css +100 -0
- package/dist/themes/olive.css +107 -0
- package/dist/themes/orange.css +100 -0
- package/dist/themes/pink.css +131 -0
- package/dist/themes/plum.css +128 -0
- package/dist/themes/purple.css +100 -0
- package/dist/themes/red.css +131 -0
- package/dist/themes/ruby.css +160 -0
- package/dist/themes/sage.css +107 -0
- package/dist/themes/sand.css +107 -0
- package/dist/themes/sky.css +100 -0
- package/dist/themes/slate.css +135 -0
- package/dist/themes/teal.css +128 -0
- package/dist/themes/tomato.css +131 -0
- package/dist/themes/violet.css +100 -0
- package/dist/themes/yellow.css +159 -0
- package/package.json +6 -2
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.
|
|
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
|
|
@@ -59,11 +65,33 @@ import "@troennes/minium/min";
|
|
|
59
65
|
If your tools cannot import CSS from a package, copy the complete `node_modules/@troennes/minium/dist/` directory into your project's public assets. Then link the copied stylesheet:
|
|
60
66
|
|
|
61
67
|
```html
|
|
62
|
-
<link rel="stylesheet" href="/styles/minium
|
|
68
|
+
<link rel="stylesheet" href="/styles/minium.min.css">
|
|
63
69
|
```
|
|
64
70
|
|
|
65
71
|
Keep the included `fonts/` directory beside the stylesheet so its relative font URLs continue to work.
|
|
66
72
|
|
|
73
|
+
### Build from source
|
|
74
|
+
|
|
75
|
+
Choose this option if you want to modify Minium's source CSS before using it. Building requires Node.js 22 or later.
|
|
76
|
+
|
|
77
|
+
1. [Download the latest source ZIP from GitHub](https://github.com/troennes/minium/archive/refs/heads/main.zip).
|
|
78
|
+
2. Extract the ZIP and open a terminal in the extracted `minium-main` directory.
|
|
79
|
+
3. Install the build dependencies and build Minium:
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
npm install
|
|
83
|
+
npm run build
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
4. Copy the complete `dist/` directory into your project's public assets.
|
|
87
|
+
5. Link the copied stylesheet from your HTML:
|
|
88
|
+
|
|
89
|
+
```html
|
|
90
|
+
<link rel="stylesheet" href="/styles/minium/minium.min.css">
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
Keep the generated `fonts/` directory beside the stylesheet so its relative font URLs continue to work.
|
|
94
|
+
|
|
67
95
|
### Start with semantic HTML
|
|
68
96
|
|
|
69
97
|
```html
|
|
@@ -73,7 +101,7 @@ Keep the included `fonts/` directory beside the stylesheet so its relative font
|
|
|
73
101
|
<meta charset="utf-8">
|
|
74
102
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
75
103
|
<title>Hello, world</title>
|
|
76
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@troennes/minium@0.
|
|
104
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@troennes/minium@0.2.0/dist/minium.min.css">
|
|
77
105
|
</head>
|
|
78
106
|
<body>
|
|
79
107
|
<main class="container flow">
|
|
@@ -89,7 +117,14 @@ Explore the [quick-start documentation](https://minium.style/docs/index.html) wh
|
|
|
89
117
|
|
|
90
118
|
## Customize the theme
|
|
91
119
|
|
|
92
|
-
|
|
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.
|
|
93
128
|
|
|
94
129
|
## Features
|
|
95
130
|
|
|
@@ -98,14 +133,14 @@ Explore the [quick-start documentation](https://minium.style/docs/index.html) wh
|
|
|
98
133
|
- **Common components.** Minium includes cards, alerts, modals, dropdowns, accordions, navigation, tabs, pagination, badges, avatars, skeletons, loading and progress states, and tooltips
|
|
99
134
|
- **Class-light by design.** Components own their structure and appearance, so meaningful classes replace wrapper stacks and utility chains
|
|
100
135
|
- **Accessible defaults.** Minium favors native elements and browser behavior, preserves visible focus states, styles semantic and ARIA states, and respects reduced-motion preferences
|
|
101
|
-
- **Customization.** Custom properties
|
|
136
|
+
- **Customization.** Custom properties control color, type, spacing, radii, shadows, and density
|
|
102
137
|
- **Pure modern CSS.** There is no Sass, preprocessor, build-time configuration, or JavaScript dependency
|
|
103
138
|
- **MIT licensed.** Use Minium in personal, commercial, and open-source projects
|
|
104
139
|
- **RTL support.** Logical properties and targeted RTL rules let layouts and components follow the document direction
|
|
105
|
-
- **
|
|
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
|
|
106
141
|
- **Light and dark modes.** Theme colors follow the system preference by default and can be explicitly set to light or dark
|
|
107
142
|
- **Responsive layouts.** Fluid type and spacing, intrinsic layouts, wrapping, and constrained components adapt to available space without a large breakpoint system
|
|
108
|
-
- **Small fixed bundle.** The current minified core is ~
|
|
143
|
+
- **Small fixed bundle.** The current minified core is ~14.3 KiB gzipped, so its cost is predictable before you write any HTML
|
|
109
144
|
- **Token-bounded utilities.** Adjust spacing, gaps, radii, surfaces, and other common values without opening an unlimited utility API or reaching for inline styles
|
|
110
145
|
- **Cascade layers.** Library styles remain predictable, and project overrides stay straightforward
|
|
111
146
|
- **Opt-in integrations.** CSS for third-party markup ships separately from the core library
|
|
@@ -133,9 +168,9 @@ I have worked on Minium on and off since 2022 and rebuilt it from scratch three
|
|
|
133
168
|
|
|
134
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.
|
|
135
170
|
|
|
136
|
-
## Project status: 0.
|
|
171
|
+
## Project status: 0.2
|
|
137
172
|
|
|
138
|
-
Minium 0.
|
|
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.
|
|
139
174
|
|
|
140
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.
|
|
141
176
|
|
|
@@ -149,8 +184,9 @@ Development requires Node.js 22 or later.
|
|
|
149
184
|
|
|
150
185
|
```bash
|
|
151
186
|
npm install
|
|
152
|
-
npm test
|
|
153
|
-
npm run build
|
|
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
|
|
154
190
|
```
|
|
155
191
|
|
|
156
192
|
## License
|