@maalbuquerque/tailsass 1.0.2 → 1.0.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maalbuquerque/tailsass",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "description": "Unofficial utility-first CSS/Sass helpers (not affiliated with Tailwind CSS).",
5
5
  "main": "dist/tailsass.css",
6
6
  "style": "dist/tailsass.css",
@@ -1,30 +1,83 @@
1
+ @use 'sass:map';
2
+
1
3
  $animations: (
2
4
  "animate-spin": "spin 1s linear infinite",
3
5
  "animate-pulse": "pulse 2s cubic-bezier(0.4, 0, 0.2, 1) infinite",
4
- "animate-bounce": "bounce 1s infinite",
6
+ "animate-bounce": "bounce 1s infinite",
5
7
  "animate-none": "none"
6
8
  );
7
9
 
8
10
  $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
11
+ "transition-none": (
12
+ property: none,
13
+ ),
14
+ "transition-all": (
15
+ property: all,
16
+ duration: 0.2s,
17
+ timing: ease-in-out,
18
+ ),
19
+ "transition-colors": (
20
+ property: (color, background-color, border-color, text-decoration-color, fill, stroke),
21
+ duration: 0.2s,
22
+ timing: ease-in-out,
23
+ ),
24
+ "transition-opacity": (
25
+ property: opacity,
26
+ duration: 0.2s,
27
+ timing: ease-in-out,
28
+ ),
29
+ "transition-transform": (
30
+ property: transform,
31
+ duration: 0.2s,
32
+ timing: ease-in-out,
33
+ )
14
34
  );
15
35
 
36
+ @keyframes spin {
37
+ to {
38
+ transform: rotate(360deg);
39
+ }
40
+ }
41
+
42
+ @keyframes pulse {
43
+ 50% {
44
+ opacity: 0.5;
45
+ }
46
+ }
47
+
48
+ @keyframes bounce {
49
+ 0%,
50
+ 100% {
51
+ transform: translateY(-25%);
52
+ animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
53
+ }
54
+
55
+ 50% {
56
+ transform: none;
57
+ animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
58
+ }
59
+ }
60
+
16
61
  @mixin apply-animations($prefix: '.') {
17
62
  @each $animation, $value in $animations {
18
63
  #{$prefix}#{$animation} {
19
- animation: $value;
64
+ animation: #{$value};
20
65
  }
21
66
  }
22
67
  }
23
68
 
24
69
  @mixin apply-transitions($prefix: '.') {
25
- @each $transition, $value in $transitions {
26
- #{$prefix}#{$transition} {
27
- transition: $value;
70
+ @each $name, $config in $transitions {
71
+ #{$prefix}#{$name} {
72
+ transition-property: map.get($config, property);
73
+
74
+ @if map.has-key($config, duration) {
75
+ transition-duration: map.get($config, duration);
76
+ }
77
+
78
+ @if map.has-key($config, timing) {
79
+ transition-timing-function: map.get($config, timing);
80
+ }
28
81
  }
29
82
  }
30
83
  }
@@ -1,29 +1,27 @@
1
1
  @use 'modifiers' as *;
2
2
 
3
- $overflows: (
4
- overflow-auto: auto,
5
- overflow-hidden: hidden,
6
- overflow-visible: visible,
7
- overflow-clip: clip,
8
- overflow-scroll: scroll,
9
- overflow-x-auto: auto-x,
10
- overflow-y-auto: auto-y,
11
- overflow-x-hidden: hidden-x,
12
- overflow-y-hidden: hidden-y,
13
- overflow-x-visible: visible-x,
14
- overflow-y-visible: visible-y,
15
- overflow-x-clip: clip-x,
16
- overflow-y-clip: clip-y,
17
- overflow-x-scroll: scroll-x,
18
- overflow-y-scroll: scroll-y
3
+ $overflow-values: (
4
+ auto: auto,
5
+ hidden: hidden,
6
+ visible: visible,
7
+ clip: clip,
8
+ scroll: scroll,
19
9
  );
20
10
 
21
11
  @mixin apply-overflows($prefix: '.') {
22
- @each $overflow, $value in $overflows {
23
- #{$prefix}#{$overflow} {
12
+ @each $name, $value in $overflow-values {
13
+ #{$prefix}overflow-#{$name} {
24
14
  overflow: $value;
25
15
  }
16
+
17
+ #{$prefix}overflow-x-#{$name} {
18
+ overflow-x: $value;
19
+ }
20
+
21
+ #{$prefix}overflow-y-#{$name} {
22
+ overflow-y: $value;
23
+ }
26
24
  }
27
25
  }
28
26
 
29
- @include apply-overflows('.');
27
+ @include apply-overflows('.');