@nuvoui/core 1.2.0 → 1.2.2

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.
@@ -0,0 +1,221 @@
1
+ @use '../abstracts' as *;
2
+ @use 'sass:map';
3
+
4
+ /**
5
+ * Transform Utilities
6
+ *
7
+ * - Translate (X, Y, Z)
8
+ * - Scale
9
+ * - Rotate
10
+ * - Skew
11
+ * - Transform origin
12
+ */
13
+
14
+ // Translation mixins
15
+ @mixin translate-x($value) {
16
+ & {
17
+ --translate-x: #{$value};
18
+
19
+ transform: translateX(var(--translate-x)) translateY(var(--translate-y, 0)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) scaleZ(var(--scale-z, 1));
20
+ }
21
+ }
22
+
23
+ @mixin translate-y($value) {
24
+ & {
25
+ --translate-y: #{$value};
26
+
27
+ transform: translateX(var(--translate-x, 0)) translateY(var(--translate-y)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) scaleZ(var(--scale-z, 1));
28
+ }
29
+ }
30
+
31
+ @mixin translate-z($value) {
32
+ & {
33
+ --translate-z: #{$value};
34
+
35
+ transform: translateX(var(--translate-x, 0)) translateY(var(--translate-y, 0)) translateZ(var(--translate-z)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) scaleZ(var(--scale-z, 1));
36
+ }
37
+ }
38
+
39
+ @mixin translate($x, $y: null) {
40
+ & {
41
+ --translate-x: #{$x};
42
+
43
+ @if $y {
44
+ --translate-y: #{$y};
45
+ }
46
+
47
+ transform: translateX(var(--translate-x)) translateY(var(--translate-y, 0)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) scaleZ(var(--scale-z, 1));
48
+ }
49
+ }
50
+
51
+ // Scale mixins
52
+ @mixin scale-x($value) {
53
+ & {
54
+ --scale-x: #{$value};
55
+
56
+ transform: translateX(var(--translate-x, 0)) translateY(var(--translate-y, 0)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x)) scaleY(var(--scale-y, 1)) scaleZ(var(--scale-z, 1));
57
+ }
58
+ }
59
+
60
+ @mixin scale-y($value) {
61
+ & {
62
+ --scale-y: #{$value};
63
+
64
+ transform: translateX(var(--translate-x, 0)) translateY(var(--translate-y, 0)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y)) scaleZ(var(--scale-z, 1));
65
+ }
66
+ }
67
+
68
+ @mixin scale($value) {
69
+ & {
70
+ --scale-x: #{$value};
71
+ --scale-y: #{$value};
72
+
73
+ transform: translateX(var(--translate-x, 0)) translateY(var(--translate-y, 0)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x)) scaleY(var(--scale-y)) scaleZ(var(--scale-z, 1));
74
+ }
75
+ }
76
+
77
+ // Rotation mixins
78
+ @mixin rotate($value) {
79
+ & {
80
+ --rotate: #{$value};
81
+
82
+ transform: translateX(var(--translate-x, 0)) translateY(var(--translate-y, 0)) translateZ(var(--translate-z, 0)) rotate(var(--rotate)) skewX(var(--skew-x, 0)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) scaleZ(var(--scale-z, 1));
83
+ }
84
+ }
85
+
86
+ // Skew mixins
87
+ @mixin skew-x($value) {
88
+ & {
89
+ --skew-x: #{$value};
90
+
91
+ transform: translateX(var(--translate-x, 0)) translateY(var(--translate-y, 0)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x)) skewY(var(--skew-y, 0)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) scaleZ(var(--scale-z, 1));
92
+ }
93
+ }
94
+
95
+ @mixin skew-y($value) {
96
+ & {
97
+ --skew-y: #{$value};
98
+
99
+ transform: translateX(var(--translate-x, 0)) translateY(var(--translate-y, 0)) translateZ(var(--translate-z, 0)) rotate(var(--rotate, 0)) skewX(var(--skew-x, 0)) skewY(var(--skew-y)) scaleX(var(--scale-x, 1)) scaleY(var(--scale-y, 1)) scaleZ(var(--scale-z, 1));
100
+ }
101
+ }
102
+
103
+ // Transform origin
104
+ @mixin origin($value) {
105
+ & {
106
+ transform-origin: $value;
107
+ }
108
+ }
109
+
110
+ // Common transform values
111
+ $translate-values: (
112
+ '0': 0,
113
+ '1': 0.25rem,
114
+ '2': 0.5rem,
115
+ '3': 0.75rem,
116
+ '4': 1rem,
117
+ '5': 1.25rem,
118
+ '6': 1.5rem,
119
+ '8': 2rem,
120
+ '10': 2.5rem,
121
+ '12': 3rem,
122
+ '16': 4rem,
123
+ '20': 5rem,
124
+ '25p': 25%,
125
+ '33p': 33.333%,
126
+ '50p': 50%,
127
+ '66p': 66.667%,
128
+ '75p': 75%,
129
+ '100p': 100%,
130
+ '-1': -0.25rem,
131
+ '-2': -0.5rem,
132
+ '-3': -0.75rem,
133
+ '-4': -1rem,
134
+ '-5': -1.25rem,
135
+ '-6': -1.5rem,
136
+ '-8': -2rem,
137
+ '-10': -2.5rem,
138
+ '-12': -3rem,
139
+ '-16': -4rem,
140
+ '-20': -5rem,
141
+ '-25p': 25%,
142
+ '-33p': 33.333%,
143
+ '-50p': 50%,
144
+ '-66p': 66.667%,
145
+ '-75p': 75%,
146
+ '-100p': -100%,
147
+ );
148
+
149
+ // Generate utility classes
150
+ @if $generate-utility-classes {
151
+ // Translate utilities
152
+ @each $key, $value in $translate-values {
153
+ .translate-x-#{$key} { @include translate-x($value); }
154
+ .translate-y-#{$key} { @include translate-y($value); }
155
+ }
156
+
157
+ // Scale utilities
158
+ .scale-0 { @include scale(0); }
159
+ .scale-50 { @include scale(0.5); }
160
+ .scale-75 { @include scale(0.75); }
161
+ .scale-90 { @include scale(0.9); }
162
+ .scale-95 { @include scale(0.95); }
163
+ .scale-100 { @include scale(1); }
164
+ .scale-105 { @include scale(1.05); }
165
+ .scale-110 { @include scale(1.1); }
166
+ .scale-125 { @include scale(1.25); }
167
+ .scale-150 { @include scale(1.5); }
168
+
169
+ // Rotation utilities
170
+ .rotate-0 { @include rotate(0deg); }
171
+ .rotate-45 { @include rotate(45deg); }
172
+ .rotate-90 { @include rotate(90deg); }
173
+ .rotate-180 { @include rotate(180deg); }
174
+ .rotate-270 { @include rotate(270deg); }
175
+ .-rotate-45 { @include rotate(-45deg); }
176
+ .-rotate-90 { @include rotate(-90deg); }
177
+ .-rotate-180 { @include rotate(-180deg); }
178
+ .-rotate-270 { @include rotate(-270deg); }
179
+
180
+ // Origin utilities
181
+ .origin-center { @include origin(center); }
182
+ .origin-top { @include origin(top); }
183
+ .origin-top-right { @include origin(top right); }
184
+ .origin-right { @include origin(right); }
185
+ .origin-bottom-right { @include origin(bottom right); }
186
+ .origin-bottom { @include origin(bottom); }
187
+ .origin-bottom-left { @include origin(bottom left); }
188
+ .origin-left { @include origin(left); }
189
+ .origin-top-left { @include origin(top left); }
190
+
191
+ // Responsive variants
192
+ @each $breakpoint, $width in $breakpoints {
193
+ @media (min-width: #{$width}) {
194
+ @each $key, $value in $translate-values {
195
+ .translate-x-#{$key}\@#{$breakpoint} { @include translate-x($value); }
196
+ .translate-y-#{$key}\@#{$breakpoint} { @include translate-y($value); }
197
+ }
198
+
199
+ // Scale responsive
200
+ .scale-0\@#{$breakpoint} { @include scale(0); }
201
+ .scale-50\@#{$breakpoint} { @include scale(0.5); }
202
+ .scale-75\@#{$breakpoint} { @include scale(0.75); }
203
+ .scale-90\@#{$breakpoint} { @include scale(0.9); }
204
+ .scale-95\@#{$breakpoint} { @include scale(0.95); }
205
+ .scale-100\@#{$breakpoint} { @include scale(1); }
206
+ .scale-105\@#{$breakpoint} { @include scale(1.05); }
207
+ .scale-110\@#{$breakpoint} { @include scale(1.1); }
208
+ .scale-125\@#{$breakpoint} { @include scale(1.25); }
209
+ .scale-150\@#{$breakpoint} { @include scale(1.5); }
210
+
211
+ // Rotation responsive
212
+ .rotate-0\@#{$breakpoint} { @include rotate(0deg); }
213
+ .rotate-45\@#{$breakpoint} { @include rotate(45deg); }
214
+ .rotate-90\@#{$breakpoint} { @include rotate(90deg); }
215
+ .rotate-180\@#{$breakpoint} { @include rotate(180deg); }
216
+ .-rotate-45\@#{$breakpoint} { @include rotate(-45deg); }
217
+ .-rotate-90\@#{$breakpoint} { @include rotate(-90deg); }
218
+ .-rotate-180\@#{$breakpoint} { @include rotate(-180deg); }
219
+ }
220
+ }
221
+ }
@@ -13,9 +13,11 @@
13
13
 
