chai-tailwind 1.0.0 โ†’ 1.0.1

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 (2) hide show
  1. package/Readme.md +202 -0
  2. package/package.json +1 -1
package/Readme.md ADDED
@@ -0,0 +1,202 @@
1
+ # ๐Ÿต Chai Tailwind
2
+
3
+ A lightweight Tailwind-like utility CSS engine built using pure JavaScript.
4
+ Apply utility classes directly in HTML โ€” no build step required.
5
+
6
+ ---
7
+
8
+ ## ๐Ÿš€ Features
9
+
10
+ - โšก No build tools required
11
+ - ๐ŸŽฏ Utility-first CSS approach
12
+ - ๐Ÿ“ฆ Works via CDN and npm
13
+ - ๐Ÿง  Great for learning how Tailwind works internally
14
+ - ๐Ÿ”Œ Zero dependencies
15
+
16
+ ---
17
+
18
+ ## ๐Ÿ“ฆ Installation
19
+
20
+ ### Using npm
21
+
22
+ ```bash
23
+ npm install chai-tailwind
24
+ ```
25
+
26
+ ### Using CDN
27
+
28
+ ```html
29
+ <script src="https://cdn.jsdelivr.net/npm/chai-tailwind@1.0.0/dist/chai-tailwind.js"></script>
30
+ ```
31
+
32
+ ---
33
+
34
+ ## ๐Ÿงช Usage
35
+
36
+ ### ๐Ÿ”น Using npm
37
+
38
+ ```js
39
+ import "chai-tailwind";
40
+ ```
41
+
42
+ > ๐Ÿ‘‰ That's it. The library automatically scans the DOM and applies styles.
43
+
44
+ ### ๐Ÿ”น Using CDN
45
+
46
+ ```html
47
+ <!DOCTYPE html>
48
+ <html>
49
+ <head>
50
+ <script src="https://cdn.jsdelivr.net/npm/chai-tailwind@1.0.0/dist/chai-tailwind.js"></script>
51
+ </head>
52
+ <body>
53
+ <div class="chai-bg-red chai-text-white chai-p-4">
54
+ Hello World ๐Ÿš€
55
+ </div>
56
+ </body>
57
+ </html>
58
+ ```
59
+
60
+ ---
61
+
62
+ ## โš™๏ธ API
63
+
64
+ ### `window.ChaiTailwind.init()`
65
+
66
+ Re-apply styles manually (useful for dynamically added elements):
67
+
68
+ ```js
69
+ window.ChaiTailwind.init();
70
+ ```
71
+
72
+ ---
73
+
74
+ ## ๐ŸŽจ Utility Classes
75
+
76
+ ### ๐ŸŽฏ Background Colors
77
+
78
+ | Class | CSS |
79
+ |---|---|
80
+ | `chai-bg-red` | `background-color: red` |
81
+ | `chai-bg-blue` | `background-color: blue` |
82
+ | `chai-bg-green` | `background-color: green` |
83
+ | `chai-bg-yellow` | `background-color: yellow` |
84
+ | `chai-bg-gray` | `background-color: #6b7280` |
85
+ | `chai-bg-white` | `background-color: #ffffff` |
86
+ | `chai-bg-black` | `background-color: #000000` |
87
+
88
+ ---
89
+
90
+ ### โœ๏ธ Text & Typography
91
+
92
+ | Class | CSS |
93
+ |---|---|
94
+ | `chai-text-white` | `color: white` |
95
+ | `chai-text-black` | `color: black` |
96
+ | `chai-text-gray` | `color: #6b7280` |
97
+ | `chai-text-sm` | `font-size: 12px` |
98
+ | `chai-text-base` | `font-size: 16px` |
99
+ | `chai-text-lg` | `font-size: 18px` |
100
+ | `chai-text-xl` | `font-size: 20px` |
101
+ | `chai-font-bold` | `font-weight: bold` |
102
+ | `chai-font-medium` | `font-weight: 500` |
103
+
104
+ ---
105
+
106
+ ### ๐Ÿ“ฆ Spacing
107
+
108
+ | Class | CSS |
109
+ |---|---|
110
+ | `chai-p-1` | `padding: 4px` |
111
+ | `chai-p-2` | `padding: 8px` |
112
+ | `chai-p-3` | `padding: 12px` |
113
+ | `chai-p-4` | `padding: 16px` |
114
+ | `chai-p-6` | `padding: 24px` |
115
+ | `chai-m-1` | `margin: 4px` |
116
+ | `chai-m-2` | `margin: 8px` |
117
+ | `chai-m-4` | `margin: 16px` |
118
+ | `chai-m-auto` | `margin: auto` |
119
+
120
+ ---
121
+
122
+ ### ๐Ÿ”ฒ Borders & Radius
123
+
124
+ | Class | CSS |
125
+ |---|---|
126
+ | `chai-border` | `1px solid #e5e7eb` |
127
+ | `chai-border-2` | `2px solid #e5e7eb` |
128
+ | `chai-border-black` | `border-color: #000` |
129
+ | `chai-border-white` | `border-color: #fff` |
130
+ | `chai-rounded-sm` | `border-radius: 4px` |
131
+ | `chai-rounded-md` | `border-radius: 8px` |
132
+ | `chai-rounded-lg` | `border-radius: 12px` |
133
+ | `chai-rounded-xl` | `border-radius: 16px` |
134
+ | `chai-rounded-full` | `border-radius: 9999px` |
135
+
136
+ ---
137
+
138
+ ### ๐Ÿ“ Layout & Flexbox
139
+
140
+ | Class | CSS |
141
+ |---|---|
142
+ | `chai-flex` | `display: flex` |
143
+ | `chai-inline-flex` | `display: inline-flex` |
144
+ | `chai-flex-col` | `flex-direction: column` |
145
+ | `chai-flex-row` | `flex-direction: row` |
146
+ | `chai-flex-wrap` | `flex-wrap: wrap` |
147
+ | `chai-items-center` | `align-items: center` |
148
+ | `chai-items-start` | `align-items: flex-start` |
149
+ | `chai-items-end` | `align-items: flex-end` |
150
+ | `chai-justify-center` | `justify-content: center` |
151
+ | `chai-justify-between` | `justify-content: space-between` |
152
+ | `chai-justify-around` | `justify-content: space-around` |
153
+ | `chai-gap-2` | `gap: 8px` |
154
+ | `chai-gap-4` | `gap: 16px` |
155
+
156
+ ---
157
+
158
+ ### ๐Ÿ“ Sizing
159
+
160
+ | Class | CSS |
161
+ |---|---|
162
+ | `chai-w-full` | `width: 100%` |
163
+ | `chai-w-screen` | `width: 100vw` |
164
+ | `chai-w-fit` | `width: fit-content` |
165
+ | `chai-h-full` | `height: 100%` |
166
+ | `chai-h-screen` | `height: 100vh` |
167
+ | `chai-max-w-sm` | `max-width: 640px` |
168
+ | `chai-max-w-md` | `max-width: 768px` |
169
+ | `chai-max-w-lg` | `max-width: 1024px` |
170
+
171
+ ---
172
+
173
+ ### ๐Ÿ“ Positioning
174
+
175
+ | Class | CSS |
176
+ |---|---|
177
+ | `chai-relative` | `position: relative` |
178
+ | `chai-absolute` | `position: absolute` |
179
+ | `chai-fixed` | `position: fixed` |
180
+ | `chai-top-0` | `top: 0` |
181
+ | `chai-left-0` | `left: 0` |
182
+ | `chai-right-0` | `right: 0` |
183
+ | `chai-bottom-0` | `bottom: 0` |
184
+
185
+ ---
186
+
187
+ ### ๐ŸŽญ Effects & Misc
188
+
189
+ | Class | CSS |
190
+ |---|---|
191
+ | `chai-shadow-sm` | `box-shadow: small` |
192
+ | `chai-shadow-md` | `box-shadow: medium` |
193
+ | `chai-shadow-lg` | `box-shadow: large` |
194
+ | `chai-transition` | `transition: all 0.3s ease` |
195
+ | `chai-cursor-pointer` | `cursor: pointer` |
196
+ | `chai-text-center` | `text-align: center` |
197
+ | `chai-text-left` | `text-align: left` |
198
+ | `chai-text-right` | `text-align: right` |
199
+ | `chai-overflow-hidden` | `overflow: hidden` |
200
+ | `chai-opacity-50` | `opacity: 0.5` |
201
+ | `chai-opacity-75` | `opacity: 0.75` |
202
+ | `chai-opacity-100` | `opacity: 1` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chai-tailwind",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "A package that you can use to build mordern website, just like tailwind, But you shouldn't since tailwind is already there, It was just a fun project to learn dom.",
5
5
  "main": "dist/chai-tailwind.js",
6
6
  "unpkg": "dist/chai-tailwind.js",