@nuvoui/core 1.3.2 → 1.3.4

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.
@@ -34,32 +34,16 @@
34
34
  }
35
35
 
36
36
  // Font weights
37
- @mixin font-thin {
38
- font-weight: 100;
39
- }
40
- @mixin font-extralight {
41
- font-weight: 200;
42
- }
43
- @mixin font-light {
44
- font-weight: 300;
45
- }
46
- @mixin font-normal {
47
- font-weight: 400;
48
- }
49
- @mixin font-medium {
50
- font-weight: 500;
51
- }
52
- @mixin font-semibold {
53
- font-weight: 600;
54
- }
55
- @mixin font-bold {
56
- font-weight: 700;
57
- }
58
- @mixin font-extrabold {
59
- font-weight: 800;
60
- }
61
- @mixin font-black {
62
- font-weight: 900;
37
+ @mixin font($weight) {
38
+ @if map.has-key(VAR.$font-weights, #{$weight}) {
39
+ font-weight: map.get(VAR.$font-weights, $weight);
40
+ } @else if meta.type-of($weight) == number {
41
+ font-weight: $weight;
42
+ } @else {
43
+ @warn "Unknown font weight: #{$weight} setting it to default.";
44
+
45
+ font-weight: 400; // Default to normal weight
46
+ }
63
47
  }
64
48
 
65
49
  @mixin leading($value) {
@@ -86,18 +70,23 @@
86
70
  @mixin leading-none {
87
71
  @include leading(none);
88
72
  }
73
+
89
74
  @mixin leading-tight {
90
75
  @include leading(tight);
91
76
  }
77
+
92
78
  @mixin leading-snug {
93
79
  @include leading(snug);
94
80
  }
81
+
95
82
  @mixin leading-normal {
96
83
  @include leading(normal);
97
84
  }
85
+
98
86
  @mixin leading-relaxed {
99
87
  @include leading(relaxed);
100
88
  }
89
+
101
90
  @mixin leading-loose {
102
91
  @include leading(loose);
103
92
  }
@@ -106,12 +95,15 @@
106
95
  @mixin text-left {
107
96
  text-align: left;
108
97
  }
98
+
109
99
  @mixin text-center {
110
100
  text-align: center;
111
101
  }
102
+
112
103
  @mixin text-right {
113
104
  text-align: right;
114
105
  }
106
+
115
107
  @mixin text-justify {
116
108
  text-align: justify;
117
109
  }
@@ -120,12 +112,15 @@
120
112
  @mixin uppercase {
121
113
  text-transform: uppercase;
122
114
  }
115
+
123
116
  @mixin lowercase {
124
117
  text-transform: lowercase;
125
118
  }
119
+
126
120
  @mixin capitalize {
127
121
  text-transform: capitalize;
128
122
  }
123
+
129
124
  @mixin normal-case {
130
125
  text-transform: none;
131
126
  }
@@ -134,6 +129,7 @@
134
129
  @mixin italic {
135
130
  font-style: italic;
136
131
  }
132
+
137
133
  @mixin not-italic {
138
134
  font-style: normal;
139
135
  }
@@ -142,9 +138,11 @@
142
138
  @mixin underline {
143
139
  text-decoration: underline;
144
140
  }
141
+
145
142
  @mixin line-through {
146
143
  text-decoration: line-through;
147
144
  }
145
+
148
146
  @mixin no-underline {
149
147
  text-decoration: none;
150
148
  }
@@ -180,21 +178,27 @@
180
178
  @mixin break-words {
181
179
  overflow-wrap: break-word;
182
180
  }
181
+
183
182
  @mixin break-all {
184
183
  word-break: break-all;
185
184
  }
185
+
186
186
  @mixin whitespace-normal {
187
187
  white-space: normal;
188
188
  }
189
+
189
190
  @mixin whitespace-nowrap {
190
191
  white-space: nowrap;
191
192
  }
193
+
192
194
  @mixin whitespace-pre {
193
195
  white-space: pre;
194
196
  }
197
+
195
198
  @mixin whitespace-pre-line {
196
199
  white-space: pre-line;
197
200
  }
201
+
198
202
  @mixin whitespace-pre-wrap {
199
203
  white-space: pre-wrap;
200
204
  }
@@ -223,18 +227,23 @@
223
227
  @mixin tracking-tighter {
224
228
  @include tracking(tighter);
225
229
  }
230
+
226
231
  @mixin tracking-tight {
227
232
  @include tracking(tight);
228
233
  }
234
+
229
235
  @mixin tracking-normal {
230
236
  @include tracking(normal);
231
237
  }
238
+
232
239
  @mixin tracking-wide {
233
240
  @include tracking(wide);
234
241
  }
242
+
235
243
  @mixin tracking-wider {
236
244
  @include tracking(wider);
237
245
  }
246
+
238
247
  @mixin tracking-widest {
239
248
  @include tracking(widest);
240
249
  }
@@ -249,40 +258,10 @@
249
258
  }
250
259
 
251
260
  // Generate font weight utilities
252
- #{VAR.$parent-selector} .font-thin#{$suffix} {
253
- @include font-thin;
254
- }
255
-
256
- #{VAR.$parent-selector} .font-extralight#{$suffix} {
257
- @include font-extralight;
258
- }
259
-
260
- #{VAR.$parent-selector} .font-light#{$suffix} {
261
- @include font-light;
262
- }
263
-
264
- #{VAR.$parent-selector} .font-normal#{$suffix} {
265
- @include font-normal;
266
- }
267
-
268
- #{VAR.$parent-selector} .font-medium#{$suffix} {
269
- @include font-medium;
270
- }
271
-
272
- #{VAR.$parent-selector} .font-semibold#{$suffix} {
273
- @include font-semibold;
274
- }
275
-
276
- #{VAR.$parent-selector} .font-bold#{$suffix} {
277
- @include font-bold;
278
- }
279
-
280
- #{VAR.$parent-selector} .font-extrabold#{$suffix} {
281
- @include font-extrabold;
282
- }
283
-
284
- #{VAR.$parent-selector} .font-black#{$suffix} {
285
- @include font-black;
261
+ @each $size, $val in VAR.$font-weights {
262
+ #{VAR.$parent-selector} .font-#{$size}#{$suffix} {
263
+ @include font($size);
264
+ }
286
265
  }
287
266
 
288
267
  // Generate line height utilities