14
14
  // Base transition mixins
15
15
  @mixin transition {
16
- transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
17
- transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
18
- transition-duration: 150ms;
16
+ & {
17
+ transition-property: color, background-color, border-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;
18
+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
19
+ transition-duration: 150ms;
20
+ }
19
21
  }
20
22
 
21
23
  // Property-specific transition mixins
@@ -42,18 +44,13 @@
42
44
  transition-delay: $time;
43
45
  }
44
46
 
45
- // Base transition
46
- .transition {
47
- @include transition;
48
- }
49
-
50
- // Property-specific transitions
51
- .transition-none { @include transition-none; }
52
- .transition-all { @include transition-all; }
53
- .transition-colors { @include transition-colors; }
54
- .transition-opacity { @include transition-opacity; }
55
- .transition-shadow { @include transition-shadow; }
56
- .transition-transform { @include transition-transform; }
47
+ // Timing functions
48
+ $timing-functions: (
49
+ 'linear': linear,
50
+ 'in': cubic-bezier(0.4, 0, 1, 1),
51
+ 'out': cubic-bezier(0, 0, 0.2, 1),
52
+ 'in-out': cubic-bezier(0.4, 0, 0.2, 1),
53
+ );
57
54
 
58
55
  // Durations
59
56
  $durations: (
@@ -68,31 +65,6 @@ $durations: (
68
65
  '1000': 1000ms,
69
66
  );
70
67
 
71
- @each $name, $value in $durations {
72
- .duration-#{$name} {
73
- @include duration($value);
74
- }
75
- }
76
-
77
- // Timing functions
78
- $timing-functions: (
79
- 'linear': linear,
80
- 'in': cubic-bezier(0.4, 0, 1, 1),
81
- 'out': cubic-bezier(0, 0, 0.2, 1),
82
- 'in-out': cubic-bezier(0.4, 0, 0.2, 1),
83
- );
84
-
85
- @each $name, $value in $timing-functions {
86
- .ease-#{$name} {
87
- transition-timing-function: $value;
88
- }
89
- }
90
-
91
- // Specific timing function classes
92
- .ease-linear { @include ease-linear; }
93
- .ease-in { @include ease-in; }
94
- .ease-out { @include ease-out; }
95
- .ease-in-out { @include ease-in-out; }
96
68
 
