wispcss 0.0.1 → 1.0.5
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/CHANGELOG.md +78 -0
- package/LICENSE +49 -0
- package/README.md +386 -0
- package/README.zh-CN.md +385 -0
- package/dist/wispcss.css +42758 -0
- package/dist/wispcss.min.css +2 -0
- package/examples/add-h2-ids.cjs +284 -0
- package/examples/demo-actions.html +188 -0
- package/examples/demo-alarm.html +219 -0
- package/examples/demo-animation.html +399 -0
- package/examples/demo-aura.html +195 -0
- package/examples/demo-avatar.html +279 -0
- package/examples/demo-background.html +284 -0
- package/examples/demo-badge.html +398 -0
- package/examples/demo-blob.html +307 -0
- package/examples/demo-blockquote.html +190 -0
- package/examples/demo-bookmark.html +243 -0
- package/examples/demo-breadcrumb.html +179 -0
- package/examples/demo-btns.html +349 -0
- package/examples/demo-bubble.html +215 -0
- package/examples/demo-buoy.html +187 -0
- package/examples/demo-button-icon.html +231 -0
- package/examples/demo-button-link.html +177 -0
- package/examples/demo-button.html +361 -0
- package/examples/demo-callout.html +601 -0
- package/examples/demo-check.html +323 -0
- package/examples/demo-code.html +212 -0
- package/examples/demo-color.html +545 -0
- package/examples/demo-comment.html +510 -0
- package/examples/demo-deform.html +229 -0
- package/examples/demo-dialog.html +932 -0
- package/examples/demo-divider.html +208 -0
- package/examples/demo-drawer.html +623 -0
- package/examples/demo-dropmenu.html +382 -0
- package/examples/demo-droppanel.html +354 -0
- package/examples/demo-ellipsis.html +145 -0
- package/examples/demo-emphasis.html +146 -0
- package/examples/demo-empty.html +112 -0
- package/examples/demo-entry.html +219 -0
- package/examples/demo-field.html +359 -0
- package/examples/demo-file.html +206 -0
- package/examples/demo-flag.html +225 -0
- package/examples/demo-form.html +201 -0
- package/examples/demo-gilt.html +170 -0
- package/examples/demo-heading.html +93 -0
- package/examples/demo-icon.html +164 -0
- package/examples/demo-input.html +300 -0
- package/examples/demo-kbd.html +202 -0
- package/examples/demo-lamp.html +248 -0
- package/examples/demo-link.html +142 -0
- package/examples/demo-normalize.html +366 -0
- package/examples/demo-otp.html +277 -0
- package/examples/demo-pagination.html +562 -0
- package/examples/demo-position.html +205 -0
- package/examples/demo-poster.html +384 -0
- package/examples/demo-pre - /345/211/257/346/234/254.html" +169 -0
- package/examples/demo-pre.html +205 -0
- package/examples/demo-preset.html +344 -0
- package/examples/demo-progress.html +303 -0
- package/examples/demo-range.html +211 -0
- package/examples/demo-rank.html +270 -0
- package/examples/demo-rating.html +251 -0
- package/examples/demo-reset.html +105 -0
- package/examples/demo-segment.html +436 -0
- package/examples/demo-select.html +332 -0
- package/examples/demo-shadow.html +152 -0
- package/examples/demo-shell.html +377 -0
- package/examples/demo-shimmer.html +217 -0
- package/examples/demo-size.html +149 -0
- package/examples/demo-skeleton.html +143 -0
- package/examples/demo-sketch.html +213 -0
- package/examples/demo-spacer.html +150 -0
- package/examples/demo-spinner.html +220 -0
- package/examples/demo-stats.html +165 -0
- package/examples/demo-status.html +212 -0
- package/examples/demo-step.html +240 -0
- package/examples/demo-styles.css +14 -0
- package/examples/demo-summary.html +128 -0
- package/examples/demo-swatch.html +253 -0
- package/examples/demo-switch.html +223 -0
- package/examples/demo-table.html +339 -0
- package/examples/demo-tag.html +318 -0
- package/examples/demo-text.html +91 -0
- package/examples/demo-theme.html +167 -0
- package/examples/demo-tools.html +152 -0
- package/examples/demo-transition.html +169 -0
- package/examples/demo-tree.html +929 -0
- package/examples/demo-underline.html +76 -0
- package/examples/demo-utils.js +131 -0
- package/examples/demo-validate.html +120 -0
- package/examples/index.html +149 -0
- package/package.json +72 -8
- package/script-gen-color.js +148 -0
- package/script-mini.js +77 -0
- package/script-prefix.js +398 -0
- package/skill.md +575 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
|
|
4
|
+
<head>
|
|
5
|
+
<meta charset="utf-8">
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
|
+
<link id="wispcss-css" rel="stylesheet" href="../dist/wispcss.css">
|
|
8
|
+
<link rel="stylesheet" href="./demo-styles.css">
|
|
9
|
+
<style>
|
|
10
|
+
.bg-demo-box {
|
|
11
|
+
width: 400px;
|
|
12
|
+
height: 200px;
|
|
13
|
+
box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.1);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.bg-demo-box-inner {
|
|
17
|
+
width: 100%;
|
|
18
|
+
height: 100%;
|
|
19
|
+
}
|
|
20
|
+
</style>
|
|
21
|
+
<title>Background - WispCSS Demo</title>
|
|
22
|
+
</head>
|
|
23
|
+
|
|
24
|
+
<body>
|
|
25
|
+
<h1>Background</h1>
|
|
26
|
+
<p>Geometric textures, watercolor gradients, misty blends, dark aurora, and subtle whisper backgrounds.</p>
|
|
27
|
+
|
|
28
|
+
<h2>Notes</h2>
|
|
29
|
+
<div class="section">
|
|
30
|
+
<ul>
|
|
31
|
+
<li>Geometric textures use theme color variables (<code>var(--color-title-*)</code>) and auto-switch in dark/light
|
|
32
|
+
mode.</li>
|
|
33
|
+
<li>All geometric utilities have dynamic variants: append a color token or size number, e.g.
|
|
34
|
+
<code>bg-polka-red</code>, <code>bg-polka-2</code>, <code>bg-polka-green-500</code>.</li>
|
|
35
|
+
<li>Gradient utilities (<code>bg-tint</code>, <code>bg-blend</code>, <code>bg-aurora</code>,
|
|
36
|
+
<code>bg-whisper</code>) support dynamic colors.</li>
|
|
37
|
+
<li>Multiple color formats are supported:</li>
|
|
38
|
+
</ul>
|
|
39
|
+
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
<h2 id="geometric">Geometric textures</h2>
|
|
43
|
+
<div class="section">
|
|
44
|
+
<p>Multiple color formats are supported:</p>
|
|
45
|
+
<ul>
|
|
46
|
+
<li>1. Theme semantic colors, e.g. <code>*-error</code>, <code>*-error-hover</code></li>
|
|
47
|
+
<li>2. Tailwind built-in colors, e.g. <code>*-indigo-500</code></li>
|
|
48
|
+
<li>3. Raw color values, e.g. <code>*-[#ff0000]</code></li>
|
|
49
|
+
<li>4. CSS named colors, e.g. <code>*-[red]</code>, <code>*-[green]</code></li>
|
|
50
|
+
</ul>
|
|
51
|
+
<h3>Dot & mesh</h3>
|
|
52
|
+
<div class="bg-demo-box bg-polka"></div>
|
|
53
|
+
<code>bg-polka</code> — large polka dots (24px spacing)
|
|
54
|
+
|
|
55
|
+
<h3>Micro noise</h3>
|
|
56
|
+
<div class="bg-demo-box bg-noise"></div>
|
|
57
|
+
<code>bg-noise</code> — 1px micro dots (3px spacing)
|
|
58
|
+
|
|
59
|
+
<h3>Diagonal hatch</h3>
|
|
60
|
+
<div class="bg-demo-box bg-hatch"></div>
|
|
61
|
+
<code>bg-hatch</code> — -45° 1px diagonal lines
|
|
62
|
+
|
|
63
|
+
<h3>Horizontal hatch</h3>
|
|
64
|
+
<div class="bg-demo-box bg-hatch-h"></div>
|
|
65
|
+
<code>bg-hatch-h</code> — 1px horizontal lines
|
|
66
|
+
|
|
67
|
+
<h3>Vertical hatch</h3>
|
|
68
|
+
<div class="bg-demo-box bg-hatch-v"></div>
|
|
69
|
+
<code>bg-hatch-v</code> — 1px vertical lines
|
|
70
|
+
|
|
71
|
+
<h3>Crosshatch</h3>
|
|
72
|
+
<div class="bg-demo-box bg-crosshatch"></div>
|
|
73
|
+
<code>bg-crosshatch</code> — ±45° crossed 0.7px lines
|
|
74
|
+
|
|
75
|
+
<h3>Diagonal stripes</h3>
|
|
76
|
+
<div class="bg-demo-box bg-stripes"></div>
|
|
77
|
+
<code>bg-stripes</code> — 8px wide diagonal zebra stripes
|
|
78
|
+
|
|
79
|
+
<h3>Horizontal stripes</h3>
|
|
80
|
+
<div class="bg-demo-box bg-stripes-h"></div>
|
|
81
|
+
<code>bg-stripes-h</code> — 8px horizontal stripes
|
|
82
|
+
|
|
83
|
+
<h3>Vertical stripes</h3>
|
|
84
|
+
<div class="bg-demo-box bg-stripes-v"></div>
|
|
85
|
+
<code>bg-stripes-v</code> — 8px vertical stripes
|
|
86
|
+
|
|
87
|
+
<h3>Blueprint grid</h3>
|
|
88
|
+
<div class="bg-demo-box bg-blueprint"></div>
|
|
89
|
+
<code>bg-blueprint</code> — 20px minor + 100px major nested grid
|
|
90
|
+
|
|
91
|
+
<h3>Marble</h3>
|
|
92
|
+
<div class="bg-demo-box bg-marble"></div>
|
|
93
|
+
<code>bg-marble</code> — 60°/120° crossing lines simulating marble veining
|
|
94
|
+
|
|
95
|
+
<h3>Grid</h3>
|
|
96
|
+
<div class="bg-demo-box bg-grid"></div>
|
|
97
|
+
<code>bg-grid</code> — 24px standard grid lines
|
|
98
|
+
|
|
99
|
+
<h3>Houndstooth</h3>
|
|
100
|
+
<div class="bg-demo-box bg-houndstooth"></div>
|
|
101
|
+
<code>bg-houndstooth</code> — classic 45° woven houndstooth
|
|
102
|
+
|
|
103
|
+
<h3>Circles</h3>
|
|
104
|
+
<div class="bg-demo-box bg-circles"></div>
|
|
105
|
+
<code>bg-circles</code> — centered nested concentric rings
|
|
106
|
+
|
|
107
|
+
<h3>Chessboard</h3>
|
|
108
|
+
<div class="bg-demo-box bg-chessboard"></div>
|
|
109
|
+
<code>bg-chessboard</code> — checkered pattern (also used for transparent canvas)
|
|
110
|
+
|
|
111
|
+
<h3>Sunburst</h3>
|
|
112
|
+
<div class="bg-demo-box bg-sunburst"></div>
|
|
113
|
+
<code>bg-sunburst</code> — radial ray pattern from center
|
|
114
|
+
</div>
|
|
115
|
+
|
|
116
|
+
<h2 id="whisper">Whisper (ultra-subtle gradients)</h2>
|
|
117
|
+
<div class="section">
|
|
118
|
+
<p>Low-opacity radial spot gradients using <code>bg-whisper-*</code>. Supports dynamic colors and position
|
|
119
|
+
modifiers.</p>
|
|
120
|
+
|
|
121
|
+
<p>Multiple color formats are supported:</p>
|
|
122
|
+
<ul>
|
|
123
|
+
<li>1. Theme semantic colors, e.g. <code>*-error</code>, <code>*-error-hover</code></li>
|
|
124
|
+
<li>2. Tailwind built-in colors, e.g. <code>*-indigo-500</code></li>
|
|
125
|
+
<li>3. Raw color values, e.g. <code>*-[#ff0000]</code></li>
|
|
126
|
+
<li>4. CSS named colors, e.g. <code>*-[red]</code>, <code>*-[green]</code></li>
|
|
127
|
+
</ul>
|
|
128
|
+
|
|
129
|
+
<h3>Default duotone</h3>
|
|
130
|
+
<div class="bg-demo-box bg-whisper-blue-500"></div>
|
|
131
|
+
<code>bg-whisper-blue-500</code> — default top-left + bottom-right spots
|
|
132
|
+
|
|
133
|
+
<h3>Between (split-screen)</h3>
|
|
134
|
+
<div class="bg-demo-box bg-whisper-blue-500 bg-whisper-between"></div>
|
|
135
|
+
<code>bg-whisper-blue-500 bg-whisper-between</code> — spots shifted to left/right edges
|
|
136
|
+
|
|
137
|
+
<h3>Center (focused glow)</h3>
|
|
138
|
+
<div class="bg-demo-box bg-whisper-blue-500 bg-whisper-center"></div>
|
|
139
|
+
<code>bg-whisper-blue-500 bg-whisper-center</code> — first spot centered
|
|
140
|
+
|
|
141
|
+
<h3>Mono (single color)</h3>
|
|
142
|
+
<div class="bg-demo-box bg-whisper-orange-500 bg-whisper-mono"></div>
|
|
143
|
+
<code>bg-whisper-orange-500 bg-whisper-mono</code> — only first spot visible
|
|
144
|
+
|
|
145
|
+
<h3>Duotone (complementary)</h3>
|
|
146
|
+
<div class="bg-demo-box bg-whisper-pink-500 bg-whisper-duotone"></div>
|
|
147
|
+
<code>bg-whisper-pink-500 bg-whisper-duotone</code> — 180° hue shift
|
|
148
|
+
|
|
149
|
+
<h3>Tritone (analogous)</h3>
|
|
150
|
+
<div class="bg-demo-box bg-whisper-orange-500 bg-whisper-tritone"></div>
|
|
151
|
+
<code>bg-whisper-orange-500 bg-whisper-tritone</code> — 90° hue shift each spot
|
|
152
|
+
|
|
153
|
+
<h3>Custom CSS variables</h3>
|
|
154
|
+
<div class="bg-demo-box bg-whisper-red-500" style="--bg-2:blue"></div>
|
|
155
|
+
<code>bg-whisper-red-500</code> with <code>style="--bg-2:blue"</code>
|
|
156
|
+
<div class="bg-demo-box bg-whisper-red-500" style="--bg-1-a:0.6"></div>
|
|
157
|
+
<code>bg-whisper-red-500</code> with <code>style="--bg-1-a:0.6"</code>
|
|
158
|
+
<div class="bg-demo-box bg-whisper-indigo-500" style="--bg-2:var(--color-sky-500)"></div>
|
|
159
|
+
<code>bg-whisper-indigo-500</code> with <code>style="--bg-2:var(--color-sky-500)"</code>
|
|
160
|
+
<div class="bg-demo-box bg-whisper-orange-500" style="--bg-angle:-80"></div>
|
|
161
|
+
<code>bg-whisper-orange-500</code> with <code>style="--bg-angle:-80"</code>
|
|
162
|
+
<div class="bg-demo-box bg-whisper-orange-500 bg-whisper-center" style="--bg-angle:-80"></div>
|
|
163
|
+
<code>bg-whisper-orange-500 bg-whisper-center</code> with <code>style="--bg-angle:-80"</code>
|
|
164
|
+
</div>
|
|
165
|
+
|
|
166
|
+
<h2 id="tint">Tint (watercolor gradients)</h2>
|
|
167
|
+
<div class="section">
|
|
168
|
+
<p>Soft three-radial-spot watercolor backgrounds using <code>bg-tint</code> series. Supports dynamic color
|
|
169
|
+
customization.</p>
|
|
170
|
+
|
|
171
|
+
<p>Multiple color formats are supported:</p>
|
|
172
|
+
<ul>
|
|
173
|
+
<li>1. Theme semantic colors, e.g. <code>*-error</code>, <code>*-error-hover</code></li>
|
|
174
|
+
<li>2. Tailwind built-in colors, e.g. <code>*-indigo-500</code></li>
|
|
175
|
+
<li>3. Raw color values, e.g. <code>*-[#ff0000]</code></li>
|
|
176
|
+
<li>4. CSS named colors, e.g. <code>*-[red]</code>, <code>*-[green]</code></li>
|
|
177
|
+
</ul>
|
|
178
|
+
|
|
179
|
+
<h3>Default (primary theme)</h3>
|
|
180
|
+
<div class="bg-demo-box bg-tint"></div>
|
|
181
|
+
<code>bg-tint</code> — uses <code>--color-primary</code>
|
|
182
|
+
|
|
183
|
+
<h3>Green-500</h3>
|
|
184
|
+
<div class="bg-demo-box bg-tint-green-500"></div>
|
|
185
|
+
<code>bg-tint-green-500</code>
|
|
186
|
+
|
|
187
|
+
<h3>Custom red</h3>
|
|
188
|
+
<div class="bg-demo-box bg-tint-[#ff0000]"></div>
|
|
189
|
+
<code>bg-tint-[#ff0000]</code> — arbitrary hex value
|
|
190
|
+
</div>
|
|
191
|
+
|
|
192
|
+
<h2 id="blend">Blend (misty watercolor)</h2>
|
|
193
|
+
<div class="section">
|
|
194
|
+
<p>High-opacity radial spot misty blend backgrounds using <code>bg-blend</code> series. Supports dynamic color
|
|
195
|
+
customization.</p>
|
|
196
|
+
|
|
197
|
+
<p>Multiple color formats are supported:</p>
|
|
198
|
+
<ul>
|
|
199
|
+
<li>1. Theme semantic colors, e.g. <code>*-error</code>, <code>*-error-hover</code></li>
|
|
200
|
+
<li>2. Tailwind built-in colors, e.g. <code>*-indigo-500</code></li>
|
|
201
|
+
<li>3. Raw color values, e.g. <code>*-[#ff0000]</code></li>
|
|
202
|
+
<li>4. CSS named colors, e.g. <code>*-[red]</code>, <code>*-[green]</code></li>
|
|
203
|
+
</ul>
|
|
204
|
+
|
|
205
|
+
<h3>Default (primary theme)</h3>
|
|
206
|
+
<div class="bg-demo-box bg-blend"></div>
|
|
207
|
+
<code>bg-blend</code>
|
|
208
|
+
|
|
209
|
+
<h3>Error</h3>
|
|
210
|
+
<div class="bg-demo-box bg-blend-error"></div>
|
|
211
|
+
<code>bg-blend-error</code>
|
|
212
|
+
|
|
213
|
+
<h3>Success</h3>
|
|
214
|
+
<div class="bg-demo-box bg-blend-success"></div>
|
|
215
|
+
<code>bg-blend-success</code>
|
|
216
|
+
|
|
217
|
+
<h3>Custom purple</h3>
|
|
218
|
+
<div class="bg-demo-box bg-blend-[#7100ff]"></div>
|
|
219
|
+
<code>bg-blend-[#7100ff]</code>
|
|
220
|
+
|
|
221
|
+
<h3>Custom blue</h3>
|
|
222
|
+
<div class="bg-demo-box bg-blend-[#0017ff]"></div>
|
|
223
|
+
<code>bg-blend-[#0017ff]</code>
|
|
224
|
+
</div>
|
|
225
|
+
|
|
226
|
+
<h2 id="aurora">Aurora (dark gradient)</h2>
|
|
227
|
+
<div class="section">
|
|
228
|
+
<p>Corner-placed radial spot dark aurora gradients using <code>bg-aurora</code> series. Spot size and opacity
|
|
229
|
+
auto-adjust in dark mode.</p>
|
|
230
|
+
|
|
231
|
+
<p>Multiple color formats are supported:</p>
|
|
232
|
+
<ul>
|
|
233
|
+
<li>1. Theme semantic colors, e.g. <code>*-error</code>, <code>*-error-hover</code></li>
|
|
234
|
+
<li>2. Tailwind built-in colors, e.g. <code>*-indigo-500</code></li>
|
|
235
|
+
<li>3. Raw color values, e.g. <code>*-[#ff0000]</code></li>
|
|
236
|
+
<li>4. CSS named colors, e.g. <code>*-[red]</code>, <code>*-[green]</code></li>
|
|
237
|
+
</ul>
|
|
238
|
+
|
|
239
|
+
<h3>Default (primary theme)</h3>
|
|
240
|
+
<div class="bg-demo-box bg-aurora"></div>
|
|
241
|
+
<code>bg-aurora</code>
|
|
242
|
+
|
|
243
|
+
<h3>Error</h3>
|
|
244
|
+
<div class="bg-demo-box bg-aurora-error"></div>
|
|
245
|
+
<code>bg-aurora-error</code>
|
|
246
|
+
|
|
247
|
+
<h3>Success</h3>
|
|
248
|
+
<div class="bg-demo-box bg-aurora-success"></div>
|
|
249
|
+
<code>bg-aurora-success</code>
|
|
250
|
+
|
|
251
|
+
<h3>Custom purple</h3>
|
|
252
|
+
<div class="bg-demo-box bg-aurora-[#7100ff]"></div>
|
|
253
|
+
<code>bg-aurora-[#7100ff]</code>
|
|
254
|
+
|
|
255
|
+
<h3>Custom blue</h3>
|
|
256
|
+
<div class="bg-demo-box bg-aurora-[#0017ff]"></div>
|
|
257
|
+
<code>bg-aurora-[#0017ff]</code>
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
<h2 id="layered">Layered backgrounds</h2>
|
|
261
|
+
<div class="section">
|
|
262
|
+
<p>Combine a geometric texture on the outer container and a gradient with <code>bg-transparent</code> on the inner
|
|
263
|
+
container to blend them together.</p>
|
|
264
|
+
|
|
265
|
+
<div class="bg-demo-box bg-grid">
|
|
266
|
+
<div class="bg-demo-box-inner bg-blend bg-transparent"></div>
|
|
267
|
+
</div>
|
|
268
|
+
<code><div class="bg-grid"><div class="bg-blend bg-transparent"></div></div></code>
|
|
269
|
+
|
|
270
|
+
<div class="bg-demo-box bg-circles">
|
|
271
|
+
<div class="bg-demo-box-inner bg-tint bg-transparent"></div>
|
|
272
|
+
</div>
|
|
273
|
+
<code><div class="bg-circles"><div class="bg-tint bg-transparent"></div></div></code>
|
|
274
|
+
|
|
275
|
+
<div class="bg-demo-box bg-stripes">
|
|
276
|
+
<div class="bg-demo-box-inner bg-aurora bg-transparent"></div>
|
|
277
|
+
</div>
|
|
278
|
+
<code><div class="bg-stripes"><div class="bg-aurora bg-transparent"></div></div></code>
|
|
279
|
+
</div>
|
|
280
|
+
|
|
281
|
+
<script src="./demo-utils.js"></script>
|
|
282
|
+
</body>
|
|
283
|
+
|
|
284
|
+
</html>
|