santycss 1.1.0 → 1.3.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
@@ -1 +1,432 @@
1
- # santyCSS
1
+ # SantyCSS
2
+
3
+ [![npm version](https://img.shields.io/npm/v/santycss.svg?style=flat-square)](https://www.npmjs.com/package/santycss)
4
+ [![npm downloads](https://img.shields.io/npm/dm/santycss.svg?style=flat-square)](https://www.npmjs.com/package/santycss)
5
+ [![license](https://img.shields.io/npm/l/santycss.svg?style=flat-square)](https://github.com/ChintuSanty/santyCSS/blob/main/LICENSE)
6
+ [![bundle size](https://img.shields.io/badge/full_bundle-701KB-blue?style=flat-square)](https://www.npmjs.com/package/santycss)
7
+
8
+ **Plain-English utility-first CSS framework.**
9
+ Class names read like sentences. No build step. No configuration. Just link and use.
10
+
11
+ ```html
12
+ <div class="make-flex align-center gap-16 background-blue-500 round-corners-12 add-padding-24">
13
+ <button class="make-button style-primary size-large shape-pill on-hover:animate-bounce">
14
+ Get Started
15
+ </button>
16
+ </div>
17
+ ```
18
+
19
+ > 🌐 **[santycss.santy.in](https://santycss.santy.in)** · 📖 **[Class Reference](https://santycss.santy.in/classes.html)** · 🎬 **[Animations](https://santycss.santy.in/animations.html)** · 📦 **[npm Docs](https://santycss.santy.in/docs.html)**
20
+
21
+ ---
22
+
23
+ ## What's New in v1.3
24
+
25
+ ### 🎨 70+ SVG Icons (new: Business & Finance)
26
+
27
+ SantyCSS now ships **two icon systems** in `santy-icons.css`:
28
+
29
+ **Brand Icons** (35) — `.brand-icon` + `.brand-icon-{name}`
30
+ Social media, developer tools, platforms & payment services.
31
+
32
+ **Business & Finance Icons** (35) — `.icon` + `.icon-{name}`
33
+ 35 utility icons sourced from Font Awesome 6 Free (CC BY 4.0):
34
+
35
+ | Category | Icons |
36
+ |---|---|
37
+ | Charts | `chart-bar` · `chart-column` · `chart-line` · `chart-pie` · `chart-area` · `chart-simple` |
38
+ | Money | `dollar-sign` · `euro-sign` · `coins` · `money-bill` · `money-bill-wave` · `sack-dollar` · `percent` |
39
+ | Business | `briefcase` · `handshake` · `building` · `building-columns` · `landmark` · `store` · `hotel` |
40
+ | Documents | `file-invoice` · `file-invoice-dollar` · `receipt` · `credit-card` · `wallet` |
41
+ | Commerce | `tag` · `tags` · `cash-register` · `calculator` · `piggy-bank` · `scale-balanced` |
42
+ | Trends | `arrow-trend-up` · `arrow-trend-down` · `hand-holding-dollar` · `house` |
43
+
44
+ ```html
45
+ <!-- Include the icon stylesheet -->
46
+ <link rel="stylesheet" href="santy-icons.css">
47
+
48
+ <!-- Brand icon (social/dev) -->
49
+ <span class="brand-icon brand-icon-github"></span>
50
+ <span class="brand-icon brand-icon-react brand-icon-color-react brand-icon-xl"></span>
51
+
52
+ <!-- Business & Finance icon -->
53
+ <span class="icon icon-briefcase"></span>
54
+ <span class="icon icon-dollar-sign icon-xl" style="color:#16a34a;"></span>
55
+ <span class="icon icon-chart-line icon-32"></span>
56
+ ```
57
+
58
+ **Size modifiers** (same for both systems):
59
+ ```
60
+ .icon-xs .icon-sm .icon-md .icon-lg .icon-xl
61
+ .icon-2x .icon-3x .icon-4x .icon-5x .icon-6x
62
+ .icon-16 .icon-24 .icon-32 .icon-48 .icon-64
63
+ ```
64
+
65
+ **Animations:**
66
+ ```html
67
+ <span class="icon icon-coins icon-spin icon-xl" style="color:#f59e0b;"></span>
68
+ ```
69
+
70
+ > 🎨 **[Icon Browser](https://santycss.santy.in/icons.html)** — search, filter, and copy-click any icon
71
+
72
+ ---
73
+
74
+ ## What's New in v1.2
75
+
76
+ ### 🎬 120+ Animations (was 70+)
77
+
78
+ **Scroll-Triggered** — elements animate when they enter the viewport:
79
+ ```html
80
+ <div class="animate-on-scroll-slide-up scroll-reveal-delay-200">Reveals on scroll</div>
81
+ <!-- Add IntersectionObserver once in your JS -->
82
+ ```
83
+
84
+ **Hover-Triggered** — full animations on mouse-over, not just transforms:
85
+ ```html
86
+ <button class="make-button style-primary on-hover:animate-rubber-band">Hover me</button>
87
+ <div class="animate-text-gradient-flow set-text-32 text-bold">Gradient Flow</div>
88
+ ```
89
+
90
+ **Text Animations:**
91
+ ```html
92
+ <h1 class="animate-typewriter">Hello, World!</h1>
93
+ <h2 class="animate-text-glitch">Glitch</h2>
94
+ <p class="animate-text-neon-pulse color-blue-400">Neon Pulse</p>
95
+ ```
96
+
97
+ **Staggered Entrances** — children animate in sequence:
98
+ ```html
99
+ <ul class="animate-stagger-slide-up animate-stagger-children-100">
100
+ <li>Item 1</li> <!-- 0ms delay -->
101
+ <li>Item 2</li> <!-- 100ms delay -->
102
+ <li>Item 3</li> <!-- 200ms delay -->
103
+ </ul>
104
+ ```
105
+
106
+ **3D Animations:**
107
+ ```html
108
+ <div class="animate-flip-3d-y">Card flip</div>
109
+ <div class="animate-morph-blob" style="width:80px;height:80px;background:#6366f1;"></div>
110
+ <div class="animate-border-spin">Spinning border</div>
111
+ ```
112
+
113
+ **UI Feedback Animations** — paired with components:
114
+ ```html
115
+ <div class="animate-toast-in">Toast notification</div>
116
+ <div class="animate-modal-in">Modal dialog</div>
117
+ <div class="animate-error-shake">Form error</div>
118
+ ```
119
+
120
+ **New helper classes:**
121
+ ```
122
+ animation-ease-bounce animation-ease-elastic animation-ease-spring
123
+ animation-direction-reverse animation-direction-alternate
124
+ animation-pause-on-hover animation-delay-750 animation-delay-1500
125
+ animation-delay-2500 animation-speed-ultra-fast
126
+ ```
127
+
128
+ ---
129
+
130
+ ### 🧩 Component Variant System (`make-*`)
131
+
132
+ Replaces the old `btn btn-primary` pattern with a composable modifier system:
133
+
134
+ ```html
135
+ <!-- Old way -->
136
+ <button class="btn btn-success btn-lg">Old</button>
137
+
138
+ <!-- New way -->
139
+ <button class="make-button style-success size-large shape-pill">New</button>
140
+ <button class="make-button style-danger size-small shape-rounded">Delete</button>
141
+ <div class="make-card style-elevated">
142
+ <div class="card-body">...</div>
143
+ </div>
144
+ <span class="make-badge style-success">Active</span>
145
+ <div class="make-alert style-warning">Watch out</div>
146
+ ```
147
+
148
+ **All components:** `make-button` · `make-card` · `make-badge` · `make-alert` · `make-input` · `make-avatar` · `make-spinner` · `make-skeleton` · `make-progress` · `make-navbar` · `make-tooltip` · `make-modal` · `make-drawer` · `make-accordion` · `make-dropdown`
149
+
150
+ **Style modifiers:** `style-primary` · `style-secondary` · `style-success` · `style-danger` · `style-warning` · `style-info` · `style-outline` · `style-ghost` · `style-dark` · `style-flat` · `style-elevated` · `style-bordered`
151
+
152
+ **Size modifiers:** `size-small` · `size-large` · `size-xl` · `size-full`
153
+
154
+ **Shape modifiers:** `shape-pill` · `shape-rounded` · `shape-square`
155
+
156
+ ---
157
+
158
+ ### 🌐 20 Modern CSS Utility Groups
159
+
160
+ | Group | Classes |
161
+ |---|---|
162
+ | Container Queries | `container-query`, `cq-sm:make-flex`, `cq-md:grid-cols-3` |
163
+ | Scroll & Snap | `scroll-smooth`, `scroll-snap-x`, `scroll-snap-center`, `overscroll-contain` |
164
+ | Logical Properties | `add-padding-inline-{n}`, `ps-{n}`, `pe-{n}`, `ms-auto`, `text-start`, `text-end` |
165
+ | Fluid Typography | `text-fluid-sm` through `text-fluid-hero` (CSS `clamp()`) |
166
+ | Clip Path | `clip-circle`, `clip-hexagon`, `clip-diamond`, `clip-star`, `clip-arrow-right` |
167
+ | Gradients | `gradient-radial-from-center`, `gradient-conic`, `text-gradient-blue-to-purple` |
168
+ | Advanced Grid | `grid-auto-fit-min-200`, `masonry-cols-3`, `grid-area-header/sidebar/main/footer` |
169
+ | Advanced Typography | `text-balance`, `text-pretty`, `text-clamp-1/2/3`, `drop-cap`, `font-tabular-nums` |
170
+ | Cursor Utilities | 30 cursor types including `cursor-cell`, `cursor-copy`, `cursor-resize-ns` |
171
+ | Dynamic Viewport | `set-height-dvh`, `set-height-svh`, `set-height-lvh`, `set-min-height-dvh` |
172
+ | Color Mix / Opacity | `background-blue-500/50`, `background-white/75`, `background-mix-blue-red-50` |
173
+ | Semantic Z-index | `z-modal: 400`, `z-tooltip: 600`, `z-toast: 700`, `isolate` |
174
+ | View Transitions | `view-transition-fade`, `view-transition-slide` (View Transitions API) |
175
+ | Size Utilities | `set-size-16` through `set-size-200`, `set-size-full/screen/fit` |
176
+ | Print Utilities | `print-hidden`, `print-only`, `print-break-before`, `print-show-links` |
177
+ | Subgrid | `grid-cols-subgrid`, `span-col-subgrid-3` |
178
+ | Math / Calc | `set-width-calc-100-minus-64`, `set-height-calc-screen-minus-80`, `set-max-width-readable` |
179
+ | Pointer / Touch | `touch-none`, `touch-pan-x`, `touch-manipulation`, `will-change-transform` |
180
+ | @layer | `@layer santy-base, santy-utilities, santy-components, santy-overrides` |
181
+ | 3D Transform | `perspective-*`, `rotate-3d`, `transform-origin-*` (extended) |
182
+
183
+ ---
184
+
185
+ ### 🤖 Built for the AI Era
186
+
187
+ SantyCSS ships a **context file** (`santycss.context.md`) — paste it into Claude, GPT-4, or Cursor's system prompt and the AI generates SantyCSS instead of Tailwind, every time:
188
+
189
+ ```
190
+ Paste santycss.context.md → AI writes SantyCSS instead of Tailwind
191
+ ```
192
+
193
+ The **built-in AI Generator** converts plain English → SantyCSS classes in the browser (no API key):
194
+
195
+ > "a centered flex container with green background and white text and gap"
196
+ > → `make-flex align-center justify-center background-green-500 color-white gap-16`
197
+
198
+ ---
199
+
200
+ ## Installation
201
+
202
+ ```bash
203
+ npm install santycss
204
+ ```
205
+
206
+ **CDN (fastest — zero install):**
207
+ ```html
208
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/santycss/dist/santy.css">
209
+ ```
210
+
211
+ **Import in JS/TS (React, Vue, Next, Nuxt, Vite):**
212
+ ```js
213
+ import 'santycss/css'; // full bundle
214
+ import 'santycss/css/core'; // utilities only
215
+ import 'santycss/css/components'; // component shortcuts
216
+ import 'santycss/css/animations'; // animations only
217
+ import 'santycss/css/email'; // email-safe CSS
218
+ ```
219
+
220
+ **PostCSS:**
221
+ ```js
222
+ // postcss.config.js
223
+ module.exports = {
224
+ plugins: [require('santycss/postcss')]
225
+ };
226
+ ```
227
+
228
+ **Vite plugin:**
229
+ ```js
230
+ // vite.config.js
231
+ import santyCSS from 'santycss/vite';
232
+ export default { plugins: [santyCSS()] };
233
+ ```
234
+
235
+ ---
236
+
237
+ ## Core Naming Conventions
238
+
239
+ | Pattern | Example | Meaning |
240
+ |---|---|---|
241
+ | `add-{prop}-{n}` | `add-padding-24` | Additive — border, padding, margin, shadow |
242
+ | `make-{val}` | `make-flex`, `make-circle` | Display / behaviour |
243
+ | `set-{prop}-{val}` | `set-text-24`, `set-width-320` | Dimension / size setter |
244
+ | `pin-{side}-{n}` | `pin-top-0`, `pin-center` | Absolute / fixed positioning |
245
+ | `on-hover:{class}` | `on-hover:scale-110` | State / responsive prefix |
246
+ | `md:{class}` | `md:grid-cols-3` | Responsive breakpoint |
247
+ | `make-button style-* size-* shape-*` | `make-button style-success size-large shape-pill` | Component variant system |
248
+
249
+ ---
250
+
251
+ ## Quick Examples
252
+
253
+ **Responsive hero:**
254
+ ```html
255
+ <section class="make-flex flex-column align-center justify-center text-center add-padding-y-80 background-gray-50">
256
+ <h1 class="set-text-56 text-bold color-gray-900 add-margin-bottom-16 md:set-text-40 on-mobile:set-text-32">
257
+ Build faster
258
+ </h1>
259
+ <p class="set-text-20 color-gray-500 line-height-relaxed add-margin-bottom-32">
260
+ Plain-English CSS that reads like you wrote it.
261
+ </p>
262
+ <a href="#" class="make-button style-primary size-large shape-pill on-hover:scale-105 transition-all">
263
+ Get started →
264
+ </a>
265
+ </section>
266
+ ```
267
+
268
+ **Card with hover effect:**
269
+ ```html
270
+ <div class="make-card style-bordered add-border-left-4 border-color-blue-500 on-hover:scale-105 transition-all cursor-pointer add-padding-28 add-shadow-md round-corners-16">
271
+ <h3 class="set-text-20 text-bold color-gray-900 add-margin-bottom-8">Card Title</h3>
272
+ <p class="set-text-14 color-gray-500 line-height-relaxed">Card description.</p>
273
+ </div>
274
+ ```
275
+
276
+ **Dark-mode card grid:**
277
+ ```html
278
+ <div class="make-grid grid-cols-3 gap-24 on-mobile:grid-cols-1 md:grid-cols-2">
279
+ <div class="make-card style-elevated background-white dark:background-gray-800 round-corners-16 add-padding-24">
280
+ <span class="make-badge style-primary add-margin-bottom-12">New</span>
281
+ <h4 class="set-text-18 text-semibold color-gray-900 dark:color-white">Feature</h4>
282
+ <p class="set-text-14 color-gray-500 dark:color-gray-400 line-height-relaxed">Description.</p>
283
+ </div>
284
+ </div>
285
+ ```
286
+
287
+ **Scroll-triggered stagger:**
288
+ ```html
289
+ <div class="make-grid grid-cols-3 gap-24 animate-stagger-slide-up animate-stagger-children-200">
290
+ <div class="make-card style-bordered">Card 1</div>
291
+ <div class="make-card style-bordered">Card 2</div>
292
+ <div class="make-card style-bordered">Card 3</div>
293
+ </div>
294
+ <script>
295
+ new IntersectionObserver(entries => {
296
+ entries.forEach(e => { if(e.isIntersecting) e.target.classList.add('is-visible'); });
297
+ }, { threshold: 0.15 }).observe(
298
+ ...document.querySelectorAll('[class*="animate-on-scroll"],[class*="scroll-reveal"]')
299
+ );
300
+ </script>
301
+ ```
302
+
303
+ ---
304
+
305
+ ## Spacing & Sizing Reference
306
+
307
+ **Spacing values (n):** 0–50 every 1px · 52–200 every 4px · plus 256, 320, 384, 448, 512, 640, 768, 1024
308
+
309
+ | Category | Classes |
310
+ |---|---|
311
+ | Padding | `add-padding-{n}` · `-top-` · `-bottom-` · `-left-` · `-right-` · `-x-` · `-y-{n}` |
312
+ | Margin | `add-margin-{n}` · `-top-` · `-bottom-` · `-left-` · `-right-` · `-x-` · `-y-{n}` · `-x-auto` |
313
+ | Gap | `gap-{n}` · `gap-x-{n}` · `gap-y-{n}` |
314
+ | Width | `set-width-{n}` · `-full` · `-screen` · `-fit` |
315
+ | Height | `set-height-{n}` · `-full` · `-screen` · `-dvh` · `-svh` · `-lvh` |
316
+ | Text size | `set-text-{n}` (8–144px) |
317
+
318
+ ---
319
+
320
+ ## Colors
321
+
322
+ 20 color families × 10 shades (50–950):
323
+
324
+ `blue` `red` `green` `yellow` `purple` `pink` `orange` `gray` `indigo` `cyan` `teal` `rose` `violet` `emerald` `amber` `lime` `sky` `slate` `zinc` `neutral` `stone`
325
+
326
+ ```html
327
+ <p class="color-blue-500">Text</p>
328
+ <div class="background-emerald-100 border-color-emerald-400 add-border-2">Card</div>
329
+ ```
330
+
331
+ ---
332
+
333
+ ## Responsive Breakpoints
334
+
335
+ ```
336
+ sm:{class} 640px+
337
+ md:{class} 768px+
338
+ lg:{class} 1024px+
339
+ xl:{class} 1280px+
340
+ on-mobile:{class} max 767px
341
+ on-tablet:{class} 768–1023px
342
+ on-desktop:{class} 1024px+
343
+ ```
344
+
345
+ ---
346
+
347
+ ## CSS Design Tokens
348
+
349
+ Override to brand your entire UI with zero rebuilding:
350
+
351
+ ```css
352
+ :root {
353
+ --santy-primary: #3b82f6;
354
+ --santy-secondary: #8b5cf6;
355
+ --santy-accent: #10b981;
356
+ --santy-radius: 0.5rem;
357
+ --santy-font: 'Inter', system-ui, sans-serif;
358
+ }
359
+ ```
360
+
361
+ ---
362
+
363
+ ## Component Classes (Legacy)
364
+
365
+ The original `.btn`, `.card`, `.badge` classes still work and are fully supported:
366
+
367
+ ```html
368
+ <button class="btn btn-primary btn-lg">Button</button>
369
+ <div class="card card-body">Card</div>
370
+ <span class="badge badge-success">Active</span>
371
+ <div class="alert alert-warning">Warning</div>
372
+ ```
373
+
374
+ For new projects, the **Component Variant System** (`make-button style-*`) is recommended.
375
+
376
+ ---
377
+
378
+ ## Files in the Package
379
+
380
+ | File | Size | Contents |
381
+ |---|---|---|
382
+ | `dist/santy.css` | 723KB | Everything — utilities + components + animations |
383
+ | `dist/santy.min.css` | 615KB | Minified full bundle |
384
+ | `dist/santy-core.css` | 598KB | Utilities only (no components) |
385
+ | `dist/santy-components.css` | 52KB | Component shortcuts only |
386
+ | `dist/santy-animations.css` | 60KB | 120+ animations only |
387
+ | `dist/santy-email.css` | 13KB | Email-safe CSS for HTML email |
388
+
389
+ ---
390
+
391
+ ## Tree-shaking / Purge
392
+
393
+ Keep only the classes you use:
394
+
395
+ ```bash
396
+ npx santycss purge --input ./src --output ./dist/santy.purged.css
397
+ ```
398
+
399
+ Or in Node.js:
400
+
401
+ ```js
402
+ const { purge } = require('santycss/purge');
403
+ purge({ input: './src', output: './dist/santy.purged.css' });
404
+ ```
405
+
406
+ ---
407
+
408
+ ## LLM / AI Integration
409
+
410
+ ```
411
+ npm show santycss homepage
412
+ → https://santycss.santy.in
413
+ ```
414
+
415
+ The file `santycss.context.md` (in the GitHub repo) is a ready-made system prompt for LLMs. Paste it into your AI tool of choice and it will generate SantyCSS class names instead of Tailwind utilities.
416
+
417
+ ---
418
+
419
+ ## Links
420
+
421
+ - 🌐 Website: [santycss.santy.in](https://santycss.santy.in)
422
+ - 📖 Class Reference: [santycss.santy.in/classes.html](https://santycss.santy.in/classes.html)
423
+ - 🎬 Animations: [santycss.santy.in/animations.html](https://santycss.santy.in/animations.html)
424
+ - 🎮 Live Demo: [santycss.santy.in/demo.html](https://santycss.santy.in/demo.html)
425
+ - 📦 npm Docs: [santycss.santy.in/docs.html](https://santycss.santy.in/docs.html)
426
+ - 🐛 Issues: [github.com/ChintuSanty/santyCSS/issues](https://github.com/ChintuSanty/santyCSS/issues)
427
+
428
+ ---
429
+
430
+ ## License
431
+
432
+ MIT © [Santy](https://github.com/ChintuSanty)