wispcss 0.0.0-stage → 1.0.4
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 +74 -0
- package/LICENSE +49 -0
- package/README.md +385 -2
- package/README.zh-CN.md +385 -0
- package/dist/wispcss.css +45823 -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 +73 -3
- package/script-gen-color.js +148 -0
- package/script-mini.js +78 -0
- package/script-prefix.js +398 -0
- package/skill.md +575 -0
|
@@ -0,0 +1,332 @@
|
|
|
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
|
+
<title>Select - WispCSS Demo</title>
|
|
10
|
+
</head>
|
|
11
|
+
|
|
12
|
+
<body>
|
|
13
|
+
<h1>Select Component</h1>
|
|
14
|
+
<p>The <code>select</code> element uses the same <code>input-*</code> utility classes as text inputs. All variants, colors, sizes, shapes, and width modifiers work.</p>
|
|
15
|
+
|
|
16
|
+
<h2>Notes</h2>
|
|
17
|
+
<div class="section">
|
|
18
|
+
<ul>
|
|
19
|
+
<li>All <code>input-*</code> utilities apply to <code>select</code> — variants, colors, sizes, shapes, and widths.</li>
|
|
20
|
+
<li><code>input-pill</code> does NOT work with <code>select[multiple]</code>.</li>
|
|
21
|
+
<li>Prefer compound variant colors like <code>input-subtle-primary</code> over <code>input-subtle input-primary</code> — smaller CSS output.</li>
|
|
22
|
+
<li>Multi-select height: use <code>--input-count</code> (number of rows) or <code>max-height</code> CSS property.</li>
|
|
23
|
+
</ul>
|
|
24
|
+
</div>
|
|
25
|
+
|
|
26
|
+
<h2 id="variants">Variants</h2>
|
|
27
|
+
<div class="section">
|
|
28
|
+
<div>
|
|
29
|
+
<h3>Default</h3>
|
|
30
|
+
<select><option>Option 1</option><option>Option 2</option><optgroup label="Group"><option>A</option><option>B</option></optgroup></select>
|
|
31
|
+
<select disabled><option>Disabled</option></select>
|
|
32
|
+
</div>
|
|
33
|
+
<div>
|
|
34
|
+
<h3>.input-subtle</h3>
|
|
35
|
+
<select class="input-subtle"><option>Option 1</option><option>Option 2</option></select>
|
|
36
|
+
<select class="input-subtle" disabled><option>Disabled</option></select>
|
|
37
|
+
</div>
|
|
38
|
+
<div>
|
|
39
|
+
<h3>.input-ghost</h3>
|
|
40
|
+
<select class="input-ghost"><option>Option 1</option><option>Option 2</option></select>
|
|
41
|
+
<select class="input-ghost" disabled><option>Disabled</option></select>
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<h3>.input-underline</h3>
|
|
45
|
+
<select class="input-underline"><option>Option 1</option><option>Option 2</option></select>
|
|
46
|
+
<select class="input-underline" disabled><option>Disabled</option></select>
|
|
47
|
+
</div>
|
|
48
|
+
<div>
|
|
49
|
+
<h3>.input-outline</h3>
|
|
50
|
+
<select class="input-outline"><option>Option 1</option><option>Option 2</option></select>
|
|
51
|
+
<select class="input-outline" disabled><option>Disabled</option></select>
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<h2 id="theme-colors">Theme colors (primary)</h2>
|
|
56
|
+
<div class="section">
|
|
57
|
+
<p>Each color shown with all 5 variants: default, subtle, muted, ghost, underline, outline.</p>
|
|
58
|
+
<div>
|
|
59
|
+
<h3>Primary</h3>
|
|
60
|
+
<select class="input-primary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
61
|
+
<select class="input-subtle-primary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
62
|
+
<select class="input-muted-primary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
63
|
+
<select class="input-ghost-primary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
64
|
+
<select class="input-underline-primary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
65
|
+
<select class="input-outline-primary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
66
|
+
</div>
|
|
67
|
+
<div>
|
|
68
|
+
<h3>Secondary</h3>
|
|
69
|
+
<select class="input-secondary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
70
|
+
<select class="input-subtle-secondary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
71
|
+
<select class="input-muted-secondary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
72
|
+
<select class="input-ghost-secondary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
73
|
+
<select class="input-underline-secondary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
74
|
+
<select class="input-outline-secondary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
75
|
+
</div>
|
|
76
|
+
<div>
|
|
77
|
+
<h3>Tertiary</h3>
|
|
78
|
+
<select class="input-tertiary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
79
|
+
<select class="input-subtle-tertiary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
80
|
+
<select class="input-muted-tertiary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
81
|
+
<select class="input-ghost-tertiary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
82
|
+
<select class="input-underline-tertiary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
83
|
+
<select class="input-outline-tertiary"><option>Opt 1</option><option>Opt 2</option></select>
|
|
84
|
+
</div>
|
|
85
|
+
<div>
|
|
86
|
+
<h3>Success</h3>
|
|
87
|
+
<select class="input-success"><option>Opt 1</option><option>Opt 2</option></select>
|
|
88
|
+
<select class="input-subtle-success"><option>Opt 1</option><option>Opt 2</option></select>
|
|
89
|
+
<select class="input-muted-success"><option>Opt 1</option><option>Opt 2</option></select>
|
|
90
|
+
<select class="input-ghost-success"><option>Opt 1</option><option>Opt 2</option></select>
|
|
91
|
+
<select class="input-underline-success"><option>Opt 1</option><option>Opt 2</option></select>
|
|
92
|
+
<select class="input-outline-success"><option>Opt 1</option><option>Opt 2</option></select>
|
|
93
|
+
</div>
|
|
94
|
+
<div>
|
|
95
|
+
<h3>Error</h3>
|
|
96
|
+
<select class="input-error"><option>Opt 1</option><option>Opt 2</option></select>
|
|
97
|
+
<select class="input-subtle-error"><option>Opt 1</option><option>Opt 2</option></select>
|
|
98
|
+
<select class="input-muted-error"><option>Opt 1</option><option>Opt 2</option></select>
|
|
99
|
+
<select class="input-ghost-error"><option>Opt 1</option><option>Opt 2</option></select>
|
|
100
|
+
<select class="input-underline-error"><option>Opt 1</option><option>Opt 2</option></select>
|
|
101
|
+
<select class="input-outline-error"><option>Opt 1</option><option>Opt 2</option></select>
|
|
102
|
+
</div>
|
|
103
|
+
<div>
|
|
104
|
+
<h3>Info</h3>
|
|
105
|
+
<select class="input-info"><option>Opt 1</option><option>Opt 2</option></select>
|
|
106
|
+
<select class="input-subtle-info"><option>Opt 1</option><option>Opt 2</option></select>
|
|
107
|
+
<select class="input-muted-info"><option>Opt 1</option><option>Opt 2</option></select>
|
|
108
|
+
<select class="input-ghost-info"><option>Opt 1</option><option>Opt 2</option></select>
|
|
109
|
+
<select class="input-underline-info"><option>Opt 1</option><option>Opt 2</option></select>
|
|
110
|
+
<select class="input-outline-info"><option>Opt 1</option><option>Opt 2</option></select>
|
|
111
|
+
</div>
|
|
112
|
+
<div>
|
|
113
|
+
<h3>Highlight</h3>
|
|
114
|
+
<select class="input-highlight"><option>Opt 1</option><option>Opt 2</option></select>
|
|
115
|
+
<select class="input-subtle-highlight"><option>Opt 1</option><option>Opt 2</option></select>
|
|
116
|
+
<select class="input-muted-highlight"><option>Opt 1</option><option>Opt 2</option></select>
|
|
117
|
+
<select class="input-ghost-highlight"><option>Opt 1</option><option>Opt 2</option></select>
|
|
118
|
+
<select class="input-underline-highlight"><option>Opt 1</option><option>Opt 2</option></select>
|
|
119
|
+
<select class="input-outline-highlight"><option>Opt 1</option><option>Opt 2</option></select>
|
|
120
|
+
</div>
|
|
121
|
+
<div>
|
|
122
|
+
<h3>Warning</h3>
|
|
123
|
+
<select class="input-warning"><option>Opt 1</option><option>Opt 2</option></select>
|
|
124
|
+
<select class="input-subtle-warning"><option>Opt 1</option><option>Opt 2</option></select>
|
|
125
|
+
<select class="input-muted-warning"><option>Opt 1</option><option>Opt 2</option></select>
|
|
126
|
+
<select class="input-ghost-warning"><option>Opt 1</option><option>Opt 2</option></select>
|
|
127
|
+
<select class="input-underline-warning"><option>Opt 1</option><option>Opt 2</option></select>
|
|
128
|
+
<select class="input-outline-warning"><option>Opt 1</option><option>Opt 2</option></select>
|
|
129
|
+
</div>
|
|
130
|
+
<div>
|
|
131
|
+
<h3>Caution</h3>
|
|
132
|
+
<select class="input-caution"><option>Opt 1</option><option>Opt 2</option></select>
|
|
133
|
+
<select class="input-subtle-caution"><option>Opt 1</option><option>Opt 2</option></select>
|
|
134
|
+
<select class="input-muted-caution"><option>Opt 1</option><option>Opt 2</option></select>
|
|
135
|
+
<select class="input-ghost-caution"><option>Opt 1</option><option>Opt 2</option></select>
|
|
136
|
+
<select class="input-underline-caution"><option>Opt 1</option><option>Opt 2</option></select>
|
|
137
|
+
<select class="input-outline-caution"><option>Opt 1</option><option>Opt 2</option></select>
|
|
138
|
+
</div>
|
|
139
|
+
<div>
|
|
140
|
+
<h3>Ink</h3>
|
|
141
|
+
<select class="input-ink"><option>Opt 1</option><option>Opt 2</option></select>
|
|
142
|
+
<select class="input-subtle-ink"><option>Opt 1</option><option>Opt 2</option></select>
|
|
143
|
+
<select class="input-muted-ink"><option>Opt 1</option><option>Opt 2</option></select>
|
|
144
|
+
<select class="input-ghost-ink"><option>Opt 1</option><option>Opt 2</option></select>
|
|
145
|
+
<select class="input-underline-ink"><option>Opt 1</option><option>Opt 2</option></select>
|
|
146
|
+
<select class="input-outline-ink"><option>Opt 1</option><option>Opt 2</option></select>
|
|
147
|
+
</div>
|
|
148
|
+
<div>
|
|
149
|
+
<h3>Title</h3>
|
|
150
|
+
<select class="input-title"><option>Opt 1</option><option>Opt 2</option></select>
|
|
151
|
+
<select class="input-subtle-title"><option>Opt 1</option><option>Opt 2</option></select>
|
|
152
|
+
<select class="input-muted-title"><option>Opt 1</option><option>Opt 2</option></select>
|
|
153
|
+
<select class="input-ghost-title"><option>Opt 1</option><option>Opt 2</option></select>
|
|
154
|
+
<select class="input-underline-title"><option>Opt 1</option><option>Opt 2</option></select>
|
|
155
|
+
<select class="input-outline-title"><option>Opt 1</option><option>Opt 2</option></select>
|
|
156
|
+
</div>
|
|
157
|
+
<div>
|
|
158
|
+
<h3>Description</h3>
|
|
159
|
+
<select class="input-description"><option>Opt 1</option><option>Opt 2</option></select>
|
|
160
|
+
<select class="input-subtle-description"><option>Opt 1</option><option>Opt 2</option></select>
|
|
161
|
+
<select class="input-muted-description"><option>Opt 1</option><option>Opt 2</option></select>
|
|
162
|
+
<select class="input-ghost-description"><option>Opt 1</option><option>Opt 2</option></select>
|
|
163
|
+
<select class="input-underline-description"><option>Opt 1</option><option>Opt 2</option></select>
|
|
164
|
+
<select class="input-outline-description"><option>Opt 1</option><option>Opt 2</option></select>
|
|
165
|
+
</div>
|
|
166
|
+
<div>
|
|
167
|
+
<h3>Caption</h3>
|
|
168
|
+
<select class="input-caption"><option>Opt 1</option><option>Opt 2</option></select>
|
|
169
|
+
<select class="input-subtle-caption"><option>Opt 1</option><option>Opt 2</option></select>
|
|
170
|
+
<select class="input-muted-caption"><option>Opt 1</option><option>Opt 2</option></select>
|
|
171
|
+
<select class="input-ghost-caption"><option>Opt 1</option><option>Opt 2</option></select>
|
|
172
|
+
<select class="input-underline-caption"><option>Opt 1</option><option>Opt 2</option></select>
|
|
173
|
+
<select class="input-outline-caption"><option>Opt 1</option><option>Opt 2</option></select>
|
|
174
|
+
</div>
|
|
175
|
+
<div>
|
|
176
|
+
<h3>Placeholder</h3>
|
|
177
|
+
<select class="input-placeholder"><option>Opt 1</option><option>Opt 2</option></select>
|
|
178
|
+
<select class="input-subtle-placeholder"><option>Opt 1</option><option>Opt 2</option></select>
|
|
179
|
+
<select class="input-muted-placeholder"><option>Opt 1</option><option>Opt 2</option></select>
|
|
180
|
+
<select class="input-ghost-placeholder"><option>Opt 1</option><option>Opt 2</option></select>
|
|
181
|
+
<select class="input-underline-placeholder"><option>Opt 1</option><option>Opt 2</option></select>
|
|
182
|
+
<select class="input-outline-placeholder"><option>Opt 1</option><option>Opt 2</option></select>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
|
|
186
|
+
<h2 id="custom-colors">Custom colors</h2>
|
|
187
|
+
<p>Multiple color formats are supported:</p>
|
|
188
|
+
<ul>
|
|
189
|
+
<li>1. Theme semantic colors, e.g. <code>*-error</code>, <code>*-error-hover</code></li>
|
|
190
|
+
<li>2. Tailwind built-in colors, e.g. <code>*-indigo-500</code></li>
|
|
191
|
+
<li>3. Raw color values, e.g. <code>*-[#ff0000]</code></li>
|
|
192
|
+
<li>4. CSS named colors, e.g. <code>*-[red]</code>, <code>*-[green]</code></li>
|
|
193
|
+
</ul>
|
|
194
|
+
<div class="section">
|
|
195
|
+
<div>
|
|
196
|
+
<h3>Tailwind + raw colors</h3>
|
|
197
|
+
<select class="input-teal-500"><option>teal-500</option><option>Opt 2</option></select>
|
|
198
|
+
<select class="input-subtle-teal-500"><option>subtle-teal</option><option>Opt 2</option></select>
|
|
199
|
+
<select class="input-ghost-teal-500"><option>ghost-teal</option><option>Opt 2</option></select>
|
|
200
|
+
<select class="input-underline-teal-500"><option>underline-teal</option><option>Opt 2</option></select>
|
|
201
|
+
<select class="input-outline-teal-500"><option>outline-teal</option><option>Opt 2</option></select>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
|
|
205
|
+
<h2 id="sizes">Sizes (input-4 ~ input-15)</h2>
|
|
206
|
+
<div class="section">
|
|
207
|
+
<div>
|
|
208
|
+
<h3>16px (input-4)</h3>
|
|
209
|
+
<select class="input-4"><option>Option 1</option><option>Option 2</option></select>
|
|
210
|
+
</div>
|
|
211
|
+
<div>
|
|
212
|
+
<h3>20px (input-5)</h3>
|
|
213
|
+
<select class="input-5"><option>Option 1</option><option>Option 2</option></select>
|
|
214
|
+
</div>
|
|
215
|
+
<div>
|
|
216
|
+
<h3>24px (input-6)</h3>
|
|
217
|
+
<select class="input-6"><option>Option 1</option><option>Option 2</option></select>
|
|
218
|
+
</div>
|
|
219
|
+
<div>
|
|
220
|
+
<h3>28px (input-7)</h3>
|
|
221
|
+
<select class="input-7"><option>Option 1</option><option>Option 2</option></select>
|
|
222
|
+
</div>
|
|
223
|
+
<div>
|
|
224
|
+
<h3>32px (input-8, default)</h3>
|
|
225
|
+
<select class="input-8"><option>Option 1</option><option>Option 2</option></select>
|
|
226
|
+
</div>
|
|
227
|
+
<div>
|
|
228
|
+
<h3>36px (input-9)</h3>
|
|
229
|
+
<select class="input-9"><option>Option 1</option><option>Option 2</option></select>
|
|
230
|
+
</div>
|
|
231
|
+
<div>
|
|
232
|
+
<h3>40px (input-10)</h3>
|
|
233
|
+
<select class="input-10"><option>Option 1</option><option>Option 2</option></select>
|
|
234
|
+
</div>
|
|
235
|
+
<div>
|
|
236
|
+
<h3>44px (input-11)</h3>
|
|
237
|
+
<select class="input-11"><option>Option 1</option><option>Option 2</option></select>
|
|
238
|
+
</div>
|
|
239
|
+
<div>
|
|
240
|
+
<h3>48px (input-12)</h3>
|
|
241
|
+
<select class="input-12"><option>Option 1</option><option>Option 2</option></select>
|
|
242
|
+
</div>
|
|
243
|
+
<div>
|
|
244
|
+
<h3>52px (input-13)</h3>
|
|
245
|
+
<select class="input-13"><option>Option 1</option><option>Option 2</option></select>
|
|
246
|
+
</div>
|
|
247
|
+
<div>
|
|
248
|
+
<h3>56px (input-14)</h3>
|
|
249
|
+
<select class="input-14"><option>Option 1</option><option>Option 2</option></select>
|
|
250
|
+
</div>
|
|
251
|
+
<div>
|
|
252
|
+
<h3>60px (input-15)</h3>
|
|
253
|
+
<select class="input-15"><option>Option 1</option><option>Option 2</option></select>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
|
|
257
|
+
<h2 id="shapes">Shapes</h2>
|
|
258
|
+
<div class="section">
|
|
259
|
+
<div>
|
|
260
|
+
<h3>input-pill</h3>
|
|
261
|
+
<select class="input-pill"><option>Option 1</option><option>Option 2</option></select>
|
|
262
|
+
</div>
|
|
263
|
+
<div>
|
|
264
|
+
<h3>input-rounded</h3>
|
|
265
|
+
<select class="input-rounded"><option>Option 1</option><option>Option 2</option></select>
|
|
266
|
+
</div>
|
|
267
|
+
<div>
|
|
268
|
+
<h3>input-fluid</h3>
|
|
269
|
+
<select class="input-fluid"><option>Option 1</option><option>Option 2</option></select>
|
|
270
|
+
</div>
|
|
271
|
+
<div>
|
|
272
|
+
<h3>input-square</h3>
|
|
273
|
+
<select class="input-square"><option>Option 1</option><option>Option 2</option></select>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<h2 id="width-modifiers">Width modifiers</h2>
|
|
278
|
+
<div class="section">
|
|
279
|
+
<div>
|
|
280
|
+
<h3>input-scale (fixed 400px)</h3>
|
|
281
|
+
<select class="input-scale"><option>Option 1</option><option>Option 2</option></select>
|
|
282
|
+
</div>
|
|
283
|
+
<div>
|
|
284
|
+
<h3>input-scale-2 (2x / 800px)</h3>
|
|
285
|
+
<select class="input-scale-2"><option>Option 1</option><option>Option 2</option></select>
|
|
286
|
+
</div>
|
|
287
|
+
<div>
|
|
288
|
+
<h3>input-full (100%)</h3>
|
|
289
|
+
<select class="input-full"><option>Option 1</option><option>Option 2</option></select>
|
|
290
|
+
</div>
|
|
291
|
+
<div>
|
|
292
|
+
<h3>input-inline (content-width)</h3>
|
|
293
|
+
<select class="input-inline"><option>Short</option><option>Option 2</option></select>
|
|
294
|
+
<select class="input-inline"><option>Medium option text</option><option>Option 2</option></select>
|
|
295
|
+
<select class="input-inline"><option>Very long option label text here</option><option>Option 2</option></select>
|
|
296
|
+
</div>
|
|
297
|
+
<div>
|
|
298
|
+
<h3>input-inline + colors</h3>
|
|
299
|
+
<select class="input-inline input-subtle"><option>Subtle</option><option>Opt</option></select>
|
|
300
|
+
<select class="input-inline input-ghost"><option>Ghost</option><option>Opt</option></select>
|
|
301
|
+
<select class="input-inline input-underline"><option>Underline</option><option>Opt</option></select>
|
|
302
|
+
<select class="input-inline input-outline"><option>Outline</option><option>Opt</option></select>
|
|
303
|
+
<select class="input-inline input-subtle-primary"><option>Primary</option><option>Opt</option></select>
|
|
304
|
+
</div>
|
|
305
|
+
</div>
|
|
306
|
+
|
|
307
|
+
<h2 id="multi-select-multiple">Multi-select (multiple)</h2>
|
|
308
|
+
<div class="section">
|
|
309
|
+
<div>
|
|
310
|
+
<h3>Default</h3>
|
|
311
|
+
<select multiple size="4"><optgroup label="Group 1"><option>Option 1</option><option>Option 2</option></optgroup><optgroup label="Group 2"><option>Option 3</option><option>Option 4</option></optgroup><option>Option 5</option></optgroup></select>
|
|
312
|
+
</div>
|
|
313
|
+
<div>
|
|
314
|
+
<h3>With variant</h3>
|
|
315
|
+
<select class="input-subtle" multiple size="4"><option>Option 1</option><option>Option 2</option><option>Option 3</option><option>Option 4</option><option>Option 5</option></select>
|
|
316
|
+
<select class="input-outline-primary" multiple size="4"><option>Option 1</option><option>Option 2</option><option>Option 3</option><option>Option 4</option><option>Option 5</option></select>
|
|
317
|
+
</div>
|
|
318
|
+
<div>
|
|
319
|
+
<h3>Height control via --input-count</h3>
|
|
320
|
+
<select class="input-outline" multiple style="--input-count: 3"><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option></select>
|
|
321
|
+
<select class="input-outline" multiple style="--input-count: 5"><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option><option>6</option></select>
|
|
322
|
+
</div>
|
|
323
|
+
<div>
|
|
324
|
+
<h3>Height control via max-height</h3>
|
|
325
|
+
<select class="input-outline" multiple style="max-height: 100px"><option>Option 1</option><option>Option 2</option><option>Option 3</option><option>Option 4</option><option>Option 5</option><option>Option 6</option><option>Option 7</option><option>Option 8</option><option>Option 9</option><option>Option 10</option></select>
|
|
326
|
+
</div>
|
|
327
|
+
</div>
|
|
328
|
+
|
|
329
|
+
<script src="./demo-utils.js"></script>
|
|
330
|
+
</body>
|
|
331
|
+
|
|
332
|
+
</html>
|
|
@@ -0,0 +1,152 @@
|
|
|
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
|
+
<title>Shadow - WispCSS Demo</title>
|
|
10
|
+
<style>
|
|
11
|
+
.shadow-box { width: 100%; height: 100px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 0.875rem; background: var(--color-stage); margin-bottom: 8px; }
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
|
|
15
|
+
<body>
|
|
16
|
+
<h1>Shadow Utilities</h1>
|
|
17
|
+
<p>WispCSS supplements Tailwind's built-in shadows with additional CSS variables for common UI layers. Tailwind <code>shadow-*</code> classes work directly.</p>
|
|
18
|
+
|
|
19
|
+
<h2>Notes</h2>
|
|
20
|
+
<div class="section">
|
|
21
|
+
<ul>
|
|
22
|
+
<li>WispCSS adds shadow variables beyond Tailwind's defaults: <code>--shadow-base</code>, <code>--shadow-border</code>, <code>--shadow-border-inner</code>, <code>--shadow-bubble</code>, <code>--shadow-card</code>, <code>--shadow-desk</code>.</li>
|
|
23
|
+
<li>Tailwind built-in shadow classes: <code>shadow-sm</code>, <code>shadow</code>, <code>shadow-md</code>, <code>shadow-lg</code>, <code>shadow-xl</code>, <code>shadow-2xl</code>, <code>shadow-inner</code>, <code>shadow-none</code>.</li>
|
|
24
|
+
<li>Custom shadow color: <code>shadow-lg shadow-blue-500/50</code> (Tailwind v4).</li>
|
|
25
|
+
<li>Arbitrary shadow: <code>shadow-[0_10px_40px_rgba(0,0,0,0.3)]</code>.</li>
|
|
26
|
+
</ul>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<h2 id="wispcss-supplemental-shadows">WispCSS supplemental shadows</h2>
|
|
30
|
+
<div class="section">
|
|
31
|
+
<div>
|
|
32
|
+
<h3>--shadow-base</h3>
|
|
33
|
+
<div class="shadow-box" style="box-shadow: var(--shadow-base);">base</div>
|
|
34
|
+
</div>
|
|
35
|
+
<div>
|
|
36
|
+
<h3>--shadow-border</h3>
|
|
37
|
+
<div class="shadow-box" style="box-shadow: var(--shadow-border);">border (base + outline)</div>
|
|
38
|
+
</div>
|
|
39
|
+
<div>
|
|
40
|
+
<h3>--shadow-border-inner</h3>
|
|
41
|
+
<div class="shadow-box" style="box-shadow: var(--shadow-border-inner);">border-inner (inset + base)</div>
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<h3>--shadow-bubble</h3>
|
|
45
|
+
<div class="shadow-box" style="box-shadow: var(--shadow-bubble);">bubble (dialog/balloon)</div>
|
|
46
|
+
</div>
|
|
47
|
+
<div>
|
|
48
|
+
<h3>--shadow-card</h3>
|
|
49
|
+
<div class="shadow-box" style="box-shadow: var(--shadow-card);">card</div>
|
|
50
|
+
</div>
|
|
51
|
+
<div>
|
|
52
|
+
<h3>--shadow-desk</h3>
|
|
53
|
+
<div class="shadow-box" style="box-shadow: var(--shadow-desk);">desk (highest)</div>
|
|
54
|
+
</div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<h2 id="tailwind-built-in-shadow-classes">Tailwind built-in shadow classes</h2>
|
|
58
|
+
<div class="section">
|
|
59
|
+
<div>
|
|
60
|
+
<h3>shadow-sm</h3>
|
|
61
|
+
<div class="shadow-box shadow-sm">shadow-sm</div>
|
|
62
|
+
</div>
|
|
63
|
+
<div>
|
|
64
|
+
<h3>shadow</h3>
|
|
65
|
+
<div class="shadow-box shadow">shadow</div>
|
|
66
|
+
</div>
|
|
67
|
+
<div>
|
|
68
|
+
<h3>shadow-md</h3>
|
|
69
|
+
<div class="shadow-box shadow-md">shadow-md</div>
|
|
70
|
+
</div>
|
|
71
|
+
<div>
|
|
72
|
+
<h3>shadow-lg</h3>
|
|
73
|
+
<div class="shadow-box shadow-lg">shadow-lg</div>
|
|
74
|
+
</div>
|
|
75
|
+
<div>
|
|
76
|
+
<h3>shadow-xl</h3>
|
|
77
|
+
<div class="shadow-box shadow-xl">shadow-xl</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div>
|
|
80
|
+
<h3>shadow-2xl</h3>
|
|
81
|
+
<div class="shadow-box shadow-2xl">shadow-2xl</div>
|
|
82
|
+
</div>
|
|
83
|
+
<div>
|
|
84
|
+
<h3>shadow-inner</h3>
|
|
85
|
+
<div class="shadow-box shadow-inner">shadow-inner</div>
|
|
86
|
+
</div>
|
|
87
|
+
<div>
|
|
88
|
+
<h3>shadow-none</h3>
|
|
89
|
+
<div class="shadow-box shadow-none">shadow-none</div>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
|
|
93
|
+
<h2 id="custom-shadow-colors-tailwind-v4">Custom shadow colors (Tailwind v4)</h2>
|
|
94
|
+
<div class="section">
|
|
95
|
+
<div>
|
|
96
|
+
<h3>shadow-lg shadow-blue-500/50</h3>
|
|
97
|
+
<div class="shadow-box shadow-lg shadow-blue-500/50">Blue shadow</div>
|
|
98
|
+
</div>
|
|
99
|
+
<div>
|
|
100
|
+
<h3>shadow-lg shadow-red-500/40</h3>
|
|
101
|
+
<div class="shadow-box shadow-lg shadow-red-500/40">Red shadow</div>
|
|
102
|
+
</div>
|
|
103
|
+
<div>
|
|
104
|
+
<h3>shadow-lg shadow-green-500/40</h3>
|
|
105
|
+
<div class="shadow-box shadow-lg shadow-green-500/40">Green shadow</div>
|
|
106
|
+
</div>
|
|
107
|
+
<div>
|
|
108
|
+
<h3>Arbitrary value</h3>
|
|
109
|
+
<div class="shadow-box shadow-[0_10px_40px_rgba(0,0,0,0.3)]">Custom value</div>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
|
|
113
|
+
<h2 id="ring-utilities">Ring utilities</h2>
|
|
114
|
+
<div class="section">
|
|
115
|
+
<div>
|
|
116
|
+
<h3>ring (2px outline)</h3>
|
|
117
|
+
<div class="shadow-box ring">ring</div>
|
|
118
|
+
</div>
|
|
119
|
+
<div>
|
|
120
|
+
<h3>ring-4</h3>
|
|
121
|
+
<div class="shadow-box ring-4">ring-4</div>
|
|
122
|
+
</div>
|
|
123
|
+
<div>
|
|
124
|
+
<h3>ring-primary</h3>
|
|
125
|
+
<div class="shadow-box ring ring-primary">ring ring-primary</div>
|
|
126
|
+
</div>
|
|
127
|
+
<div>
|
|
128
|
+
<h3>ring-blue-500</h3>
|
|
129
|
+
<div class="shadow-box ring ring-blue-500">ring ring-blue-500</div>
|
|
130
|
+
</div>
|
|
131
|
+
<div>
|
|
132
|
+
<h3>ring-offset-2</h3>
|
|
133
|
+
<div class="shadow-box ring ring-primary ring-offset-2">ring ring-primary ring-offset-2</div>
|
|
134
|
+
</div>
|
|
135
|
+
<div>
|
|
136
|
+
<h3>inset-ring</h3>
|
|
137
|
+
<div class="shadow-box inset-ring">inset-ring</div>
|
|
138
|
+
</div>
|
|
139
|
+
<div>
|
|
140
|
+
<h3>inset-ring-4</h3>
|
|
141
|
+
<div class="shadow-box inset-ring-4">inset-ring-4</div>
|
|
142
|
+
</div>
|
|
143
|
+
<div>
|
|
144
|
+
<h3>inset-ring-primary</h3>
|
|
145
|
+
<div class="shadow-box inset-ring inset-ring-primary">inset-ring inset-ring-primary</div>
|
|
146
|
+
</div>
|
|
147
|
+
</div>
|
|
148
|
+
|
|
149
|
+
<script src="./demo-utils.js"></script>
|
|
150
|
+
</body>
|
|
151
|
+
|
|
152
|
+
|