97
69
  // Delays
98
70
  $delays: (
@@ -107,45 +79,79 @@ $delays: (
107
79
  '1000': 1000ms,
108
80
  );
109
81
 
110
- @each $name, $value in $delays {
111
- .delay-#{$name} {
112
- @include delay($value);
82
+
83
+ @if $generate-utility-classes {
84
+ // Base transition
85
+ .transition {
86
+ @include transition;
113
87
  }
114
- }
115
88
 
116
- // Responsive variants
117
- @each $breakpoint, $width in $breakpoints {
118
- @media (min-width: #{$width}) {
119
- // Base transition
120
- .transition\@#{$breakpoint} {
121
- @include transition;
89
+ // Property-specific transitions
90
+ .transition-none { @include transition-none; }
91
+ .transition-all { @include transition-all; }
92
+ .transition-colors { @include transition-colors; }
93
+ .transition-opacity { @include transition-opacity; }
94
+ .transition-shadow { @include transition-shadow; }
95
+ .transition-transform { @include transition-transform; }
96
+
97
+ @each $name, $value in $durations {
98
+ .duration-#{$name} {
99
+ @include duration($value);
122
100
  }
123
-
124
- // Property-specific transitions
125
- .transition-none\@#{$breakpoint} { @include transition-none; }
126
- .transition-all\@#{$breakpoint} { @include transition-all; }
127
- .transition-colors\@#{$breakpoint} { @include transition-colors; }
128
- .transition-opacity\@#{$breakpoint} { @include transition-opacity; }
129
- .transition-shadow\@#{$breakpoint} { @include transition-shadow; }
130
- .transition-transform\@#{$breakpoint} { @include transition-transform; }
131
-
132
- // Duration responsive variants
133
- @each $name, $value in $durations {
134
- .duration-#{$name}\@#{$breakpoint} {
135
- @include duration($value);
136
- }
101
+ }
102
+
103
+ @each $name, $value in $timing-functions {
104
+ .ease-#{$name} {
105
+ transition-timing-function: $value;
106
+ }
107
+ }
108
+
109
+ // Specific timing function classes
110
+ .ease-linear { @include ease-linear; }
111
+ .ease-in { @include ease-in; }
112
+ .ease-out { @include ease-out; }
113
+ .ease-in-out { @include ease-in-out; }
114
+
115
+ @each $name, $value in $delays {
116
+ .delay-#{$name} {
117
+ @include delay($value);
137
118
  }
138
-
139
- // Timing function responsive variants
140
- .ease-linear\@#{$breakpoint} { @include ease-linear; }
141
- .ease-in\@#{$breakpoint} { @include ease-in; }
142
- .ease-out\@#{$breakpoint} { @include ease-out; }
143
- .ease-in-out\@#{$breakpoint} { @include ease-in-out; }
144
-
145
- // Delay responsive variants
146
- @each $name, $value in $delays {
147
- .delay-#{$name}\@#{$breakpoint} {
148
- @include delay($value);
119
+ }
120
+
121
+ // Responsive variants
122
+ @each $breakpoint, $width in $breakpoints {
123
+ @media (min-width: #{$width}) {
124
+ // Base transition
125
+ .transition\@#{$breakpoint} {
126
+ @include transition;
127
+ }
128
+
129
+ // Property-specific transitions
130
+ .transition-none\@#{$breakpoint} { @include transition-none; }
131
+ .transition-all\@#{$breakpoint} { @include transition-all; }
132
+ .transition-colors\@#{$breakpoint} { @include transition-colors; }
133
+ .transition-opacity\@#{$breakpoint} { @include transition-opacity; }
134
+ .transition-shadow\@#{$breakpoint} { @include transition-shadow; }
135
+ .transition-transform\@#{$breakpoint} { @include transition-transform; }
136
+
137
+ // Duration responsive variants
138
+ @each $name, $value in $durations {
139
+ .duration-#{$name}\@#{$breakpoint} {
140
+ @include duration($value);
141
+ }
142
+ }
143
+
144
+ // Timing function responsive variants
145
+ .ease-linear\@#{$breakpoint} { @include ease-linear; }
146
+ .ease-in\@#{$breakpoint} { @include ease-in; }
147
+ .ease-out\@#{$breakpoint} { @include ease-out; }
148
+ .ease-in-out\@#{$breakpoint} { @include ease-in-out; }
149
+
150
+ // Delay responsive variants
151
+ @each $name, $value in $delays {
152
+ .delay-#{$name}\@#{$breakpoint} {
153
+ @include delay($value);
154
+ }
149
155
  }
150
156
  }
