santycss 2.0.1 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +32 -13
- package/dist/santy-animations.css +179 -1
- package/dist/santy-core.css +33 -4569
- package/dist/santy-scroll.js +45 -0
- package/dist/santy-start.css +9817 -0
- package/dist/santy-variants.css +4579 -0
- package/dist/santy.css +244 -1
- package/dist/santy.min.css +1 -1
- package/package.json +5 -2
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/santycss)
|
|
4
4
|
[](https://www.npmjs.com/package/santycss)
|
|
5
5
|
[](https://github.com/ChintuSanty/santyCSS/blob/main/LICENSE)
|
|
6
|
-
[](https://www.npmjs.com/package/santycss)
|
|
7
7
|
|
|
8
8
|
**Plain-English utility-first CSS framework.**
|
|
9
9
|
Class names read like sentences. No build step. No configuration. Just link and use.
|
|
@@ -431,18 +431,35 @@ Use SantyCSS on **[Webflow](https://webflow.com/)** without a build step: add th
|
|
|
431
431
|
npm install santycss
|
|
432
432
|
```
|
|
433
433
|
|
|
434
|
-
**CDN (
|
|
434
|
+
**CDN — drop in and go (recommended for beginners):**
|
|
435
435
|
```html
|
|
436
|
-
|
|
436
|
+
<!-- Base utilities + components, no extended variants/animations -->
|
|
437
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/santycss/dist/santy-start.css">
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
**CDN — full responsive coverage:**
|
|
441
|
+
```html
|
|
442
|
+
<!-- Core utilities (slimmed) -->
|
|
443
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/santycss/dist/santy-core.css">
|
|
444
|
+
<!-- xl:, xxl:, on-wide:, peer-*, group-*, print:, motion-*, RTL -->
|
|
445
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/santycss/dist/santy-variants.css">
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
**CDN — PostCSS/Vite purge workflow (teams):**
|
|
449
|
+
```html
|
|
450
|
+
<!-- Full bundle — purge down to ~15KB with PostCSS/Vite -->
|
|
451
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/santycss/dist/santy.min.css">
|
|
437
452
|
```
|
|
438
453
|
|
|
439
454
|
**Import in JS/TS (React, Vue, Next, Nuxt, Vite):**
|
|
440
455
|
```js
|
|
441
|
-
import 'santycss/css';
|
|
442
|
-
import 'santycss/css/core';
|
|
443
|
-
import 'santycss/css/
|
|
444
|
-
import 'santycss/css
|
|
445
|
-
import 'santycss/css/
|
|
456
|
+
import 'santycss/css/start'; // drop-in: base utilities + components
|
|
457
|
+
import 'santycss/css/core'; // utilities only (slimmed, no extended variants)
|
|
458
|
+
import 'santycss/css/variants'; // xl:, peer-*, group-*, print:, motion-*, RTL
|
|
459
|
+
import 'santycss/css'; // full bundle
|
|
460
|
+
import 'santycss/css/components'; // component shortcuts
|
|
461
|
+
import 'santycss/css/animations'; // animations only
|
|
462
|
+
import 'santycss/css/email'; // email-safe CSS
|
|
446
463
|
```
|
|
447
464
|
|
|
448
465
|
**PostCSS:**
|
|
@@ -607,11 +624,13 @@ For new projects, the **Component Variant System** (`make-button style-*`) is re
|
|
|
607
624
|
|
|
608
625
|
| File | Size | Contents |
|
|
609
626
|
|---|---|---|
|
|
610
|
-
| `dist/santy.css` |
|
|
611
|
-
| `dist/santy.
|
|
612
|
-
| `dist/santy-
|
|
613
|
-
| `dist/santy-components.css` |
|
|
614
|
-
| `dist/santy-animations.css` |
|
|
627
|
+
| `dist/santy-start.css` | 527KB | **CDN drop-in** — base utilities + components, no extended variants/animations |
|
|
628
|
+
| `dist/santy-core.css` | 310KB | Utilities only — base + on-mobile/tablet/desktop/md + hover/focus |
|
|
629
|
+
| `dist/santy-variants.css` | 287KB | Extended — xl:, xxl:, on-wide:, peer-*, group-*, print:, motion-*, RTL |
|
|
630
|
+
| `dist/santy-components.css` | 217KB | Component shortcuts only |
|
|
631
|
+
| `dist/santy-animations.css` | 53KB | 120+ animations only |
|
|
632
|
+
| `dist/santy.css` | 868KB | Everything — full unminified bundle |
|
|
633
|
+
| `dist/santy.min.css` | 758KB | Minified full bundle (purge with PostCSS/Vite → ~15KB) |
|
|
615
634
|
| `dist/santy-email.css` | 13KB | Email-safe CSS for HTML email |
|
|
616
635
|
|
|
617
636
|
---
|
|
@@ -826,4 +826,182 @@
|
|
|
826
826
|
}
|
|
827
827
|
});
|
|
828
828
|
}, { threshold: 0.15 }).observe(...document.querySelectorAll('[class*="animate-on-scroll"],[class*="scroll-reveal"]'));
|
|
829
|
-
</script> */
|
|
829
|
+
</script> */
|
|
830
|
+
|
|
831
|
+
|
|
832
|
+
/* ═════════════════════════════════════════════════════════════════════════
|
|
833
|
+
SCROLL ANIMATIONS
|
|
834
|
+
Family 1: when-visible: — one-shot viewport-entry (+ santy-scroll.js)
|
|
835
|
+
Family 2: on-scroll: — scroll-progress (animation-timeline: scroll())
|
|
836
|
+
Family 3: scroll-{prop} — scroll-linked property utilities
|
|
837
|
+
Stagger: stagger-children / stagger-{n}
|
|
838
|
+
═════════════════════════════════════════════════════════════════════════ */
|
|
839
|
+
|
|
840
|
+
/* ── Keyframes for when-visible: ── */
|
|
841
|
+
@keyframes wv-fade-in { from{opacity:0} to{opacity:1} }
|
|
842
|
+
@keyframes wv-slide-up { from{transform:translateY(24px);opacity:0} to{transform:translateY(0);opacity:1} }
|
|
843
|
+
@keyframes wv-slide-in-left { from{transform:translateX(-32px);opacity:0} to{transform:translateX(0);opacity:1} }
|
|
844
|
+
@keyframes wv-slide-in-right { from{transform:translateX(32px);opacity:0} to{transform:translateX(0);opacity:1} }
|
|
845
|
+
@keyframes wv-slide-in-bottom { from{transform:translateY(32px);opacity:0} to{transform:translateY(0);opacity:1} }
|
|
846
|
+
@keyframes wv-zoom-in { from{transform:scale(0.85);opacity:0} to{transform:scale(1);opacity:1} }
|
|
847
|
+
@keyframes wv-zoom-in-up { from{transform:scale(0.8) translateY(20px);opacity:0} to{transform:scale(1) translateY(0);opacity:1} }
|
|
848
|
+
@keyframes wv-zoom-bounce { from{transform:scale(0.7);opacity:0} to{transform:scale(1);opacity:1} }
|
|
849
|
+
@keyframes wv-bounce-in-bottom {
|
|
850
|
+
0% {transform:translateY(40px);opacity:0}
|
|
851
|
+
60% {transform:translateY(-8px);opacity:1}
|
|
852
|
+
80% {transform:translateY(4px)}
|
|
853
|
+
100%{transform:translateY(0)}
|
|
854
|
+
}
|
|
855
|
+
@keyframes wv-flip-in {
|
|
856
|
+
from{transform:perspective(600px) rotateX(-80deg);opacity:0}
|
|
857
|
+
to {transform:perspective(600px) rotateX(0);opacity:1}
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
|
|
861
|
+
/* ── when-visible: — viewport-entry animations ── */
|
|
862
|
+
/* Requires santy-scroll.js observer. Classes activate via .is-visible. */
|
|
863
|
+
.when-visible\:animate-fade-in { animation:none; animation-fill-mode:both; }
|
|
864
|
+
.when-visible\:animate-fade-in.is-visible { animation-name:wv-fade-in; animation-duration:0.6s; animation-timing-function:ease-out; }
|
|
865
|
+
.when-visible\:animate-slide-up { animation:none; animation-fill-mode:both; }
|
|
866
|
+
.when-visible\:animate-slide-up.is-visible { animation-name:wv-slide-up; animation-duration:0.5s; animation-timing-function:ease-out; }
|
|
867
|
+
.when-visible\:animate-slide-in-from-left { animation:none; animation-fill-mode:both; }
|
|
868
|
+
.when-visible\:animate-slide-in-from-left.is-visible { animation-name:wv-slide-in-left; animation-duration:0.5s; animation-timing-function:ease-out; }
|
|
869
|
+
.when-visible\:animate-slide-in-from-right { animation:none; animation-fill-mode:both; }
|
|
870
|
+
.when-visible\:animate-slide-in-from-right.is-visible { animation-name:wv-slide-in-right; animation-duration:0.5s; animation-timing-function:ease-out; }
|
|
871
|
+
.when-visible\:animate-slide-in-from-bottom { animation:none; animation-fill-mode:both; }
|
|
872
|
+
.when-visible\:animate-slide-in-from-bottom.is-visible { animation-name:wv-slide-in-bottom; animation-duration:0.5s; animation-timing-function:ease-out; }
|
|
873
|
+
.when-visible\:animate-zoom-in { animation:none; animation-fill-mode:both; }
|
|
874
|
+
.when-visible\:animate-zoom-in.is-visible { animation-name:wv-zoom-in; animation-duration:0.5s; animation-timing-function:ease-out; }
|
|
875
|
+
.when-visible\:animate-zoom-in-up { animation:none; animation-fill-mode:both; }
|
|
876
|
+
.when-visible\:animate-zoom-in-up.is-visible { animation-name:wv-zoom-in-up; animation-duration:0.5s; animation-timing-function:ease-out; }
|
|
877
|
+
.when-visible\:animate-zoom-bounce { animation:none; animation-fill-mode:both; }
|
|
878
|
+
.when-visible\:animate-zoom-bounce.is-visible { animation-name:wv-zoom-bounce; animation-duration:0.5s; animation-timing-function:cubic-bezier(0.34,1.56,0.64,1); }
|
|
879
|
+
.when-visible\:animate-bounce-in-from-bottom { animation:none; animation-fill-mode:both; }
|
|
880
|
+
.when-visible\:animate-bounce-in-from-bottom.is-visible { animation-name:wv-bounce-in-bottom; animation-duration:0.7s; animation-timing-function:ease-out; }
|
|
881
|
+
.when-visible\:animate-flip-in { animation:none; animation-fill-mode:both; }
|
|
882
|
+
.when-visible\:animate-flip-in.is-visible { animation-name:wv-flip-in; animation-duration:0.6s; animation-timing-function:ease-out; }
|
|
883
|
+
.when-visible\:animate-bounce { animation:none; animation-fill-mode:both; }
|
|
884
|
+
.when-visible\:animate-bounce.is-visible { animation-name:santy-bounce; animation-duration:1s; animation-timing-function:ease; }
|
|
885
|
+
.when-visible\:animate-pulse { animation:none; animation-fill-mode:both; }
|
|
886
|
+
.when-visible\:animate-pulse.is-visible { animation-name:santy-pulse; animation-duration:2s; animation-timing-function:cubic-bezier(0.4,0,0.6,1); }
|
|
887
|
+
|
|
888
|
+
/* ── enter-at-{n} — how much of element must be visible before triggering ── */
|
|
889
|
+
.enter-at-15 { --santy-enter-threshold:0.15; }
|
|
890
|
+
.enter-at-25 { --santy-enter-threshold:0.25; }
|
|
891
|
+
.enter-at-50 { --santy-enter-threshold:0.5; }
|
|
892
|
+
.enter-at-75 { --santy-enter-threshold:0.75; }
|
|
893
|
+
.enter-repeat { --santy-enter-repeat:1; }
|
|
894
|
+
|
|
895
|
+
/* ── on-scroll: — animations linked to scroll position ── */
|
|
896
|
+
@keyframes os-width-full { from{width:0%} to{width:100%} }
|
|
897
|
+
@keyframes os-rotate-180 { from{transform:rotate(0)} to{transform:rotate(180deg)} }
|
|
898
|
+
@keyframes os-rotate-360 { from{transform:rotate(0)} to{transform:rotate(360deg)} }
|
|
899
|
+
@keyframes os-fade-in { from{opacity:0} to{opacity:1} }
|
|
900
|
+
@keyframes os-fade-out { from{opacity:1} to{opacity:0} }
|
|
901
|
+
@keyframes os-scale-up { from{transform:scale(0.8)} to{transform:scale(1)} }
|
|
902
|
+
@keyframes os-slide-down { from{transform:translateY(-20px);opacity:0} to{transform:translateY(0);opacity:1} }
|
|
903
|
+
@keyframes os-translate-y-half { from{transform:translateY(0)} to{transform:translateY(-50%)} }
|
|
904
|
+
|
|
905
|
+
.on-scroll\:animate-width-full { animation:os-width-full linear; animation-timeline:scroll(); animation-fill-mode:both; }
|
|
906
|
+
.on-scroll\:rotate-180 { animation:os-rotate-180 linear; animation-timeline:scroll(); animation-fill-mode:both; }
|
|
907
|
+
.on-scroll\:rotate-360 { animation:os-rotate-360 linear; animation-timeline:scroll(); animation-fill-mode:both; }
|
|
908
|
+
.on-scroll\:fade-in { animation:os-fade-in linear; animation-timeline:scroll(); animation-fill-mode:both; }
|
|
909
|
+
.on-scroll\:fade-out { animation:os-fade-out linear; animation-timeline:scroll(); animation-fill-mode:both; }
|
|
910
|
+
.on-scroll\:scale-up { animation:os-scale-up linear; animation-timeline:scroll(); animation-fill-mode:both; }
|
|
911
|
+
.on-scroll\:slide-down { animation:os-slide-down linear; animation-timeline:scroll(); animation-fill-mode:both; }
|
|
912
|
+
.on-scroll\:translate-y-half { animation:os-translate-y-half linear; animation-timeline:scroll(); animation-fill-mode:both; }
|
|
913
|
+
|
|
914
|
+
/* ── scroll-{prop} — scroll-linked CSS property utilities ── */
|
|
915
|
+
@keyframes scroll-grow-width { from{width:0} to{width:100%} }
|
|
916
|
+
@keyframes scroll-opacity-out { from{opacity:1} to{opacity:0} }
|
|
917
|
+
@keyframes scroll-scale-down { from{transform:scale(1)} to{transform:scale(0.8)} }
|
|
918
|
+
@keyframes scroll-parallax-slow { from{transform:translateY(0)} to{transform:translateY(-30%)} }
|
|
919
|
+
@keyframes scroll-parallax-fast { from{transform:translateY(0)} to{transform:translateY(-60%)} }
|
|
920
|
+
|
|
921
|
+
.scroll-width { animation:scroll-grow-width linear both; animation-timeline:scroll(root); }
|
|
922
|
+
.scroll-opacity-out { animation:scroll-opacity-out linear both; animation-timeline:scroll(root); }
|
|
923
|
+
.scroll-scale-down { animation:scroll-scale-down linear both; animation-timeline:scroll(root); }
|
|
924
|
+
.scroll-parallax-slow { animation:scroll-parallax-slow linear both; animation-timeline:scroll(nearest); }
|
|
925
|
+
.scroll-parallax-fast { animation:scroll-parallax-fast linear both; animation-timeline:scroll(nearest); }
|
|
926
|
+
|
|
927
|
+
|
|
928
|
+
/* ── stagger-children — auto-delay nth-child for list animations ── */
|
|
929
|
+
.stagger-children > *:nth-child(1) { animation-delay:0ms; }
|
|
930
|
+
.stagger-children > *:nth-child(2) { animation-delay:100ms; }
|
|
931
|
+
.stagger-children > *:nth-child(3) { animation-delay:200ms; }
|
|
932
|
+
.stagger-children > *:nth-child(4) { animation-delay:300ms; }
|
|
933
|
+
.stagger-children > *:nth-child(5) { animation-delay:400ms; }
|
|
934
|
+
.stagger-children > *:nth-child(6) { animation-delay:500ms; }
|
|
935
|
+
.stagger-children > *:nth-child(7) { animation-delay:600ms; }
|
|
936
|
+
.stagger-children > *:nth-child(8) { animation-delay:700ms; }
|
|
937
|
+
.stagger-children > *:nth-child(9) { animation-delay:800ms; }
|
|
938
|
+
.stagger-children > *:nth-child(10) { animation-delay:900ms; }
|
|
939
|
+
.stagger-children > *:nth-child(11) { animation-delay:1000ms; }
|
|
940
|
+
.stagger-children > *:nth-child(12) { animation-delay:1100ms; }
|
|
941
|
+
|
|
942
|
+
/* stagger-50 */
|
|
943
|
+
.stagger-50 > *:nth-child(1) { animation-delay:0ms; }
|
|
944
|
+
.stagger-50 > *:nth-child(2) { animation-delay:50ms; }
|
|
945
|
+
.stagger-50 > *:nth-child(3) { animation-delay:100ms; }
|
|
946
|
+
.stagger-50 > *:nth-child(4) { animation-delay:150ms; }
|
|
947
|
+
.stagger-50 > *:nth-child(5) { animation-delay:200ms; }
|
|
948
|
+
.stagger-50 > *:nth-child(6) { animation-delay:250ms; }
|
|
949
|
+
.stagger-50 > *:nth-child(7) { animation-delay:300ms; }
|
|
950
|
+
.stagger-50 > *:nth-child(8) { animation-delay:350ms; }
|
|
951
|
+
.stagger-50 > *:nth-child(9) { animation-delay:400ms; }
|
|
952
|
+
.stagger-50 > *:nth-child(10) { animation-delay:450ms; }
|
|
953
|
+
.stagger-50 > *:nth-child(11) { animation-delay:500ms; }
|
|
954
|
+
.stagger-50 > *:nth-child(12) { animation-delay:550ms; }
|
|
955
|
+
|
|
956
|
+
/* stagger-150 */
|
|
957
|
+
.stagger-150 > *:nth-child(1) { animation-delay:0ms; }
|
|
958
|
+
.stagger-150 > *:nth-child(2) { animation-delay:150ms; }
|
|
959
|
+
.stagger-150 > *:nth-child(3) { animation-delay:300ms; }
|
|
960
|
+
.stagger-150 > *:nth-child(4) { animation-delay:450ms; }
|
|
961
|
+
.stagger-150 > *:nth-child(5) { animation-delay:600ms; }
|
|
962
|
+
.stagger-150 > *:nth-child(6) { animation-delay:750ms; }
|
|
963
|
+
.stagger-150 > *:nth-child(7) { animation-delay:900ms; }
|
|
964
|
+
.stagger-150 > *:nth-child(8) { animation-delay:1050ms; }
|
|
965
|
+
.stagger-150 > *:nth-child(9) { animation-delay:1200ms; }
|
|
966
|
+
.stagger-150 > *:nth-child(10) { animation-delay:1350ms; }
|
|
967
|
+
.stagger-150 > *:nth-child(11) { animation-delay:1500ms; }
|
|
968
|
+
.stagger-150 > *:nth-child(12) { animation-delay:1650ms; }
|
|
969
|
+
|
|
970
|
+
/* stagger-200 */
|
|
971
|
+
.stagger-200 > *:nth-child(1) { animation-delay:0ms; }
|
|
972
|
+
.stagger-200 > *:nth-child(2) { animation-delay:200ms; }
|
|
973
|
+
.stagger-200 > *:nth-child(3) { animation-delay:400ms; }
|
|
974
|
+
.stagger-200 > *:nth-child(4) { animation-delay:600ms; }
|
|
975
|
+
.stagger-200 > *:nth-child(5) { animation-delay:800ms; }
|
|
976
|
+
.stagger-200 > *:nth-child(6) { animation-delay:1000ms; }
|
|
977
|
+
.stagger-200 > *:nth-child(7) { animation-delay:1200ms; }
|
|
978
|
+
.stagger-200 > *:nth-child(8) { animation-delay:1400ms; }
|
|
979
|
+
.stagger-200 > *:nth-child(9) { animation-delay:1600ms; }
|
|
980
|
+
.stagger-200 > *:nth-child(10) { animation-delay:1800ms; }
|
|
981
|
+
.stagger-200 > *:nth-child(11) { animation-delay:2000ms; }
|
|
982
|
+
.stagger-200 > *:nth-child(12) { animation-delay:2200ms; }
|
|
983
|
+
|
|
984
|
+
/* stagger-300 */
|
|
985
|
+
.stagger-300 > *:nth-child(1) { animation-delay:0ms; }
|
|
986
|
+
.stagger-300 > *:nth-child(2) { animation-delay:300ms; }
|
|
987
|
+
.stagger-300 > *:nth-child(3) { animation-delay:600ms; }
|
|
988
|
+
.stagger-300 > *:nth-child(4) { animation-delay:900ms; }
|
|
989
|
+
.stagger-300 > *:nth-child(5) { animation-delay:1200ms; }
|
|
990
|
+
.stagger-300 > *:nth-child(6) { animation-delay:1500ms; }
|
|
991
|
+
.stagger-300 > *:nth-child(7) { animation-delay:1800ms; }
|
|
992
|
+
.stagger-300 > *:nth-child(8) { animation-delay:2100ms; }
|
|
993
|
+
.stagger-300 > *:nth-child(9) { animation-delay:2400ms; }
|
|
994
|
+
.stagger-300 > *:nth-child(10) { animation-delay:2700ms; }
|
|
995
|
+
.stagger-300 > *:nth-child(11) { animation-delay:3000ms; }
|
|
996
|
+
.stagger-300 > *:nth-child(12) { animation-delay:3300ms; }
|
|
997
|
+
|
|
998
|
+
/* ── Scroll animations — prefers-reduced-motion ── */
|
|
999
|
+
@media (prefers-reduced-motion: reduce) {
|
|
1000
|
+
[class*="when-visible:"],
|
|
1001
|
+
[class*="on-scroll:"],
|
|
1002
|
+
.scroll-width, .scroll-opacity-out, .scroll-scale-down,
|
|
1003
|
+
.scroll-parallax-slow, .scroll-parallax-fast {
|
|
1004
|
+
animation: none !important;
|
|
1005
|
+
transition: none !important;
|
|
1006
|
+
}
|
|
1007
|
+
}
|