You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+68-6Lines changed: 68 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,13 +28,14 @@ Play with Cooltipz.css on [CodePen](https://codepen.io/JackDomleo/pen/mderEeG).
28
28
- Easy and simple tooltips with **quick setup**
29
29
- Pure CSS, no JavaScript
30
30
- Highly customisable
31
+
-**Multiple versions available** - Combined, data attributes only, or classes only for optimal bundle size
31
32
- Accessible with `aria-label` attributes
32
33
- Automatically disables animation if the user [prefers reduced motion](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion?ref=cooltipz.jackdomleo.dev)
33
34
- Options to use classes or `data-` attributes
34
35
- Options to import via CDN, npm or yarn
35
36
- Options to import SCSS <sub><sup>(npm & yarn only)</sup></sub> or CSS stylesheets <sub><sup>(expanded or minified)</sup></sub>
36
37
- Supports a wide range of characters and languages (including emojis, [Font Awesome 4](https://fontawesome.com/v4.7.0?ref=cooltipz.jackdomleo.dev) and [Font Awesome 5](https://fontawesome.com?ref=cooltipz.jackdomleo.dev) icons)
37
-
- Uses [Autoprefixer](https://github.com/postcss/autoprefixer?ref=cooltipz.jackdomleo.dev) when generating the CSS stylesheets and [cssnano](https://github.com/cssnano/cssnano?ref=cooltipz.jackdomleo.dev) to minify the minfied stylesheet
38
+
- Uses [Autoprefixer](https://github.com/postcss/autoprefixer?ref=cooltipz.jackdomleo.dev) when generating the CSS stylesheets and [cssnano](https://github.com/cssnano/cssnano?ref=cooltipz.jackdomleo.dev) to minify the minified stylesheet
38
39
39
40
---
40
41
@@ -48,11 +49,28 @@ Play with Cooltipz.css on [CodePen](https://codepen.io/JackDomleo/pen/mderEeG).
48
49
49
50
### CDN
50
51
52
+
Cooltipz.css is available in three versions:
53
+
-**Combined** (`cooltipz.css`/`cooltipz.min.css`) - Full version supporting both data attributes and classes
54
+
-**Data attributes only** (`cooltipz-data-attrs.css`/`cooltipz-data-attrs.min.css`) - Lighter version for data-attribute usage only
55
+
-**Classes only** (`cooltipz-classes.css`/`cooltipz-classes.min.css`) - Lighter version for class-based usage only
56
+
57
+
Choose the version that best fits your needs to minimize bundle size.
58
+
51
59
In the below CDN links:
52
60
- Replace `:version` with a version [listed here](https://www.npmjs.com/package/cooltipz-css?activeTab=versions) (latest version is always recommended). If you always want to get the latest stylesheet, remove `@:version` completely (Not recommended).
53
61
- Replace `:file` with one of the below:
62
+
63
+
**Combined (full functionality - 3.06kB when compressed):**
> 💡 **Recommendation:** Start with the **data attributes only** version if you're unsure, as it provides the most intuitive API. You can always switch to the combined version later if needed.
154
+
155
+
---
156
+
101
157
## License
102
158
103
159
Type - **MIT**
@@ -135,7 +191,13 @@ We appreciate any feedback, good or bad and are always looking for new ideas to
135
191
-`git clone https://github.com/jackdomleo7/Cooltipz.css.git` or clone your forked repository
136
192
-`cd Cooltipz.css`
137
193
-`npm ci`
138
-
-`npm run build` to compile development SCSS to CSS
194
+
-`npm run build` to compile all versions (combined, data-attrs, and classes) from SCSS to CSS
195
+
196
+
**Build commands:**
197
+
-`npm run build` - Build all three versions
198
+
-`npm run build:combined` - Build only the combined version (default)
199
+
-`npm run build:data-attrs` - Build only the data attributes version
200
+
-`npm run build:classes` - Build only the classes version
0 commit comments