-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocs.html
More file actions
1476 lines (1342 loc) · 73.4 KB
/
Copy pathdocs.html
File metadata and controls
1476 lines (1342 loc) · 73.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9KESYR7PYM"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/AMR2010M/butterfly-css@latest/butterflycss.css">
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-9KESYR7PYM');
</script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-WFG2XVDF');</script>
<!-- End Google Tag Manager -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>butterfly css documentatation </title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700;800&display=swap" rel="stylesheet">
<!-- Link to your external butterfly CSS file -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/AMR2010M/butterfly-css@latest/attributes.css">
<script src="https://cdn.jsdelivr.net/gh/AMR2010M/butterfly-css@latest/df.js"></script>
<meta name="algolia-site-verification" content="E4DD38C05719E74B" />
<style>
/* Base styles for the documentation page layout and theme */
body {
font-family: 'Inter', sans-serif;
line-height: 1.6;
margin: 0;
padding: 0;
background-color: #ffffff; /* Light cyan background for the body */
color: #263238; /* Dark grey for general text */
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
display: flex; /* Use flexbox for main layout */
min-height: 100vh; /* Ensure body takes full viewport height */
}
.container {
flex-grow: 1; /* Allow container to take available space */
max-width: 1200px;
margin: 0 auto;
padding: 20px;
}
header {
background: linear-gradient(135deg, #ff0080 0%, #ff00dd 100%); /* Blue gradient */
color: #fff;
padding: 50px 20px;
text-align: center;
border-radius: 0 0 35px 35px;
margin-bottom: 40px;
box-shadow: 0 8px 20px rgba(0,0,0,0.15);
animation: headerFadeIn 1s ease-out;
}
@keyframes headerFadeIn {
from { opacity: 0; transform: translateY(-20px); }
to { opacity: 1; transform: translateY(0); }
}
header h1 {
margin: 0;
font-size: 3.5em;
font-weight: 800; /* Extra bold */
text-shadow: 2px 2px 5px rgba(0,0,0,0.2);
}
header p {
font-size: 1.3em;
opacity: 0.95;
margin-top: 10px;
}
/* Main content area (for responsiveness) */
#main-content {
flex-grow: 1;
padding-left: 30px; /* Space for sidebar */
}
section {
background-color: #fff;
padding: 35px;
border-radius: 20px;
margin-bottom: 30px;
box-shadow: 0 6px 20px rgba(0,0,0,0.08);
border: 1px solid #e0e0e0;
transition: transform 0.3s ease-out;
}
section:hover {
transform: translateY(-5px);
}
h2 {
color: #ff006f; /* Bright blue for headings */
border-bottom: 3px solid #ff0073; /* Lighter blue border */
padding-bottom: 12px;
margin-bottom: 30px;
font-size: 2.2em;
font-weight: 700;
animation: headingSlideIn 0.8s ease-out;
}
@keyframes headingSlideIn {
from { opacity: 0; transform: translateX(-20px); }
to { opacity: 1; transform: translateX(0); }
}
h3 {
color: #f74f8f; /* Medium blue for subheadings */
margin-top: 35px;
margin-bottom: 18px;
font-size: 1.8em;
font-weight: 600;
}
code {
background-color: #e3f2fd; /* Very light blue for code snippets */
padding: 4px 8px;
border-radius: 6px;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 0.98em;
color: #ff0a8d; /* Darker blue text for inline code */
white-space: nowrap; /* Prevent inline code from wrapping */
}
pre {
background-color: #263238; /* Dark background for code blocks */
color: #e0f7fa; /* Light text for code blocks */
padding: 20px;
border-radius: 10px;
overflow-x: auto;
font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
font-size: 0.95em;
margin-bottom: 25px;
box-shadow: inset 0 0 12px rgba(0,0,0,0.3);
line-height: 1.5;
}
.attribute-list {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
gap: 25px;
margin-top: 25px;
}
.attribute-item {
background-color: #fcfcfc;
border: 1px solid #e1f5fe; /* Light blue border */
border-radius: 12px;
padding: 20px;
box-shadow: 0 3px 12px rgba(0,0,0,0.06);
transition: border-color 0.3s, box-shadow 0.3s;
}
.attribute-item:hover {
border-color: #90CAF9; /* Medium blue on hover */
box-shadow: 0 5px 18px rgba(0,0,0,0.1);
}
.attribute-item strong {
color: #ff00a6; /* Bright blue for attribute names */
font-size: 1.15em;
display: block;
margin-bottom: 10px;
}
.attribute-item p {
font-size: 1em;
margin: 0;
}
.example-box {
width: 100px;
height: 100px;
background-color: #ff0077; /* Main blue for examples */
margin: 18px auto;
display: flex;
align-items: center;
justify-content: center;
color: #000000;
font-size: 1.2em;
border-radius: 12px;
box-shadow: 0 5px 15px rgba(0,0,0,0.1);
overflow: hidden; /* For clip-path examples */
text-align: center;
line-height: 1.3;
}
.example-button {
margin: 8px;
font-size: 0.95em;
padding: 0.6em 1.5em;
border-radius: 25px;
font-weight: 600;
}
/* Sidebar styles */
.sidebar {
width: 280px;
flex-shrink: 0; /* Prevent sidebar from shrinking */
background-color: #ffffff;
padding: 25px;
box-shadow: 3px 0 15px rgba(0,0,0,0.07);
border-right: 1px solid #e3f2fd; /* Light blue border */
position: sticky; /* Sticky sidebar */
top: 0;
align-self: flex-start; /* Align to the top of the flex container */
height: 100vh; /* Make sidebar full height */
overflow-y: auto; /* Enable scrolling for long content */
border-radius: 0 20px 20px 0;
}
.sidebar h3 {
color: #ff0099; /* Bright blue for sidebar title */
margin-top: 0;
margin-bottom: 25px;
border-bottom: 2px solid #fc00b5; /* Lighter blue separator */
padding-bottom: 12px;
font-weight: 700;
}
.sidebar ul {
list-style: none;
padding: 0;
margin: 0;
}
.sidebar ul li {
margin-bottom: 12px;
}
.sidebar ul li a {
text-decoration: none;
color: #546E7A; /* Blue-grey for sidebar links */
padding: 10px 15px;
display: block;
border-radius: 10px;
transition: background-color 0.3s, color 0.3s, transform 0.2s;
font-size: 1.05em;
}
.sidebar ul li a:hover {
background-color: #ff00845b; /* Very light blue on hover */
color: #b50661; /* Darker blue text on hover */
transform: translateX(5px);
}
.sidebar ul li a.active {
background-color: #f700ff; /* Bright blue for active link */
color: #fff;
font-weight: bold;
box-shadow: 0 2px 8px rgba(0, 176, 255, 0.3);
}
/* Responsive adjustments */
@media (max-width: 900px) {
body {
flex-direction: column; /* Stack sidebar and main content vertically */
}
.sidebar {
width: 100%;
height: auto;
position: static; /* Remove sticky on smaller screens */
border-right: none;
border-bottom: 1px solid #e3f2fd;
border-radius: 0;
}
#main-content {
padding-left: 0;
}
}
header h1 {
margin: 0;
font-size: 1.5rem;
}
#container {
display: flex;
flex: 1;
overflow: hidden; /* لمنع ظهور شريط تمرير خارجي */
}
#editor-container, #preview-container {
flex: 1;
display: flex;
flex-direction: column;
border: 1px solid #ddd;
}
.label {
background: #ecf0f1;
padding: 8px 15px;
font-size: 13px;
font-weight: bold;
color: #34495e;
border-bottom: 1px solid #bdc3c7;
}
textarea {
flex: 1;
padding: 15px;
font-family: 'Consolas', 'Monaco', monospace;
font-size: 15px;
border: none;
background: #1e1e1e;
color: #d4d4d4;
resize: none;
outline: none;
line-height: 1.5;
}
iframe {
flex: 1;
border: none;
background: white;
}
/* تحسين المظهر على الشاشات الصغيرة */
@media (max-width: 768px) {
#container {
flex-direction: column;
}
}
</style>
</head>
<body dblack lwhite>
<div class="gtranslate_wrapper"></div>
<script>window.gtranslateSettings = {"default_language":"en","native_language_names":true,"detect_browser_language":true,"languages":["en","ar","fr","zh-TW","ja","ru","fy","tr"],"wrapper_selector":".gtranslate_wrapper","switcher_horizontal_position":"right","switcher_vertical_position":"top","float_switcher_open_direction":"bottom","flag_style":"3d","alt_flags":{"en":"usa","pt":"brazil","es":"colombia","fr":"quebec"}}</script>
<script src="https://cdn.gtranslate.net/widgets/latest/float.js" defer></script>
<script src='https://cdn.jotfor.ms/agent/embedjs/01994f5313d77d91922f04e77d847e564051/embed.js'>
</script>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-WFG2XVDF"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<aside class="sidebar"dblack lwhite dtwhite tlblack handdrawn>
<h3>Documentation Sections</h3>
<ul>
<button btn="rose"dark-btn hover-5 handdrawn> change mode</button>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#installation">Installation</a></li>
<li><a href="#layout-utilities">Layout Utilities</a></li>
<li><a href="#responsive">responsive box </a></li>
<li><a href="#dark">dark mode</a></li>
<li><a href="#clip-path-shapes">Clip-Path Shapes</a></li>
<li><a href="#animations">Standard Animations</a></li>
<li><a href="#ball-animations">Floating Ball Animations</a></li>
<li><a href="#special-effects">Special Effects</a></li>
<li><a href="#rotate-utilities">Rotate Utilities</a></li>
<li><a href="#components">Components</a></li>
<li><a href="#background-colors">Background Colors</a></li>
<li><a href="#text-colors">Text Colors</a></li>
</ul>
</aside>
<div id="main-content" >
<main class="container">
<section id="introduction" dblack lwhite dtwhite tlblack>
<a href="/ar" tpink>arabic version documention</a>
<h2>Introduction</h2>
<p>
butterfly css is a new way to build websites that fly out of the box! by attribute-based fast typing
</p>
<video w-70p center src="Stop_Coding,_Start_Drawing.mp4" h-400 hover-26 controls handdrawn spink b-pink></video>
<p>
This documentation provides a comprehensive guide to all available attributes, from installation to detailed descriptions and examples
you can see a demo for dark mode and birthday effect here
</p>
</section>
<section id="installation" dblack lwhite dtwhite tlblack>
<h2>Installation</h2>
<p>To use butterfly CSS, simply add tags in the <code><head></code> section of your HTML document,butterflycss.css is for base animations and features ,vf.js for height ,width,margin, padding handling&df.js for dark mode only</p>
<pre>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/AMR2010M/butterfly-css@latest/butterflycss.css">
<script src="https://cdn.jsdelivr.net/gh/AMR2010M/butterfly-css@latest/df.js"></script>
<script src="https://cdn.jsdelivr.net/gh/AMR2010M/butterfly-css@latest/vf.js"></script>
</pre>
or get it on your device:
<pre>
gh repo clone AMR2010M/butterflycss
</pre>
<p>
For example, to make any thing turn into a butterfly :
<pre>
<div butterfly='fly' ></div>
</pre>
And for a button, it would be:
<pre><button btn='purple' handdrawn>...</button></pre>
</p>
<p>
</p>
<section id="responsive" dblack lwhite dtwhite tlblack>
<h2>responisive box</h2>
<div class="attribute-list">
<div class="attribute-item">
<strong>`responsive` attribute</strong>
<p>use it for any parent to make responive flex box(note use it if the childs are div only)</p>
<pre><div responsive> </div></pre>
</div>
<p>note: as of version 4.3 butterfly css works with html and may have some problems with react </p>
</section>
<section id="animations"dblack lwhite dtwhite tlblack>
<h2>Standard Animations</h2>
<p>These attributes apply various continuous animations to elements. These are general-purpose motion effects.</p>
<div class="attribute-list">
<div class="attribute-item">
<strong>`spin` attribute</strong>
<p>Continuously rotates the element 360 degrees.</p>
<pre><div spin></div></pre>
<h1 style="font-size: 150px;" spin>🌍</h1>
</div>
<div class="attribute-item">
<strong>`bounce` attribute</strong>
<p>Makes the element bounce vertically.</p>
<pre><div bounce></div></pre>
<h1 style="font-size: 150px;"bounce columns>⚽</h1> <hr>
</div>
<div class="attribute-item">
<strong>`pulse` attribute</strong>
<p>Makes the element grow slightly and fade in/out.</p>
<pre><div pulse></div></pre>
<h1 style="font-size: 150px;" center pulse>💗</h1>
</div>
<div class="attribute-item">
<strong>`swing` attribute</strong>
<p>Makes the element wiggle from side to side.</p>
<pre><div swing></div></pre>
<h1 style="font-size: 150px;" swing center>🧹</h1>
</div>
<div class="attribute-item">
<strong>`flip` attribute</strong>
<p>Flips the element horizontally.</p>
<pre><div flip></div></pre>
<h1 style="font-size: 150px;"flip center >🃏</h1>
</div>
<div class="attribute-item">
<strong>`shake` attribute</strong>
<p>Makes the element shake horizontally.</p>
<pre><div shake></div></pre>
<h1 style="font-size: 150px;" shake center>😵💫</h1>
</div>
<div class="attribute-item">
<strong>`grow` attribute</strong>
<p>Makes the element continuously grow and shrink.</p>
<pre><div grow></div></pre>
<h1 style="font-size: 150px;" grow center>🐣</h1>
</div>
<div class="attribute-item">
<strong>`shrink` attribute</strong>
<p>Makes the element continuously shrink and grow.</p>
<pre><div shrink></div></pre>
<h1 style="font-size: 150px;" shrink center>🛰️</h1>
</div>
<div class="attribute-item">
<strong>`slide-x` attribute</strong>
<p>Slides the element horizontally left and right.</p>
<pre><div slide-x></div></pre>
<h1 style="font-size: 150px;" slide-x center>🛒</h1>
</div>
<div class="attribute-item">
<strong>`slide-y` attribute</strong>
<p>Slides the element vertically up and down.</p>
<pre><div slide-y></div></pre>
<h1 style="font-size: 150px;" slide-y center>🎈</h1>
</div>
</div>
</section>
<section id="dark"dblack lwhite dtwhite tlblack>
<h2>dark mode</h2>
<div class="attribute-list">
<div class="attribute-item">
<strong>`d{color}/lwhite such as dpurple'` attribute</strong>
<p>Sets background to `dark purple`,if 'dark-btn' swithed to dark. and light purple if light</p>
<pre><div dpurple lpurple> </div></pre>
<div class="attribute-item">
<strong>`tl{color}/dt{color}` attribute</strong>
<p>for text color in dark,light mode.</p>
<pre><p dtwhite tlblue></p>
<button dark-btn btn='black' ></button>
</pre>
</div>
<div class="attribute-item">
<strong>`tl{color}/dt{color}` attribute</strong>
<p>for text color in dark,light mode.</p>
<pre><p dtwhite tlblue></p>
<button dark-btn btn='black' ></button>
</pre>
</div>
<div class="attribute-item">
<strong>`dark mode cusimazation with js'` </strong>
<pre> document.addEventListener("darkModeApplied", (mode) => {
if (mode.detail.dark) {
console.log("Dark mode is active");
// custom dark mode logic
} else {
console.log("Light mode is active");
// custom light mode logic
}
});</pre></div>
</section>
<section id="ball-animations" dblack lwhite dtwhite tlblack>
<h2>Floating Ball Animations</h2>
<p>These attributes create glowing, animated balls that float across the element using `::before` pseudo-elements. The parent element should have `position: relative` and `overflow: hidden` for best results.</p>
<div class="attribute-list">
<div class="attribute-item">
<strong>`ball-move-1` attribute</strong>
<p>A glowing ball animation with a specific path and speed.</p>
<pre><div style="..." ball-move-1></div></pre>
<div style="position: relative; overflow: hidden; height: 150px; width: 100%; border: 1px solid #ddd; border-radius: 10px; background-color: #f0f8ff;" ball-move-1>
<!-- The ball is a pseudo-element of this div -->
<p style="text-align: center; color: #666; margin-top: 50px;">Ball 1</p>
</div>
</div>
<div class="attribute-item">
<strong>`ball-move-2` attribute</strong>
<p>Another glowing ball animation with a different path and speed.</p>
<pre><div style="..." ball-move-2></div></pre>
<div style="position: relative; overflow: hidden; height: 150px; width: 100%; border: 1px solid #ddd; border-radius: 10px; background-color: #f0f8ff;" ball-move-2>
<p style="text-align: center; color: #666; margin-top: 50px;">Ball 2</p>
</div>
</div>
<div class="attribute-item">
<strong>`ball-move-3` attribute</strong>
<p>A larger glowing ball animation.</p>
<pre><div style="..." ball-move-3></div></pre>
<div style="position: relative; overflow: hidden; height: 150px; width: 100%; border: 1px solid #ddd; border-radius: 10px; background-color: #f0f8ff;" ball-move-3>
<p style="text-align: center; color: #666; margin-top: 50px;">Ball 3</p>
</div>
</div>
<div class="attribute-item">
<strong>`ball-move-4` attribute</strong>
<p>A faster, smaller glowing ball animation.</p>
<pre><div style="..." ball-move-4></div></pre>
<div style="position: relative; overflow: hidden; height: 150px; width: 100%; border: 1px solid #ddd; border-radius: 10px; background-color: #f0f8ff;" ball-move-4>
<p style="text-align: center; color: #666; margin-top: 50px;">Ball 4</p>
</div>
</div>
<div class="attribute-item">
<strong>`ball-move-5` attribute</strong>
<p>A very large, slow glowing ball animation.</p>
<pre><div style="..." ball-move-5></div></pre>
<div style="position: relative; overflow: hidden; height: 150px; width: 100%; border: 1px solid #ddd; border-radius: 10px; background-color: #f0f8ff;" ball-move-5>
<p style="text-align: center; color: #666; margin-top: 50px;">Ball 5</p>
</div>
</div>
</div>
</section>
<section id="special-effects"dblack lwhite dtwhite tlblack>
<h2>Special Effects</h2>
<p>These attributes apply unique visual effects to elements, often using pseudo-elements or SVG filters.</p>
<div class="attribute-list">
<div class="attribute-item">
<strong>`birthday-paper` attribute</strong>
<p>Creates a confetti-like falling paper animation over the element. The parent element should have `position: relative` and `overflow: hidden`.</p>
<pre><div style="..." birthday-paper></div></pre>
<div style="position: relative; overflow: hidden; height: 200px; width: 100%; border: 1px solid #ddd; border-radius: 10px; background-color: #fce4ec; display: flex; align-items: center; justify-content: center; font-size: 1.5em; color: #d81b60;" birthday-paper>
Happy Birthday!
</div>
</div>
<div class="attribute-item">
<strong>`handdrawn` attribute</strong>
<p>Gives the element a hand-drawn or sketchy appearance using an SVG filter,(note it makes the element font very sketchy you can override the font family)</p>
<pre><div handdrawn></div></pre>
<div class="example-box" handdrawn style="width: 150px; height: 80px; font-size: 1.1em; color: #3d0066; background-color: #fffbe9;">
Sketchy Box
</div>
</div>
<div class="attribute-item">
<strong>`blur` attribute</strong>
<p>Applies a `filter: blur(2px)` to the element.</p>
<pre><div blur></div></pre>
<div class="example-box" blur style="background-image: url('https://placehold.co/100x100/A0A0A0/FFFFFF?text=Blurred');">Blurred</div>
</div>
<div class="attribute-item">
<strong>`butterfly=fly ` attribute(note its designed for big sizes layouts like hero section because in small layouts it escapes) </strong>
<a href='https://dev.to/butterflycss/the-easiest-way-to-make-butterfly-animation-without-writing-a-single-line-of-css-or-js-mbb'>see tutorial here`.</a>
<pre><div style="..." butterfly='fly'></div></pre>
<div style="position: relative; overflow: hidden; height: 150px; width: 100%; border: 1px solid #ddd; border-radius: 10px; background-color: #fce4ec; display: flex; align-items: center; justify-content: center; font-size: 1.5em; color: #d81b60;" >
<div h-5 w-5>
<div butterfly="fly">
</div>
</div>
</div>
</div>
</section>
<section id="rotate-utilities"dblack lwhite dtwhite tlblack>
<h2>Rotate Utilities</h2>
<p>Apply specific rotations to elements. These attributes provide rotation in 1-degree increments from 0 to 360 degrees. Responsive variants are also available.</p>
<div class="attribute-list">
<div class="attribute-item">
<strong>`rotate="0"` to `rotate="360"` attributes</strong>
<p>Rotates the element by the specified degree (e.g., `rotate="45"` for 45 degrees, `rotate="180"` for 180 degrees). Values are in degrees without units in the attribute itself.</p>
<pre><div rotate="45"></div></pre>
<div class="example-box" rotate="45">45°</div>
</div>
</div>
</section>
<section id="layout-utilities"dblack lwhite dtwhite tlblack>
<h2>Layout Utilities</h2>
<div class="attribute-list">
<div class="attribute-item">
<strong>`rows` attribute</strong>
<p>Applies `display: flex` with `flex-direction: row`, and centers items horizontally and vertically.</p>
<pre><div rows>...</div></pre>
<div flex-row style="background-color: #e0f2f7; padding: 10px; border-radius: 5px;">
<span>Item 1</span>
<span>Item 2</span>
</div>
</div>
<div class="attribute-item">
<strong>`columns` attribute</strong>
<p>Applies `display: flex` with `flex-direction: column`, and centers items horizontally and vertically.</p>
<pre><div columns>...</div></pre>
<div flex-column style="background-color: #e0f2f7; padding: 10px; border-radius: 5px; min-height: 80px;">
<span>Item 1</span>
<span>Item 2</span>
</div>
</div>
<div class="attribute-item">
<strong>`center` attribute</strong>
<p>Centers an item within its flex container (`align-self: center; justify-self: center;`).</p>
<pre><div flex-row><span center>...</span></div></pre>
<div flex-row style="background-color: #e0f2f7; padding: 10px; border-radius: 5px; min-height: 80px;">
<span center>Centered</span>
</div>
</div>
<div class="attribute-item">
<strong>`flex-auto` attribute</strong>
<p> switches between flex-row and flex-column on with screen morre and less than 1200 px for layout not cards for example you can use if you want a text next to image on computer be text under img if you want responsive cards or divs see responsive box section</p>
<pre><div flex-auto> </div></pre>
</div>
</div>
</section>
<section id="width-height-utilities"dblack lwhite dtwhite tlblack>
<h2>Width & Height Utilities</h2>
<p>These attributes allow you to set fixed widths and heights for elements in rems.</p>
<div class="attribute-list">
<div class="attribute-item">
<strong>`w-1` to `w-999` attributes</strong>
<p>Sets the width of the element from 1 rem to 999 rems. For example, `w-100` sets width to 100rem</p>
<pre><div w-150></div></pre>
<div class="example-box" w-150 style="height: 50px;">Width 150rem</div>
</div>
<div class="attribute-item">
<strong>`h-1` to `h-999` attributes</strong>
<p>Sets the height of the element from 1 rem to 999 rems. For example, `h-200` sets height to 200rems</p>
<pre><div h-120></div></pre>
<div class="example-box" h-120 style="width: 50px;">Height 120rem</div>
</div>
</div>
<div class="attribute-list">
<div class="attribute-item">
<strong>`w-10p` to `w-100p` (w*10) and w-full</strong>
<p>Sets the width in percentage.</p>
<pre><div w-80p></div></pre>
<div class="example-box" w-full style="height: 50px;">Width full</div>
</div>
<div class="attribute-item">
<strong>`h-10p` to `h-100p` h*10 </strong>
<p>Sets the height in percentage.</p>
<pre><div h-90p></div></pre>
<div class="example-box" h-90p style="width: 50px;">Height 90%</div>
</div>
</div>
</section>
<section id="clip-path-shapes"dblack lwhite dtwhite tlblack>
<h2>Clip-Path Shapes</h2>
<p>These attributes apply various geometric shapes using `clip-path`.</p>
<div class="attribute-list">
<div class="attribute-item">
<strong>`circle` attribute</strong>
<p>Clips the element into a perfect circle.</p>
<pre><div circle></div></pre>
<div class="example-box" circle>Circle</div>
</div>
<div class="attribute-item">
<strong>`triangle` attribute</strong>
<p>Clips the element into a triangle.</p>
<pre><div triangle></div></pre>
<div class="example-box" triangle>Triangle</div>
</div>
<div class="attribute-item">
<strong>`ellipse` attribute</strong>
<p>Clips the element into an ellipse.</p>
<pre><div ellipse></div></pre>
<div class="example-box" ellipse>Ellipse</div>
</div>
<div class="attribute-item">
<strong>`square` attribute</strong>
<p>Ensures the element is a square clip path (inset 0).</p>
<pre><div square></div></pre>
<div class="example-box" square>Square</div>
</div>
<div class="attribute-item">
<strong>`rectangle` attribute</strong>
<p>Clips the element into a rectangle (with 10% inset on top/bottom).</p>
<pre><div rectangle></div></pre>
<div class="example-box" rectangle>Rectangle</div>
</div>
<div class="attribute-item">
<strong>`diamond` attribute</strong>
<p>Clips the element into a diamond shape.</p>
<pre><div diamond></div></pre>
<div class="example-box" diamond>Diamond</div>
</div>
<div class="attribute-item">
<strong>`hexagon` attribute</strong>
<p>Clips the element into a hexagon shape.</p>
<pre><div hexagon></div></pre>
<div class="example-box" hexagon>Hexagon</div>
</div>
<div class="attribute-item">
<strong>`parallelogram` attribute</strong>
<p>Clips the element into a parallelogram.</p>
<pre><div parallelogram></div></pre>
<div class="example-box" parallelogram>Parallelogram</div>
</div>
<div class="attribute-item">
<strong>`star` attribute</strong>
<p>Clips the element into a star shape.</p>
<pre><div star></div></pre>
<div class="example-box" star>Star</div>
</div>
<div class="attribute-item">
<strong>`trapezoid` attribute</strong>
<p>Clips the element into a trapezoid shape.</p>
<pre><div trapezoid></div></pre>
<div class="example-box" trapezoid>Trapezoid</div>
</div>
<div class="attribute-item">
<strong>`home` attribute</strong>
<p>Clips the element into a classic house shape.</p>
<pre><div home></div></pre>
<div class="example-box" home>Home</div>
</div>
<div class="attribute-item">
<strong>`heart` attribute</strong>
<p>Clips the element into a heart shape.</p>
<pre><div heart></div></pre>
<div class="example-box" heart>Heart</div>
</div>
<div class="attribute-item">
<strong>`x` attribute</strong>
<p>Clips the element into an 'X' shape.</p>
<pre><div x></div></pre>
<div class="example-box" x>X Shape</div>
</div>
<div class="attribute-item">
<strong>`message` attribute</strong>
<p>Clips the element into a message bubble shape with a pointer at the bottom.</p>
<pre><div message></div></pre>
<div class="example-box" message>Message</div>
</div>
</div>
</section>
<section id="components"dblack lwhite dtwhite tlblack>
<h2>Components</h2>
<h3>Card</h3>
<div class="attribute-list">
<div class="attribute-item">
<strong>`card` attribute</strong>
<p>A styled card component with padding, border-radius, and shadow, with a subtle hover effect.</p>
<pre><div card>...</div></pre>
<div card style="max-width: none; margin: 10px 0;">
<h4>Card Title</h4>
<p>This is some content inside a butterfly CSS card.</p>
</div>
</div>
</div>
<h3>Button</h3>
<div class="attribute-list">
<div class="attribute-item">
<strong>`button` attribute</strong>
<p>A base styled button with padding, border-radius, background, and hover effects.</p>
<pre><button button>Click Me</button></pre>
<button button class="example-button">Click Me</button>
</div>
<div class="attribute-item">
<strong>`btn='{color}'` attributes</strong>
<p>Predefined colored buttons. Replace `{color}` with a wide range of colors. Hover effects are included.</p>
<pre><button btn='purple'>Purple</button>
<button btn='green'>Green</button>
<button btn='rose'>Rose</button></pre>
<div flex-row style="flex-wrap: wrap;">
</div>
</div>
</div>
</section>
<a href="https://flavortown.hack.club/?ref=amrzlabs"><img src='Gemini_Generated_Image_6mknsu6mknsu6mkn.png' w-60p center spink h-300 hover-23 handdrawn></a>
<section id="background-colors"dblack lwhite dtwhite tlblack>
<h2>Background Colors</h2>
<p>Set background colors using attribute selectors for basic colors and various shades (e.g., `red`, `red-500`). These apply `!important` to override other styles.</p>
<h3>Basic Colors</h3>
<div class="attribute-list">
<div class="attribute-item">
<strong>`red` attribute</strong>
<p>Sets background to a vibrant red.</p>
<pre><div red></div></pre>
<div class="example-box" red></div>
</div>
<div class="attribute-item">
<strong>`pink` attribute</strong>
<p>Sets background to a vibrant pink.</p>
<pre><div pink></div></pre>
<div class="example-box" pink></div>
</div>
<div class="attribute-item">
<strong>`purple` attribute</strong>
<p>Sets background to a deep purple.</p>
<pre><div purple></div></pre>
<div class="example-box" purple></div>
</div>
<div class="attribute-item">
<strong>`deep-purple` attribute</strong>
<p>Sets background to a darker purple.</p>
<pre><div deep-purple></div></pre>
<div class="example-box" deep-purple></div>
</div>
<div class="attribute-item">
<strong>`indigo` attribute</strong>
<p>Sets background to an indigo blue.</p>
<pre><div indigo></div></pre>
<div class="example-box" indigo></div>
</div>
<div class="attribute-item">
<strong>`blue` attribute</strong>
<p>Sets background to a standard blue.</p>
<pre><div blue></div></pre>
<div class="example-box" blue></div>
</div>
<div class="attribute-item">
<strong>`light-blue` attribute</strong>
<p>Sets background to a light blue.</p>
<pre><div light-blue></div></pre>
<div class="example-box" light-blue></div>
</div>
<div class="attribute-item">
<strong>`cyan` attribute</strong>
<p>Sets background to a cyan blue.</p>
<pre><div cyan></div></pre>
<div class="example-box" cyan></div>
</div>
<div class="attribute-item">
<strong>`teal` attribute</strong>
<p>Sets background to a teal green.</p>
<pre><div teal></div></pre>
<div class="example-box" teal></div>
</div>
<div class="attribute-item">
<strong>`green` attribute</strong>
<p>Sets background to a vibrant green.</p>
<pre><div green></div></pre>
<div class="example-box" green></div>
</div>
<div class="attribute-item">
<strong>`light-green` attribute</strong>
<p>Sets background to a light green.</p>
<pre><div light-green></div></pre>
<div class="example-box" light-green></div>
</div>
<div class="attribute-item">
<strong>`lime` attribute</strong>
<p>Sets background to a lime green.</p>
<pre><div lime></div></pre>
<div class="example-box" lime></div>
</div>
<div class="attribute-item">
<strong>`yellow` attribute</strong>
<p>Sets background to a golden yellow.</p>
<pre><div yellow></div></pre>
<div class="example-box" yellow></div>
</div>
<div class="attribute-item">
<strong>`amber` attribute</strong>
<p>Sets background to an amber yellow.</p>
<pre><div amber></div></pre>
<div class="example-box" amber></div>
</div>
<div class="attribute-item">
<strong>`orange` attribute</strong>
<p>Sets background to an orange.</p>
<pre><div orange></div></pre>
<div class="example-box" orange></div>
</div>
<div class="attribute-item">
<strong>`deep-orange` attribute</strong>
<p>Sets background to a deep orange.</p>
<pre><div deep-orange></div></pre>
<div class="example-box" deep-orange></div>
</div>
<div class="attribute-item">
<strong>`brown` attribute</strong>
<p>Sets background to a brown.</p>
<pre><div brown></div></pre>
<div class="example-box" brown></div>
</div>
<div class="attribute-item">
<strong>`gray` attribute</strong>
<p>Sets background to a standard gray.</p>
<pre><div gray></div></pre>
<div class="example-box" gray></div>
</div>
<div class="attribute-item">
<strong>`blue-gray` attribute</strong>
<p>Sets background to a blue-gray.</p>
<pre><div blue-gray></div></pre>
<div class="example-box" blue-gray></div>
</div>
<div class="attribute-item">
<strong>`black` attribute</strong>
<p>Sets background to a dark black.</p>
<pre><div black></div></pre>
<div class="example-box" black></div>
</div>
<div class="attribute-item">
<strong>`white` attribute</strong>
<p>Sets background to white.</p>
<pre><div white></div></pre>
<div class="example-box" white style="border: 1px solid #ddd;"></div>
</div>
<div class="attribute-item">
<strong>`light` attribute</strong>
<p>Sets background to a very light purple/gray (`#f8f7ff`).</p>
<pre><div light></div></pre>
<div class="example-box" light></div>
</div>
<div class="attribute-item">
<strong>`dark` attribute</strong>
<p>Sets background to a dark gray/blue (`#22223b`).</p>
<pre><div dark></div></pre>
<div class="example-box" dark></div>
</div>