151
157
  }
@@ -2,6 +2,7 @@
2
2
  // Module: Text
3
3
 
4
4
  @use 'sass:map';
5
+ @use 'sass:meta';
5
6
 
6
7
  // Import variables
7
8
  @use '../abstracts' as VAR;
@@ -31,79 +32,144 @@
31
32
  * @param {string} $size - The size of the text.
32
33
  */
33
34
  @mixin text-size($size) {
34
- @if map.has-key(VAR.$font-sizes, $size) {
35
- font-size: map.get(VAR.$font-sizes, $size);
36
- } @else {
37
- font-size: $size;
35
+ & {
36
+ @if map.has-key(VAR.$font-sizes, $size) {
37
+ font-size: map.get(VAR.$font-sizes, $size);
38
+ } @else {
39
+ font-size: $size;
40
+ }
38
41
  }
39
-
40
42
  }
41
43
 
42
44
  // Font weights
43
- @mixin font-thin { font-weight: 100; }
44
- @mixin font-extralight { font-weight: 200; }
45
- @mixin font-light { font-weight: 300; }
46
- @mixin font-normal { font-weight: 400; }
47
- @mixin font-medium { font-weight: 500; }
48
- @mixin font-semibold { font-weight: 600; }
49
- @mixin font-bold { font-weight: 700; }
50
- @mixin font-extrabold { font-weight: 800; }
51
- @mixin font-black { font-weight: 900; }
45
+ @mixin font-thin { & { font-weight: 100; } }
46
+ @mixin font-extralight { & { font-weight: 200; } }
47
+ @mixin font-light { & { font-weight: 300; } }
48
+ @mixin font-normal { & { font-weight: 400; } }
49
+ @mixin font-medium { & { font-weight: 500; } }
50
+ @mixin font-semibold { & { font-weight: 600; } }
51
+ @mixin font-bold { & { font-weight: 700; } }
52
+ @mixin font-extrabold { & { font-weight: 800; } }
53
+ @mixin font-black { & { font-weight: 900; } }
54
+
55
+
56
+ @mixin leading($value){
57
+ & {
58
+ @if meta.type-of($value) == 'number' {
59
+ line-height: $value;
60
+ } @else if $value == 'none' {
61
+ line-height: 1;
62
+ } @else if $value == 'tight' {
63
+ line-height: 1.25;
64
+ } @else if $value == 'snug' {
65
+ line-height: 1.375;
66
+ } @else if $value == 'normal' {
67
+ line-height: 1.5;
68
+ } @else if $value == 'relaxed' {
69
+ line-height: 1.625;
70
+ } @else if $value == 'loose' {
71
+ line-height: 2;
72
+ } @else {
73
+ line-height: $value;
74
+ }
75
+ }
76
+ }
52
77
 
53
78
  // Line heights
54
- @mixin leading-none { line-height: 1; }
55
- @mixin leading-tight { line-height: 1.25; }
56
- @mixin leading-snug { line-height: 1.375; }
57
- @mixin leading-normal { line-height: 1.5; }
58
- @mixin leading-relaxed { line-height: 1.625; }
59
- @mixin leading-loose { line-height: 2; }
79
+ @mixin leading-none { & { @include leading(none);} }
80
+ @mixin leading-tight { & { @include leading(tight);} }
81
+ @mixin leading-snug { & { @include leading(snug);} }
82
+ @mixin leading-normal { & { @include leading(normal);} }
83
+ @mixin leading-relaxed { & { @include leading(relaxed);} }
84
+ @mixin leading-loose { & { @include leading(loose);} }
60
85
 
61
86
  // Text alignment
62
- @mixin text-left { text-align: left; }
63
- @mixin text-center { text-align: center; }
64
- @mixin text-right { text-align: right; }
65
- @mixin text-justify { text-align: justify; }
87
+ @mixin text-left { & { text-align: left; } }
88
+ @mixin text-center { & { text-align: center; } }
89
+ @mixin text-right { & { text-align: right; } }
90
+ @mixin text-justify { & { text-align: justify; } }
66
91
 
67
92
 
68
93
  // Text transform mixins
69
- @mixin uppercase { text-transform: uppercase; }
70
- @mixin lowercase { text-transform: lowercase; }
71
- @mixin capitalize { text-transform: capitalize; }
72
- @mixin normal-case { text-transform: none; }
94
+ @mixin uppercase { & { text-transform: uppercase; } }
95
+ @mixin lowercase { & { text-transform: lowercase; } }
96
+ @mixin capitalize { & { text-transform: capitalize; } }
97
+ @mixin normal-case { & { text-transform: none; } }
73
98
 
74
99
  // Font style mixins
75
- @mixin italic { font-style: italic; }
76
- @mixin not-italic { font-style: normal; }
100
+ @mixin italic { & { font-style: italic; } }
101
+ @mixin not-italic { & { font-style: normal; } }
77
102
 
78
103
  // Text decoration mixins
79
- @mixin underline { text-decoration: underline; }
80
- @mixin line-through { text-decoration: line-through; }
81
- @mixin no-underline { text-decoration: none; }
104
+ @mixin underline { & { text-decoration: underline; } }
105
+ @mixin line-through { & { text-decoration: line-through; } }
106
+ @mixin no-underline { & { text-decoration: none; } }
82
107
 
83
108
  // Text overflow mixin
84
- @mixin truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
109
+ @mixin truncate {
110
+ & {
111
+ overflow: hidden;
112
+ text-overflow: ellipsis;
113
+ white-space: nowrap;
114
+ }
115
+ }
85
116
 
86
117
  @mixin truncate-lines($lines: 2) {
87
- display: -webkit-box;
88
- -webkit-line-clamp: $lines;
89
- -webkit-box-orient: vertical;
90
- overflow: hidden;
91
- text-overflow: ellipsis;
118
+ & {
119
+ display: -webkit-box;
120
+ -webkit-line-clamp: $lines;
121
+ -webkit-box-orient: vertical;
122
+ overflow: hidden;
123
+ text-overflow: ellipsis;
124
+ }
92
125
  }
93
126
 
94
127
 
95
- @mixin break-normal { overflow-wrap: normal; word-break: normal; }
96
- @mixin break-words { overflow-wrap: break-word; }
97
- @mixin break-all { word-break: break-all; }
98
- @mixin whitespace-normal { white-space: normal; }
99
- @mixin whitespace-nowrap { white-space: nowrap; }
100
- @mixin whitespace-pre { white-space: pre; }
101
- @mixin whitespace-pre-line { white-space: pre-line; }
102
- @mixin whitespace-pre-wrap { white-space: pre-wrap; }
103
-
104
-
128
+ @mixin break-normal {
129
+ & {
130
+ overflow-wrap: normal;
131
+ word-break: normal;
132
+ }
133
+ }
105
134
 
135
+ @mixin break-words { & {overflow-wrap: break-word; }}
136
+ @mixin break-all { & {word-break: break-all; }}
137
+ @mixin whitespace-normal { & {white-space: normal; }}
138
+ @mixin whitespace-nowrap { & {white-space: nowrap; }}
139
+ @mixin whitespace-pre { & {white-space: pre; }}
140
+ @mixin whitespace-pre-line { & {white-space: pre-line; }}
141
+ @mixin whitespace-pre-wrap { & {white-space: pre-wrap; }}
142
+
143
+
144
+ // Custom letter spacing mixin with value
145
+ @mixin tracking($value) {
146
+ & {
147
+ @if meta.type-of($value) == 'number' {
148
+ letter-spacing: $value;
149
+ } @else if $value == 'tighter' {
150
+ letter-spacing: -0.05em;
151
+ } @else if $value == 'tight' {
152
+ letter-spacing: -0.025em;
153
+ } @else if $value == 'normal' {
154
+ letter-spacing: 0;
155
+ } @else if $value == 'wide' {
156
+ letter-spacing: 0.025em;
157
+ } @else if $value == 'wider' {
158
+ letter-spacing: 0.05em;
159
+ } @else if $value == 'widest' {
160
+ letter-spacing: 0.1em;
161
+ } @else {
162
+ letter-spacing: $value;
163
+ }
164
+ }
165
+ }
106
166
 
167
+ @mixin tracking-tighter { @include tracking(tighter) };
168
+ @mixin tracking-tight { @include tracking(tight) };
169
+ @mixin tracking-normal { @include tracking(normal) };
170
+ @mixin tracking-wide { @include tracking(wide) };
171
+ @mixin tracking-wider { @include tracking(wider) };
172
+ @mixin tracking-widest { @include tracking(widest) };
107
173
 
108
174
 
109
175
  @mixin responsive-typography($breakpoint: null) {
@@ -158,24 +224,32 @@
158
224
  .truncate-4#{$suffix} { @include truncate-lines(4); }
159
225
  .truncate-5#{$suffix} { @include truncate-lines(5); }
160
226
 
227
+ .tracking-tighter#{$suffix} { @include tracking(tighter) };
228
+ .tracking-tight#{$suffix} { @include tracking(tight) };
229
+ .tracking-normal#{$suffix} { @include tracking(normal) };
230
+ .tracking-wide#{$suffix} { @include tracking(wide) };
231
+ .tracking-wider#{$suffix} { @include tracking(wider) };
232
+ .tracking-widest#{$suffix} { @include tracking(widest) };
161
233
  }
162
234
 
163
- @include responsive-typography;
164
- .break-normal { @include break-normal; }
165
- .break-words { @include break-words; }
166
- .break-all { @include break-all; }
167
- .whitespace-normal { @include whitespace-normal; }
168
- .whitespace-nowrap { @include whitespace-nowrap; }
169
- .whitespace-pre { @include whitespace-pre; }
170
- .whitespace-pre-line { @include whitespace-pre-line; }
171
- .whitespace-pre-wrap { @include whitespace-pre-wrap; }
172
-
173
- @each $breakpoint, $width in VAR.$breakpoints {
174
- @media (min-width: #{$width}) {
175
- @each $size, $val in VAR.$font-sizes {
176
- .text-#{$size}\@#{$breakpoint} { @include text-size($size); }
177
- }
178
- @include responsive-typography($breakpoint);
179
- }
180
- }
235
+ @if VAR.$generate-utility-classes {
236
+ @include responsive-typography;
237
+ .break-normal { @include break-normal; }
238
+ .break-words { @include break-words; }
239
+ .break-all { @include break-all; }
240
+ .whitespace-normal { @include whitespace-normal; }
241
+ .whitespace-nowrap { @include whitespace-nowrap; }
242
+ .whitespace-pre { @include whitespace-pre; }
243
+ .whitespace-pre-line { @include whitespace-pre-line; }
244
+ .whitespace-pre-wrap { @include whitespace-pre-wrap; }
245
+
246
+ @each $breakpoint, $width in VAR.$breakpoints {
247
+ @media (min-width: #{$width}) {
248
+ @each $size, $val in VAR.$font-sizes {
249
+ .text-#{$size}\@#{$breakpoint} { @include text-size($size); }
250
+ }
251
+ @include responsive-typography($breakpoint);
252
+ }
253
+ }
181
254
 
255
+ }