wispcss 0.0.1 → 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.
Files changed (96) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/LICENSE +49 -0
  3. package/README.md +386 -0
  4. package/README.zh-CN.md +385 -0
  5. package/dist/wispcss.css +45823 -0
  6. package/dist/wispcss.min.css +2 -0
  7. package/examples/add-h2-ids.cjs +284 -0
  8. package/examples/demo-actions.html +188 -0
  9. package/examples/demo-alarm.html +219 -0
  10. package/examples/demo-animation.html +399 -0
  11. package/examples/demo-aura.html +195 -0
  12. package/examples/demo-avatar.html +279 -0
  13. package/examples/demo-background.html +284 -0
  14. package/examples/demo-badge.html +398 -0
  15. package/examples/demo-blob.html +307 -0
  16. package/examples/demo-blockquote.html +190 -0
  17. package/examples/demo-bookmark.html +243 -0
  18. package/examples/demo-breadcrumb.html +179 -0
  19. package/examples/demo-btns.html +349 -0
  20. package/examples/demo-bubble.html +215 -0
  21. package/examples/demo-buoy.html +187 -0
  22. package/examples/demo-button-icon.html +231 -0
  23. package/examples/demo-button-link.html +177 -0
  24. package/examples/demo-button.html +361 -0
  25. package/examples/demo-callout.html +601 -0
  26. package/examples/demo-check.html +323 -0
  27. package/examples/demo-code.html +212 -0
  28. package/examples/demo-color.html +545 -0
  29. package/examples/demo-comment.html +510 -0
  30. package/examples/demo-deform.html +229 -0
  31. package/examples/demo-dialog.html +932 -0
  32. package/examples/demo-divider.html +208 -0
  33. package/examples/demo-drawer.html +623 -0
  34. package/examples/demo-dropmenu.html +382 -0
  35. package/examples/demo-droppanel.html +354 -0
  36. package/examples/demo-ellipsis.html +145 -0
  37. package/examples/demo-emphasis.html +146 -0
  38. package/examples/demo-empty.html +112 -0
  39. package/examples/demo-entry.html +219 -0
  40. package/examples/demo-field.html +359 -0
  41. package/examples/demo-file.html +206 -0
  42. package/examples/demo-flag.html +225 -0
  43. package/examples/demo-form.html +201 -0
  44. package/examples/demo-gilt.html +170 -0
  45. package/examples/demo-heading.html +93 -0
  46. package/examples/demo-icon.html +164 -0
  47. package/examples/demo-input.html +300 -0
  48. package/examples/demo-kbd.html +202 -0
  49. package/examples/demo-lamp.html +248 -0
  50. package/examples/demo-link.html +142 -0
  51. package/examples/demo-normalize.html +366 -0
  52. package/examples/demo-otp.html +277 -0
  53. package/examples/demo-pagination.html +562 -0
  54. package/examples/demo-position.html +205 -0
  55. package/examples/demo-poster.html +384 -0
  56. package/examples/demo-pre - /345/211/257/346/234/254.html" +169 -0
  57. package/examples/demo-pre.html +205 -0
  58. package/examples/demo-preset.html +344 -0
  59. package/examples/demo-progress.html +303 -0
  60. package/examples/demo-range.html +211 -0
  61. package/examples/demo-rank.html +270 -0
  62. package/examples/demo-rating.html +251 -0
  63. package/examples/demo-reset.html +105 -0
  64. package/examples/demo-segment.html +436 -0
  65. package/examples/demo-select.html +332 -0
  66. package/examples/demo-shadow.html +152 -0
  67. package/examples/demo-shell.html +377 -0
  68. package/examples/demo-shimmer.html +217 -0
  69. package/examples/demo-size.html +149 -0
  70. package/examples/demo-skeleton.html +143 -0
  71. package/examples/demo-sketch.html +213 -0
  72. package/examples/demo-spacer.html +150 -0
  73. package/examples/demo-spinner.html +220 -0
  74. package/examples/demo-stats.html +165 -0
  75. package/examples/demo-status.html +212 -0
  76. package/examples/demo-step.html +240 -0
  77. package/examples/demo-styles.css +14 -0
  78. package/examples/demo-summary.html +128 -0
  79. package/examples/demo-swatch.html +253 -0
  80. package/examples/demo-switch.html +223 -0
  81. package/examples/demo-table.html +339 -0
  82. package/examples/demo-tag.html +318 -0
  83. package/examples/demo-text.html +91 -0
  84. package/examples/demo-theme.html +167 -0
  85. package/examples/demo-tools.html +152 -0
  86. package/examples/demo-transition.html +169 -0
  87. package/examples/demo-tree.html +929 -0
  88. package/examples/demo-underline.html +76 -0
  89. package/examples/demo-utils.js +131 -0
  90. package/examples/demo-validate.html +120 -0
  91. package/examples/index.html +149 -0
  92. package/package.json +72 -8
  93. package/script-gen-color.js +148 -0
  94. package/script-mini.js +78 -0
  95. package/script-prefix.js +398 -0
  96. package/skill.md +575 -0
