@maalbuquerque/tailsass 1.0.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/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "@maalbuquerque/tailsass",
3
+ "version": "1.0.0",
4
+ "description": "Unofficial utility-first CSS/Sass helpers (not affiliated with Tailwind CSS).",
5
+ "main": "dist/tailsass.css",
6
+ "style": "dist/tailsass.css",
7
+ "sass": "src/index.scss",
8
+ "scripts": {
9
+ "build": "sass build.scss dist/tailsass.css --no-source-map --style=expanded --load-path=src",
10
+ "build:min": "sass build.scss dist/tailsass.min.css --no-source-map --style=compressed --load-path=src",
11
+ "prepare": "npm run build && npm run build:min",
12
+ "watch": "sass build.scss dist/tailsass.css --style=expanded --load-path=src --watch",
13
+ "watch:min": "sass build.scss dist/tailsass.min.css --style=compressed --load-path=src --watch"
14
+ },
15
+ "keywords": [
16
+ "tailwind",
17
+ "tailwindcss",
18
+ "sass",
19
+ "scss",
20
+ "css",
21
+ "utility-first",
22
+ "utility-classes",
23
+ "css-utilities",
24
+ "tailwind-alternative",
25
+ "tailwind-scss",
26
+ "lightweight"
27
+ ],
28
+ "author": "maalbuquerque",
29
+ "license": "MIT",
30
+ "type": "commonjs",
31
+ "devDependencies": {
32
+ "sass": "^1.97.3"
33
+ },
34
+ "files": [
35
+ "dist",
36
+ "src",
37
+ "LICENSE",
38
+ "README.md"
39
+ ],
40
+ "exports": {
41
+ ".": {
42
+ "sass": "./src/index.scss",
43
+ "style": "./dist/tailsass.css",
44
+ "default": "./dist/tailsass.css"
45
+ },
46
+ "./src/*": "./src/*",
47
+ "./dist/*": "./dist/*"
48
+ },
49
+ "publishConfig": {
50
+ "registry": "https://registry.npmjs.org/",
51
+ "access": "public"
52
+ }
53
+ }
@@ -0,0 +1,34 @@
1
+ $animations: (
2
+ "animate-spin": "spin 1s linear infinite",
3
+ "animate-pulse": "pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite",
4
+ "animate-bounce": "bounce 1s infinite",
5
+ "animate-none": "none"
6
+ );
7
+
8
+ $transitions: (
9
+ "transition-none": none,
10
+ "transition-all": all .2s ease-in-out,
11
+ "transition-colors": color 0.2s ease-in-out,
12
+ "transition-opacity": opacity 0.2s ease-in-out,
13
+ "transition-transform": transform 0.2s ease-in-out
14
+ );
15
+
16
+ @mixin apply-animations($prefix: '.') {
17
+ @each $animation, $value in $animations {
18
+ #{$prefix}#{$animation} {
19
+ animation: $value;
20
+ }
21
+ }
22
+ }
23
+
24
+ @mixin apply-transitions($prefix: '.') {
25
+ @each $transition, $value in $transitions {
26
+ #{$prefix}#{$transition} {
27
+ transition: $value;
28
+ }
29
+ }
30
+ }
31
+
32
+ @include apply-transitions('.');
33
+
34
+ @include apply-animations('.');
@@ -0,0 +1,138 @@
1
+ @use 'variables';
2
+ @use 'modifiers' as *;
3
+
4
+ $borders-styles: (
5
+ solid: solid,
6
+ dashed: dashed,
7
+ dotted: dotted,
8
+ double: double,
9
+ none: none
10
+ );
11
+
12
+ // Tailwind default border-radius scale
13
+ $border-radius-scale: (
14
+ none: 0px,
15
+ sm: 0.125rem,
16
+ DEFAULT: 0.25rem,
17
+ md: 0.375rem,
18
+ lg: 0.5rem,
19
+ xl: 0.75rem,
20
+ '2xl': 1rem,
21
+ '3xl': 1.5rem,
22
+ full: 9999px
23
+ );
24
+
25
+ @mixin apply-borders($prefix: '.', $postfix: '') {
26
+ @each $border-style, $value in $borders-styles {
27
+ #{$prefix}border-#{$border-style}#{$postfix} {
28
+ border-style: $value;
29
+ }
30
+ #{$prefix}outline-#{$border-style}#{$postfix} {
31
+ outline-style: $value;
32
+ }
33
+ }
34
+ #{$prefix}border#{$postfix} {
35
+ border-width: 1px;
36
+ }
37
+ #{$prefix}outline#{$postfix} {
38
+ outline-width: 1px;
39
+ }
40
+ @for $i from 0 through 12 {
41
+ #{$prefix}border-#{$i}#{$postfix} {
42
+ border-width: #{$i}px;
43
+ }
44
+ #{$prefix}border-t-#{$i}#{$postfix} {
45
+ border-top-width: #{$i}px;
46
+ }
47
+ #{$prefix}border-r-#{$i}#{$postfix} {
48
+ border-right-width: #{$i}px;
49
+ }
50
+ #{$prefix}border-b-#{$i}#{$postfix} {
51
+ border-bottom-width: #{$i}px;
52
+ }
53
+ #{$prefix}border-l-#{$i}#{$postfix} {
54
+ border-left-width: #{$i}px;
55
+ }
56
+ #{$prefix}border-x-#{$i}#{$postfix} {
57
+ border-inline-width: #{$i}px;
58
+ }
59
+ #{$prefix}border-y-#{$i}#{$postfix} {
60
+ border-block-width: #{$i}px;
61
+ }
62
+ #{$prefix}outline-#{$i}#{$postfix} {
63
+ outline-width: #{$i}px;
64
+ }
65
+ #{$prefix}outline-offset-#{$i}#{$postfix} {
66
+ outline-offset: #{$i}px;
67
+ }
68
+ }
69
+ }
70
+
71
+ @mixin apply-border-radius($prefix: '.', $postfix: '') {
72
+ @each $name, $size in $border-radius-scale {
73
+ @if $name == DEFAULT {
74
+ #{$prefix}rounded#{$postfix} {
75
+ border-radius: $size;
76
+ }
77
+ #{$prefix}rounded-t#{$postfix} {
78
+ border-top-left-radius: $size;
79
+ border-top-right-radius: $size;
80
+ }
81
+ #{$prefix}rounded-r#{$postfix} {
82
+ border-top-right-radius: $size;
83
+ border-bottom-right-radius: $size;
84
+ }
85
+ #{$prefix}rounded-b#{$postfix} {
86
+ border-bottom-right-radius: $size;
87
+ border-bottom-left-radius: $size;
88
+ }
89
+ #{$prefix}rounded-l#{$postfix} {
90
+ border-top-left-radius: $size;
91
+ border-bottom-left-radius: $size;
92
+ }
93
+ #{$prefix}rounded-s#{$postfix} {
94
+ border-start-start-radius: $size;
95
+ border-end-start-radius: $size;
96
+ }
97
+ #{$prefix}rounded-e#{$postfix} {
98
+ border-start-end-radius: $size;
99
+ border-end-end-radius: $size;
100
+ }
101
+ } @else {
102
+ #{$prefix}rounded-#{$name}#{$postfix} {
103
+ border-radius: $size;
104
+ }
105
+ #{$prefix}rounded-t-#{$name}#{$postfix} {
106
+ border-top-left-radius: $size;
107
+ border-top-right-radius: $size;
108
+ }
109
+ #{$prefix}rounded-r-#{$name}#{$postfix} {
110
+ border-top-right-radius: $size;
111
+ border-bottom-right-radius: $size;
112
+ }
113
+ #{$prefix}rounded-b-#{$name}#{$postfix} {
114
+ border-bottom-right-radius: $size;
115
+ border-bottom-left-radius: $size;
116
+ }
117
+ #{$prefix}rounded-l-#{$name}#{$postfix} {
118
+ border-top-left-radius: $size;
119
+ border-bottom-left-radius: $size;
120
+ }
121
+ #{$prefix}rounded-s-#{$name}#{$postfix} {
122
+ border-start-start-radius: $size;
123
+ border-end-start-radius: $size;
124
+ }
125
+ #{$prefix}rounded-e-#{$name}#{$postfix} {
126
+ border-start-end-radius: $size;
127
+ border-end-end-radius: $size;
128
+ }
129
+ }
130
+ }
131
+ }
132
+
133
+ @include apply-borders('.');
134
+ @include apply-border-radius('.');
135
+
136
+ @each $state in $states {
137
+ @include apply-borders('.#{$state}\\:', ':#{$state}');
138
+ }
@@ -0,0 +1,380 @@
1
+ @use 'variables';
2
+ @use 'modifiers' as *;
3
+
4
+ // SCSS Color Map
5
+ $colors: (
6
+ 'slate': (
7
+ 50: var(--slate-50),
8
+ 100: var(--slate-100),
9
+ 200: var(--slate-200),
10
+ 300: var(--slate-300),
11
+ 400: var(--slate-400),
12
+ 500: var(--slate-500),
13
+ 600: var(--slate-600),
14
+ 700: var(--slate-700),
15
+ 800: var(--slate-800),
16
+ 900: var(--slate-900),
17
+ 950: var(--slate-950),
18
+ ),
19
+ 'gray': (
20
+ 50: var(--gray-50),
21
+ 100: var(--gray-100),
22
+ 200: var(--gray-200),
23
+ 300: var(--gray-300),
24
+ 400: var(--gray-400),
25
+ 500: var(--gray-500),
26
+ 600: var(--gray-600),
27
+ 700: var(--gray-700),
28
+ 800: var(--gray-800),
29
+ 900: var(--gray-900),
30
+ 950: var(--gray-950),
31
+ ),
32
+ 'zinc': (
33
+ 50: var(--zinc-50),
34
+ 100: var(--zinc-100),
35
+ 200: var(--zinc-200),
36
+ 300: var(--zinc-300),
37
+ 400: var(--zinc-400),
38
+ 500: var(--zinc-500),
39
+ 600: var(--zinc-600),
40
+ 700: var(--zinc-700),
41
+ 800: var(--zinc-800),
42
+ 900: var(--zinc-900),
43
+ 950: var(--zinc-950),
44
+ ),
45
+ 'neutral': (
46
+ 50: var(--neutral-50),
47
+ 100: var(--neutral-100),
48
+ 200: var(--neutral-200),
49
+ 300: var(--neutral-300),
50
+ 400: var(--neutral-400),
51
+ 500: var(--neutral-500),
52
+ 600: var(--neutral-600),
53
+ 700: var(--neutral-700),
54
+ 800: var(--neutral-800),
55
+ 900: var(--neutral-900),
56
+ 950: var(--neutral-950),
57
+ ),
58
+ 'stone': (
59
+ 50: var(--stone-50),
60
+ 100: var(--stone-100),
61
+ 200: var(--stone-200),
62
+ 300: var(--stone-300),
63
+ 400: var(--stone-400),
64
+ 500: var(--stone-500),
65
+ 600: var(--stone-600),
66
+ 700: var(--stone-700),
67
+ 800: var(--stone-800),
68
+ 900: var(--stone-900),
69
+ 950: var(--stone-950),
70
+ ),
71
+ 'red': (
72
+ 50: var(--red-50),
73
+ 100: var(--red-100),
74
+ 200: var(--red-200),
75
+ 300: var(--red-300),
76
+ 400: var(--red-400),
77
+ 500: var(--red-500),
78
+ 600: var(--red-600),
79
+ 700: var(--red-700),
80
+ 800: var(--red-800),
81
+ 900: var(--red-900),
82
+ 950: var(--red-950),
83
+ ),
84
+ 'orange': (
85
+ 50: var(--orange-50),
86
+ 100: var(--orange-100),
87
+ 200: var(--orange-200),
88
+ 300: var(--orange-300),
89
+ 400: var(--orange-400),
90
+ 500: var(--orange-500),
91
+ 600: var(--orange-600),
92
+ 700: var(--orange-700),
93
+ 800: var(--orange-800),
94
+ 900: var(--orange-900),
95
+ 950: var(--orange-950),
96
+ ),
97
+ 'amber': (
98
+ 50: var(--amber-50),
99
+ 100: var(--amber-100),
100
+ 200: var(--amber-200),
101
+ 300: var(--amber-300),
102
+ 400: var(--amber-400),
103
+ 500: var(--amber-500),
104
+ 600: var(--amber-600),
105
+ 700: var(--amber-700),
106
+ 800: var(--amber-800),
107
+ 900: var(--amber-900),
108
+ 950: var(--amber-950),
109
+ ),
110
+ 'yellow': (
111
+ 50: var(--yellow-50),
112
+ 100: var(--yellow-100),
113
+ 200: var(--yellow-200),
114
+ 300: var(--yellow-300),
115
+ 400: var(--yellow-400),
116
+ 500: var(--yellow-500),
117
+ 600: var(--yellow-600),
118
+ 700: var(--yellow-700),
119
+ 800: var(--yellow-800),
120
+ 900: var(--yellow-900),
121
+ 950: var(--yellow-950),
122
+ ),
123
+ 'lime': (
124
+ 50: var(--lime-50),
125
+ 100: var(--lime-100),
126
+ 200: var(--lime-200),
127
+ 300: var(--lime-300),
128
+ 400: var(--lime-400),
129
+ 500: var(--lime-500),
130
+ 600: var(--lime-600),
131
+ 700: var(--lime-700),
132
+ 800: var(--lime-800),
133
+ 900: var(--lime-900),
134
+ 950: var(--lime-950),
135
+ ),
136
+ 'green': (
137
+ 50: var(--green-50),
138
+ 100: var(--green-100),
139
+ 200: var(--green-200),
140
+ 300: var(--green-300),
141
+ 400: var(--green-400),
142
+ 500: var(--green-500),
143
+ 600: var(--green-600),
144
+ 700: var(--green-700),
145
+ 800: var(--green-800),
146
+ 900: var(--green-900),
147
+ 950: var(--green-950),
148
+ ),
149
+ 'emerald': (
150
+ 50: var(--emerald-50),
151
+ 100: var(--emerald-100),
152
+ 200: var(--emerald-200),
153
+ 300: var(--emerald-300),
154
+ 400: var(--emerald-400),
155
+ 500: var(--emerald-500),
156
+ 600: var(--emerald-600),
157
+ 700: var(--emerald-700),
158
+ 800: var(--emerald-800),
159
+ 900: var(--emerald-900),
160
+ 950: var(--emerald-950),
161
+ ),
162
+ 'teal': (
163
+ 50: var(--teal-50),
164
+ 100: var(--teal-100),
165
+ 200: var(--teal-200),
166
+ 300: var(--teal-300),
167
+ 400: var(--teal-400),
168
+ 500: var(--teal-500),
169
+ 600: var(--teal-600),
170
+ 700: var(--teal-700),
171
+ 800: var(--teal-800),
172
+ 900: var(--teal-900),
173
+ 950: var(--teal-950),
174
+ ),
175
+ 'cyan': (
176
+ 50: var(--cyan-50),
177
+ 100: var(--cyan-100),
178
+ 200: var(--cyan-200),
179
+ 300: var(--cyan-300),
180
+ 400: var(--cyan-400),
181
+ 500: var(--cyan-500),
182
+ 600: var(--cyan-600),
183
+ 700: var(--cyan-700),
184
+ 800: var(--cyan-800),
185
+ 900: var(--cyan-900),
186
+ 950: var(--cyan-950),
187
+ ),
188
+ 'sky': (
189
+ 50: var(--sky-50),
190
+ 100: var(--sky-100),
191
+ 200: var(--sky-200),
192
+ 300: var(--sky-300),
193
+ 400: var(--sky-400),
194
+ 500: var(--sky-500),
195
+ 600: var(--sky-600),
196
+ 700: var(--sky-700),
197
+ 800: var(--sky-800),
198
+ 900: var(--sky-900),
199
+ 950: var(--sky-950),
200
+ ),
201
+ 'blue': (
202
+ 50: var(--blue-50),
203
+ 100: var(--blue-100),
204
+ 200: var(--blue-200),
205
+ 300: var(--blue-300),
206
+ 400: var(--blue-400),
207
+ 500: var(--blue-500),
208
+ 600: var(--blue-600),
209
+ 700: var(--blue-700),
210
+ 800: var(--blue-800),
211
+ 900: var(--blue-900),
212
+ 950: var(--blue-950),
213
+ ),
214
+ 'indigo': (
215
+ 50: var(--indigo-50),
216
+ 100: var(--indigo-100),
217
+ 200: var(--indigo-200),
218
+ 300: var(--indigo-300),
219
+ 400: var(--indigo-400),
220
+ 500: var(--indigo-500),
221
+ 600: var(--indigo-600),
222
+ 700: var(--indigo-700),
223
+ 800: var(--indigo-800),
224
+ 900: var(--indigo-900),
225
+ 950: var(--indigo-950),
226
+ ),
227
+ 'violet': (
228
+ 50: var(--violet-50),
229
+ 100: var(--violet-100),
230
+ 200: var(--violet-200),
231
+ 300: var(--violet-300),
232
+ 400: var(--violet-400),
233
+ 500: var(--violet-500),
234
+ 600: var(--violet-600),
235
+ 700: var(--violet-700),
236
+ 800: var(--violet-800),
237
+ 900: var(--violet-900),
238
+ 950: var(--violet-950),
239
+ ),
240
+ 'purple': (
241
+ 50: var(--purple-50),
242
+ 100: var(--purple-100),
243
+ 200: var(--purple-200),
244
+ 300: var(--purple-300),
245
+ 400: var(--purple-400),
246
+ 500: var(--purple-500),
247
+ 600: var(--purple-600),
248
+ 700: var(--purple-700),
249
+ 800: var(--purple-800),
250
+ 900: var(--purple-900),
251
+ 950: var(--purple-950),
252
+ ),
253
+ 'fuchsia': (
254
+ 50: var(--fuchsia-50),
255
+ 100: var(--fuchsia-100),
256
+ 200: var(--fuchsia-200),
257
+ 300: var(--fuchsia-300),
258
+ 400: var(--fuchsia-400),
259
+ 500: var(--fuchsia-500),
260
+ 600: var(--fuchsia-600),
261
+ 700: var(--fuchsia-700),
262
+ 800: var(--fuchsia-800),
263
+ 900: var(--fuchsia-900),
264
+ 950: var(--fuchsia-950),
265
+ ),
266
+ 'pink': (
267
+ 50: var(--pink-50),
268
+ 100: var(--pink-100),
269
+ 200: var(--pink-200),
270
+ 300: var(--pink-300),
271
+ 400: var(--pink-400),
272
+ 500: var(--pink-500),
273
+ 600: var(--pink-600),
274
+ 700: var(--pink-700),
275
+ 800: var(--pink-800),
276
+ 900: var(--pink-900),
277
+ 950: var(--pink-950),
278
+ ),
279
+ 'rose': (
280
+ 50: var(--rose-50),
281
+ 100: var(--rose-100),
282
+ 200: var(--rose-200),
283
+ 300: var(--rose-300),
284
+ 400: var(--rose-400),
285
+ 500: var(--rose-500),
286
+ 600: var(--rose-600),
287
+ 700: var(--rose-700),
288
+ 800: var(--rose-800),
289
+ 900: var(--rose-900),
290
+ 950: var(--rose-950),
291
+ )
292
+ );
293
+
294
+ @mixin apply-white-black($prefix: '.', $postfix: '') {
295
+ #{$prefix}bg-white#{$postfix} {
296
+ background-color: var(--white);
297
+ }
298
+ #{$prefix}bg-black#{$postfix} {
299
+ background-color: var(--black);
300
+ }
301
+ #{$prefix}bg-transparent#{$postfix} {
302
+ background-color: transparent;
303
+ }
304
+ #{$prefix}text-white#{$postfix} {
305
+ color: var(--white);
306
+ }
307
+ #{$prefix}text-black#{$postfix} {
308
+ color: var(--black);
309
+ }
310
+ #{$prefix}border-white#{$postfix} {
311
+ border-color: var(--white);
312
+ }
313
+ #{$prefix}border-black#{$postfix} {
314
+ border-color: var(--black);
315
+ }
316
+ #{$prefix}shadow-white#{$postfix} {
317
+ box-shadow: 0 0 5px var(--white);
318
+ }
319
+ #{$prefix}shadow-black#{$postfix} {
320
+ box-shadow: 0 0 5px var(--black);
321
+ }
322
+ #{$prefix}outline-white#{$postfix} {
323
+ outline-color: var(--white);
324
+ }
325
+ #{$prefix}outline-black#{$postfix} {
326
+ outline-color: var(--black);
327
+ }
328
+ #{$prefix}outline-offset-white#{$postfix} {
329
+ outline-offset: var(--white);
330
+ }
331
+ #{$prefix}outline-offset-black#{$postfix} {
332
+ outline-offset: var(--black);
333
+ }
334
+ #{$prefix}accent-white#{$postfix} {
335
+ accent-color: var(--white);
336
+ }
337
+ #{$prefix}accent-black#{$postfix} {
338
+ accent-color: var(--black);
339
+ }
340
+ }
341
+
342
+ @mixin apply-colors($prefix: '.', $postfix: '') {
343
+ @each $color, $value in $colors {
344
+ @each $key, $value in $value {
345
+ #{$prefix}bg-#{$color}-#{$key}#{$postfix} {
346
+ background-color: $value;
347
+ }
348
+ #{$prefix}text-#{$color}-#{$key}#{$postfix} {
349
+ color: $value;
350
+ }
351
+ #{$prefix}border-#{$color}-#{$key}#{$postfix} {
352
+ border-color: $value;
353
+ }
354
+ #{$prefix}outline-#{$color}-#{$key}#{$postfix} {
355
+ outline-color: $value;
356
+ }
357
+ #{$prefix}accent-#{$color}-#{$key} {
358
+ accent-color: $value;
359
+ }
360
+ #{$prefix}shadow-#{$color}-#{$key}#{$postfix} {
361
+ box-shadow: 0 0 5px $value;
362
+ }
363
+ }
364
+ }
365
+ }
366
+
367
+ @include apply-colors('.');
368
+ @include apply-white-black('.');
369
+
370
+ @each $state in $states {
371
+ @include apply-colors('.#{$state}\\:', ':#{$state}');
372
+ @include apply-white-black('.#{$state}\\:', ':#{$state}');
373
+ }
374
+
375
+ @each $color-scheme in $color-schemes {
376
+ @media (prefers-color-scheme: $color-scheme) {
377
+ @include apply-colors('.#{$color-scheme}\\:');
378
+ @include apply-white-black('.#{$color-scheme}\\:');
379
+ }
380
+ }
@@ -0,0 +1,54 @@
1
+ @use 'modifiers' as *;
2
+
3
+ $cursors: (
4
+ auto: auto,
5
+ default: default,
6
+ pointer: pointer,
7
+ wait: wait,
8
+ text: text,
9
+ move: move,
10
+ help: help,
11
+ not-allowed: not-allowed,
12
+ none: none,
13
+ context-menu: context-menu,
14
+ progress: progress,
15
+ cell: cell,
16
+ crosshair: crosshair,
17
+ vertical-text: vertical-text,
18
+ alias: alias,
19
+ copy: copy,
20
+ no-drop: no-drop,
21
+ grab: grab,
22
+ grabbing: grabbing,
23
+ all-scroll: all-scroll,
24
+ col-resize: col-resize,
25
+ row-resize: row-resize,
26
+ n-resize: n-resize,
27
+ e-resize: e-resize,
28
+ s-resize: s-resize,
29
+ w-resize: w-resize,
30
+ ne-resize: ne-resize,
31
+ nw-resize: nw-resize,
32
+ se-resize: se-resize,
33
+ sw-resize: sw-resize,
34
+ ew-resize: ew-resize,
35
+ ns-resize: ns-resize,
36
+ nesw-resize: nesw-resize,
37
+ nwse-resize: nwse-resize,
38
+ zoom-in: zoom-in,
39
+ zoom-out: zoom-out
40
+ );
41
+
42
+ @mixin apply-cursors($prefix: '.', $postfix: '') {
43
+ @each $cursor, $value in $cursors {
44
+ #{$prefix}cursor-#{$cursor}#{$postfix} {
45
+ cursor: $value;
46
+ }
47
+ }
48
+ }
49
+
50
+ @include apply-cursors('.');
51
+
52
+ @each $state in $states {
53
+ @include apply-cursors('.#{$state}\\:', ':#{$state}');
54
+ }