@@ -0,0 +1,205 @@
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>Position - WispCSS Demo</title>
10
+ <style>
11
+ .wrapper{
12
+ position:relative;
13
+ height:200px;
14
+ border:1px solid var(--color-title-bd);
15
+ border-radius:var(--default-border-radius);
16
+ margin-bottom:1rem;
17
+ }
18
+ .wrapper-2{
19
+ position:relative;
20
+ height:200px;
21
+ border:1px solid var(--color-title-bd);
22
+ border-radius:var(--default-border-radius);
23
+ overflow:auto;
24
+ }
25
+ .wrapper-3{
26
+ position:relative;
27
+ height:200px;
28
+ width:200px;
29
+ border:1px solid var(--color-title-bd);
30
+ border-radius:var(--default-border-radius);
31
+ overflow:auto;
32
+ }
33
+ .box{
34
+ padding:6px 10px;
35
+ border-radius:inherit;
36
+ background:var(--color-primary);
37
+ color:var(--color-primary-contrast);
38
+ }
39
+ </style>
40
+ </head>
41
+
42
+ <body>
43
+ <h1>Position Component</h1>
44
+ <p>Fixed / absolute centering, corner anchoring, and sticky offsets using logical properties.</p>
45
+
46
+ <h2>Notes</h2>
47
+ <div class="section">
48
+ <ul>
49
+ <li>Corner anchors default to <code>0</code> offsets; combine with Tailwind spacing (e.g. <code>top-4</code>) to adjust.</li>
50
+ <li>Absolute positioning requires <code>position: relative</code> on the parent.</li>
51
+ <li>Sticky utilities require a scrollable container.</li>
52
+ <li>All classes use logical properties, so RTL is supported automatically.</li>
53
+ </ul>
54
+ </div>
55
+
56
+ <h2 id="interactive">Interactive fixed / absolute</h2>
57
+ <div class="section">
58
+ <p>Switch the target between <code>fixed</code> and <code>absolute</code> to see how it anchors to the viewport vs. the parent box.</p>
59
+ <div class="wrapper">
60
+ <span id="target" class="absolute-center-x box">
61
+ Target
62
+ </span>
63
+ </div>
64
+ <span class="btns">
65
+ <button data-pos="absolute-cover" class="btn">absolute-cover</button>
66
+ <button data-pos="absolute-cover-x" class="btn">absolute-cover-x</button>
67
+ <button data-pos="absolute-cover-y" class="btn">absolute-cover-y</button>
68
+ <button data-pos="absolute-center" class="btn">absolute-center</button>
69
+ <button data-pos="absolute-center-x" class="btn">center-x</button>
70
+ <button data-pos="absolute-top-start" class="btn">top-start</button>
71
+ <button data-pos="absolute-top-end" class="btn">top-end</button>
72
+ <button data-pos="absolute-bottom-start" class="btn">bottom-start</button>
73
+ <button data-pos="absolute-bottom-end" class="btn">bottom-end</button>
74
+ </span>
75
+ <p></p>
76
+ <span class="btns">
77
+ <button data-pos="fixed-cover" class="btn">fixed-cover</button>
78
+ <button data-pos="fixed-cover-x" class="btn">fixed-cover-x</button>
79
+ <button data-pos="fixed-cover-y" class="btn">fixed-cover-y</button>
80
+ <button data-pos="fixed-center" class="btn">fixed-center</button>
81
+ <button data-pos="fixed-center-x" class="btn">center-x</button>
82
+ <button data-pos="fixed-top-start" class="btn">top-start</button>
83
+ <button data-pos="fixed-top-end" class="btn">top-end</button>
84
+ <button data-pos="fixed-bottom-start" class="btn">bottom-start</button>
85
+ <button data-pos="fixed-bottom-end" class="btn">bottom-end</button>
86
+ </span>
87
+ </div>
88
+
89
+ <h2 id="cover">Cover</h2>
90
+ <div class="section">
91
+ <div>
92
+ <h3>absolute-cover — fills the parent</h3>
93
+ <div class="wrapper-3">
94
+ <div class="absolute-cover box" >absolute-cover</div>
95
+ </div>
96
+ </div>
97
+ <div>
98
+ <h3>absolute-cover-4 — cover with dynamic gap</h3>
99
+ <div class="wrapper-3">
100
+ <div class="absolute-cover-4 box">absolute-cover-4</div>
101
+ </div>
102
+ </div>
103
+ <div class="flex gap-4">
104
+ <div>
105
+ <h3>absolute-cover-x</h3>
106
+ <div class="wrapper-3">
107
+ <div class="absolute-cover-x box">x</div>
108
+ </div>
109
+ </div>
110
+ <div>
111
+ <h3>absolute-cover-y</h3>
112
+ <div class="wrapper-3">
113
+ <div class="absolute-cover-y box">y</div>
114
+ </div>
115
+ </div>
116
+ <div>
117
+ <h3>absolute-cover-x-4</h3>
118
+ <div class="wrapper-3">
119
+ <div class="absolute-cover-x-4 box">x-4</div>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ <p>The same <code>fixed-cover</code> / <code>fixed-cover-x</code> / <code>fixed-cover-y</code> variants fill the viewport instead of the parent.</p>
124
+ </div>
125
+
126
+ <h2 id="centering">Centering</h2>
127
+ <div class="section">
128
+ <div class="flex gap-4">
129
+ <div>
130
+ <h3>absolute-center</h3>
131
+ <div class="wrapper">
132
+ <div class="absolute-center box" >center</div>
133
+ </div>
134
+ </div>
135
+ <div>
136
+ <h3>absolute-center-x</h3>
137
+ <div class="wrapper">
138
+ <div class="absolute-center-x box">center-x</div>
139
+ </div>
140
+ </div>
141
+ <div>
142
+ <h3>absolute-center-y</h3>
143
+ <div class="wrapper">
144
+ <div class="absolute-center-y box">center-y</div>
145
+ </div>
146
+ </div>
147
+ </div>
148
+ <p>The same <code>fixed-*</code> variants anchor to the viewport instead of the parent.</p>
149
+ </div>
150
+
151
+ <h2 id="corners">Corner anchors</h2>
152
+ <div class="section">
153
+ <div class="wrapper">
154
+ <span class="absolute-top-start box">top-start</span>
155
+ <span class="absolute-top-end box">top-end</span>
156
+ <span class="absolute-bottom-start box">bottom-start</span>
157
+ <span class="absolute-bottom-end box">bottom-end</span>
158
+ </div>
159
+ <p>Fixed variants (<code>fixed-top-start</code> <code>fixed-top-end</code> <code>fixed-bottom-start</code> <code>fixed-bottom-end</code>) behave the same but stick to the viewport.</p>
160
+ </div>
161
+
162
+ <h2 id="sticky">Sticky</h2>
163
+ <div class="section">
164
+ <div class="flex gap-4">
165
+ <div>
166
+ <h3>sticky-top</h3>
167
+ <div class="wrapper-2">
168
+ <div class="sticky-top box">Header</div>
169
+ <div>Line 1<br>Line 2<br>Line 3<br>Line 4<br>Line 5<br>Line 6<br>Line 7<br>Line 8<br>Line 9<br>Line 10</div>
170
+ </div>
171
+ </div>
172
+ <div>
173
+ <h3>sticky-bottom</h3>
174
+ <div class="wrapper-2">
175
+ <div>Line 1<br>Line 2<br>Line 3<br>Line 4<br>Line 5<br>Line 6<br>Line 7<br>Line 8<br>Line 9<br>Line 10</div>
176
+ <div class="sticky-bottom box">Footer</div>
177
+ </div>
178
+ </div>
179
+ <div>
180
+ <h3>sticky-top-4 (offset)</h3>
181
+ <div class="wrapper-2">
182
+ <div class="sticky-top-4 box">Top-4</div>
183
+ <div>Line 1<br>Line 2<br>Line 3<br>Line 4<br>Line 5<br>Line 6<br>Line 7<br>Line 8<br>Line 9<br>Line 10</div>
184
+ </div>
185
+ </div>
186
+ </div>
187
+ </div>
188
+
189
+ <script>
190
+ const target = document.getElementById('target');
191
+ const btns = document.querySelectorAll('[data-pos]');
192
+ const groupClasses = ['absolute-cover','absolute-cover-x','absolute-cover-y','absolute-center','absolute-center-x', 'absolute-top-start', 'absolute-top-end', 'absolute-bottom-start', 'absolute-bottom-end', 'fixed-cover', 'fixed-cover-x', 'fixed-cover-y', 'fixed-center', 'fixed-center-x', 'fixed-top-start', 'fixed-top-end', 'fixed-bottom-start', 'fixed-bottom-end'];
193
+
194
+ btns.forEach(btn => {
195
+ btn.addEventListener('click', () => {
196
+ groupClasses.forEach(c => target.classList.remove(c));
197
+ target.classList.add(btn.dataset.pos);
198
+ btns.forEach(b => b.classList.remove('btn-primary'));
199
+ btn.classList.add('btn-primary');
200
+ });
201
+ });
202
+ </script>
203
+ </body>
204
+
205
+ </html>
@@ -0,0 +1,384 @@
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>Poster - WispCSS Demo</title>
10
+ </head>
11
+
12
+ <body>
13
+ <h1>Poster Component</h1>
14
+ <p>Cover image container with aspect ratio, overlays, and hover effects. Requires a width, height, or <code>aspect-ratio</code> to render.</p>
15
+
16
+ <h2>Notes</h2>
17
+ <div class="section">
18
+ <ul>
19
+ <li>Base class: <code>.poster</code>. Default aspect ratio is <code>4/3</code>.</li>
20
+ <li>Place <code>&lt;img></code> or <code>&lt;picture></code> inside. Missing or empty <code>src</code> shows "No image available".</li>
21
+ <li>Use <code>data-content</code> for custom overlay text on <code>::before</code>, and <code>data-content-hover</code> for hover-only text.</li>
22
+ <li>Images use <code>object-fit: cover</code> by default. Empty poster shows a solid background.</li>
23
+ </ul>
24
+ </div>
25
+
26
+ <h2 id="basic">Basic usage</h2>
27
+ <div class="section">
28
+ <div>
29
+ <h3>Default (4/3)</h3>
30
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
31
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
32
+ </div>
33
+ <div>
34
+ <h3>Custom aspect ratio</h3>
35
+ <span class="poster w-40 aspect-1/1"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
36
+ <span class="poster w-60 aspect-16/9"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
37
+ </div>
38
+ <div>
39
+ <h3>Fixed size (w-50 h-40)</h3>
40
+ <span class="poster w-50 h-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
41
+ <span class="poster w-50 h-50"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
42
+ </div>
43
+ </div>
44
+
45
+ <h2 id="placeholder">Placeholder (no image)</h2>
46
+ <div class="section">
47
+ <div>
48
+ <h3>Empty poster</h3>
49
+ <span class="poster w-40"></span>
50
+ <span class="poster w-50"></span>
51
+ </div>
52
+ <div>
53
+ <h3>Empty src</h3>
54
+ <span class="poster w-40"><img src="" /></span>
55
+ </div>
56
+ <div>
57
+ <h3>No src attribute</h3>
58
+ <span class="poster w-40"><img /></span>
59
+ </div>
60
+ </div>
61
+
62
+ <h2 id="shapes">Shapes</h2>
63
+ <div class="section">
64
+ <div>
65
+ <h3>poster-rounded</h3>
66
+ <span class="poster poster-rounded w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
67
+ <span class="poster poster-rounded w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
68
+ </div>
69
+ <div>
70
+ <h3>poster-square</h3>
71
+ <span class="poster poster-square w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
72
+ </div>
73
+ <div>
74
+ <h3>poster-pill</h3>
75
+ <span class="poster poster-pill w-40 aspect-1/1"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
76
+ </div>
77
+ <div>
78
+ <h3>poster-fluid</h3>
79
+ <span class="poster poster-fluid poster-30"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
80
+ <span class="poster poster-fluid poster-60"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
81
+ </div>
82
+ <div>
83
+ <h3>poster-scoop</h3>
84
+ <span class="poster poster-scoop poster-30"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
85
+ <span class="poster poster-scoop poster-50"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
86
+ </div>
87
+ <div>
88
+ <h3>poster-beveled</h3>
89
+ <span class="poster poster-beveled poster-30"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
90
+ <span class="poster poster-beveled poster-50"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
91
+ </div>
92
+ </div>
93
+
94
+ <h2 id="aspect-ratio">Aspect ratio utilities</h2>
95
+ <div class="section">
96
+ <div>
97
+ <h3>poster-1x1 (1:1)</h3>
98
+ <span class="poster poster-1x1 w-30"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
99
+ </div>
100
+ <div>
101
+ <h3>poster-4x3 (4:3 default)</h3>
102
+ <span class="poster poster-4x3 w-50"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
103
+ </div>
104
+ <div>
105
+ <h3>poster-3x4 (3:4)</h3>
106
+ <span class="poster poster-3x4 w-30"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
107
+ </div>
108
+ <div>
109
+ <h3>poster-16x9 (16:9)</h3>
110
+ <span class="poster poster-16x9 w-60"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
111
+ </div>
112
+ <div>
113
+ <h3>poster-9x16 (9:16)</h3>
114
+ <span class="poster poster-9x16 w-20"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
115
+ </div>
116
+ <div>
117
+ <h3>poster-21x9 (21:9)</h3>
118
+ <span class="poster poster-21x9 w-70"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
119
+ </div>
120
+ <div>
121
+ <h3>poster-3x1 (3:1 banner)</h3>
122
+ <span class="poster poster-3x1 w-70"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
123
+ </div>
124
+ <div>
125
+ <h3>poster-2x1 (2:1), poster-1x2 (1:2)</h3>
126
+ <span class="poster poster-2x1 w-50"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
127
+ <span class="poster poster-1x2 w-20"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
128
+ </div>
129
+ <div>
130
+ <h3>poster-3x2 (3:2), poster-2x3 (2:3)</h3>
131
+ <span class="poster poster-3x2 w-50"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
132
+ <span class="poster poster-2x3 w-30"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
133
+ </div>
134
+ <div>
135
+ <h3>poster-4x5 (4:5), poster-5x4 (5:4)</h3>
136
+ <span class="poster poster-4x5 w-30"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
137
+ <span class="poster poster-5x4 w-50"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
138
+ </div>
139
+ <div>
140
+ <h3>poster-7x5 (7:5), poster-5x7 (5:7)</h3>
141
+ <span class="poster poster-7x5 w-50"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
142
+ <span class="poster poster-5x7 w-30"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
143
+ </div>
144
+ <div>
145
+ <h3>poster-9x21 (9:21), poster-1x3 (1:3)</h3>
146
+ <span class="poster poster-9x21 w-20"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
147
+ <span class="poster poster-1x3 w-20"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
148
+ </div>
149
+ </div>
150
+
151
+ <h2 id="dynamic-size">Dynamic size (poster-*)</h2>
152
+ <div class="section">
153
+ <div>
154
+ <h3>poster-10 (40px)</h3>
155
+ <span class="poster poster-10"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
156
+ <span class="poster poster-[40px]"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
157
+ </div>
158
+ <div>
159
+ <h3>poster-20 (80px)</h3>
160
+ <span class="poster poster-20"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
161
+ </div>
162
+ <div>
163
+ <h3>poster-30 (120px)</h3>
164
+ <span class="poster poster-30"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
165
+ </div>
166
+ <div>
167
+ <h3>poster-40 (160px)</h3>
168
+ <span class="poster poster-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
169
+ </div>
170
+ <div>
171
+ <h3>poster-50 (200px)</h3>
172
+ <span class="poster poster-50"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
173
+ </div>
174
+ <div>
175
+ <h3>poster-60 (240px)</h3>
176
+ <span class="poster poster-60"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
177
+ </div>
178
+ <div>
179
+ <h3>poster-80 (320px)</h3>
180
+ <span class="poster poster-80"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
181
+ </div>
182
+ </div>
183
+
184
+ <h2 id="layout">Layout</h2>
185
+ <div class="section">
186
+ <div>
187
+ <h3>poster-full (100% width)</h3>
188
+ <span class="poster poster-full poster-16x9"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
189
+ </div>
190
+ <div>
191
+ <h3>poster-flush (fill parent)</h3>
192
+ <div style="width: 200px; height: 150px; border-radius: 12px; overflow: hidden; border: 2px solid #ddd;">
193
+ <span class="poster poster-flush"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
194
+ </div>
195
+ <div style="width: 200px; height: 150px; border-radius: 12px; overflow: hidden; border: 2px solid #ddd;">
196
+ <span class="poster poster-flush"></span>
197
+ </div>
198
+ </div>
199
+ </div>
200
+
201
+ <h2 id="hover-zoom">Hover effects — Zoom</h2>
202
+ <div class="section">
203
+ <div>
204
+ <h3>poster-zoom-in</h3>
205
+ <span class="poster poster-zoom-in w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
206
+ </div>
207
+ <div>
208
+ <h3>poster-zoom-out (initially zoomed)</h3>
209
+ <span class="poster poster-zoom-out w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
210
+ </div>
211
+ </div>
212
+
213
+ <h2 id="hover-pan">Hover effects — Pan</h2>
214
+ <div class="section">
215
+ <div>
216
+ <h3>poster-pan-start (left)</h3>
217
+ <span class="poster poster-pan-start w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
218
+ <span class="poster poster-pan-start w-40" style="background-image: url(https://unpkg.com/@codady/resource/image/earth04_sm.jpg);"></span>
219
+ </div>
220
+ <div>
221
+ <h3>poster-pan-end (right)</h3>
222
+ <span class="poster poster-pan-end w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
223
+ </div>
224
+ <div>
225
+ <h3>poster-pan-top (up)</h3>
226
+ <span class="poster poster-pan-top w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
227
+ </div>
228
+ <div>
229
+ <h3>poster-pan-bottom (down)</h3>
230
+ <span class="poster poster-pan-bottom w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
231
+ </div>
232
+ </div>
233
+
234
+ <h2 id="hover-grayscale">Hover effects — Grayscale</h2>
235
+ <div class="section">
236
+ <div>
237
+ <h3>poster-gray-in (turn gray on hover)</h3>
238
+ <span class="poster poster-gray-in w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
239
+ </div>
240
+ <div>
241
+ <h3>poster-gray-out (initially gray)</h3>
242
+ <span class="poster poster-gray-out w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
243
+ </div>
244
+ </div>
245
+
246
+ <h2 id="hover-brightness">Hover effects — Brightness</h2>
247
+ <div class="section">
248
+ <div>
249
+ <h3>poster-bright-in (brighten on hover)</h3>
250
+ <span class="poster poster-bright-in w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
251
+ </div>
252
+ <div>
253
+ <h3>poster-bright-out (dim on hover)</h3>
254
+ <span class="poster poster-bright-out w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
255
+ </div>
256
+ </div>
257
+
258
+ <h2 id="hover-blur">Hover effects — Blur</h2>
259
+ <div class="section">
260
+ <div>
261
+ <h3>poster-blur-in (blur on hover)</h3>
262
+ <span class="poster poster-blur-in w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
263
+ </div>
264
+ <div>
265
+ <h3>poster-blur-out (initially blurred)</h3>
266
+ <span class="poster poster-blur-out w-40"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
267
+ </div>
268
+ </div>
269
+
270
+ <h2 id="hover-overlay">Hover effects — Overlay</h2>
271
+ <div class="section">
272
+ <div>
273
+ <h3>poster-dark-in (dark overlay on hover)</h3>
274
+ <span class="poster poster-dark-in w-40" data-content="Overlay text"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
275
+ </div>
276
+ <div>
277
+ <h3>poster-dark-out (initially dark overlay)</h3>
278
+ <span class="poster poster-dark-out w-40" data-content="Overlay text"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
279
+ </div>
280
+ <div>
281
+ <h3>poster-light-in (light overlay on hover)</h3>
282
+ <span class="poster poster-light-in w-40" data-content-hover="Hover text"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
283
+ </div>
284
+ <div>
285
+ <h3>poster-light-out (initially light overlay)</h3>
286
+ <span class="poster poster-light-out w-40" data-content="Overlay text"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
287
+ </div>
288
+ </div>
289
+
290
+ <h2 id="caption">Caption</h2>
291
+ <div class="section">
292
+ <div>
293
+ <h3>poster-caption (bottom, hidden)</h3>
294
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /><div class="poster-caption poster-caption-hidden">Caption</div></span>
295
+ </div>
296
+ <div>
297
+ <h3>poster-caption-top (top, hidden)</h3>
298
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /><div class="poster-caption-top poster-caption-hidden">Caption</div></span>
299
+ </div>
300
+ <div>
301
+ <h3>poster-caption-center (center, hidden)</h3>
302
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /><div class="poster-caption-center poster-caption-hidden">Caption</div></span>
303
+ </div>
304
+ <div>
305
+ <h3>Center icons + bottom caption</h3>
306
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /><div class="poster-caption-center poster-caption-hidden"><p><a href="###" class="icon icon-check"></a><a href="###" class="icon icon-plus"></a><a href="###" class="icon icon-close"></a></p></div><div class="poster-caption poster-caption-hidden">Caption</div></span>
307
+ </div>
308
+ </div>
309
+
310
+ <h2 id="marker">Marker</h2>
311
+ <div class="section">
312
+ <div>
313
+ <h3>poster-marker (top-start, icon)</h3>
314
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /><div class="poster-marker"><a href="###" class="icon icon-check"></a></div></span>
315
+ </div>
316
+ <div>
317
+ <h3>poster-marker (badge)</h3>
318
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /><div class="poster-marker"><span class="badge badge-glassy">Error</span><span class="badge badge-success badge-glassy">OK</span></div></span>
319
+ </div>
320
+ <div>
321
+ <h3>poster-marker-end-top</h3>
322
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /><div class="poster-marker-end-top"><a href="###" class="icon icon-check-circle-fill"></a></div></span>
323
+ </div>
324
+ <div>
325
+ <h3>poster-marker-start-bottom</h3>
326
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /><div class="poster-marker-start-bottom"><a href="###" class="icon icon-check-circle-fill"></a></div></span>
327
+ </div>
328
+ <div>
329
+ <h3>poster-marker-end-bottom</h3>
330
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /><div class="poster-marker-end-bottom"><a href="###" class="icon icon-check-circle-fill"></a></div></span>
331
+ </div>
332
+ <div>
333
+ <h3>poster-marker-center</h3>
334
+ <span class="poster w-40"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /><div class="poster-marker-center"><a href="###" class="icon icon-check-circle-fill"></a></div></span>
335
+ </div>
336
+ </div>
337
+
338
+ <h2 id="size-ratio-combinations">Size + ratio combinations</h2>
339
+ <div class="section">
340
+ <div>
341
+ <h3>poster-30 + poster-16x9</h3>
342
+ <span class="poster poster-30 poster-16x9"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
343
+ </div>
344
+ <div>
345
+ <h3>poster-40 + poster-1x1 + poster-pill</h3>
346
+ <span class="poster poster-40 poster-1x1 poster-pill"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
347
+ </div>
348
+ <div>
349
+ <h3>poster-30 + poster-16x9 + poster-rounded</h3>
350
+ <span class="poster poster-30 poster-16x9 poster-rounded"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
351
+ </div>
352
+ </div>
353
+
354
+ <h2 id="use-cases">Use cases</h2>
355
+ <div class="section">
356
+ <div>
357
+ <h3>Card preview</h3>
358
+ <div style="display: inline-block; width: 240px; border: 1px solid #eee; border-radius: 12px; overflow: hidden;">
359
+ <span class="poster poster-square w-full aspect-16/9"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
360
+ <div style="padding: 12px;"><h3 style="margin: 0 0 4px;">Title</h3><p style="margin: 0; font-size: 0.8rem; color: #888;">Description text here.</p></div>
361
+ </div>
362
+ </div>
363
+ <div>
364
+ <h3>Product image (1:1)</h3>
365
+ <div style="display: inline-block; width: 180px; border: 1px solid #eee; border-radius: 12px; overflow: hidden; text-align: center;">
366
+ <span class="poster poster-square w-full aspect-1/1"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
367
+ <div style="padding: 8px;"><p style="margin: 0; font-weight: 600;">Product</p><p style="margin: 4px 0 0; color: #e74c3c;">$99.00</p></div>
368
+ </div>
369
+ </div>
370
+ <div>
371
+ <h3>Avatar (circle + 1:1)</h3>
372
+ <span class="poster poster-pill w-30 aspect-1/1"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
373
+ <span class="poster poster-pill w-40 aspect-1/1"><img src="https://unpkg.com/@codady/resource/image/avatar07.jpg" /></span>
374
+ </div>
375
+ <div>
376
+ <h3>Banner (rounded + 4:1)</h3>
377
+ <span class="poster poster-rounded w-full aspect-4/1"><img src="https://unpkg.com/@codady/resource/image/earth04_sm.jpg" /></span>
378
+ </div>
379
+ </div>
380
+
381
+ <script src="./demo-utils.js"></script>
382
+ </body>
383
+
384
+ </html>