matcha-core 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/core.scss ADDED
@@ -0,0 +1,1210 @@
1
+ // Media step breakpoint mixin based on Angular Material lib
2
+ $breakpoints: (
3
+ xs: 'screen and (max-width: 599px)',
4
+ sm: 'screen and (min-width: 600px) and (max-width: 1023px)',
5
+ md: 'screen and (min-width: 1024px) and (max-width: 1439px)',
6
+ lg: 'screen and (min-width: 1440px) and (max-width: 1919px)',
7
+ xl: 'screen and (min-width: 1920px) and (max-width: 5000px)',
8
+ lt-sm: 'screen and (max-width: 599px)',
9
+ lt-md: 'screen and (max-width: 1023px)',
10
+ lt-lg: 'screen and (max-width: 1439px)',
11
+ lt-xl: 'screen and (max-width: 1919px)',
12
+ gt-xs: 'screen and (min-width: 600px)',
13
+ gt-sm: 'screen and (min-width: 1024px)', //old size - 980px
14
+ gt-md: 'screen and (min-width: 1440px)', //old size - 1280px
15
+ gt-lg: 'screen and (min-width: 1920px)'
16
+ ) !default;
17
+
18
+ // Re-map the breakpoints for the helper classes
19
+ $helper-breakpoints: (
20
+ xs: null,
21
+ sm: 'gt-xs',
22
+ md: 'gt-sm',
23
+ lg: 'gt-md',
24
+ xl: 'gt-lg'
25
+ );
26
+
27
+ @mixin media-breakpoint($breakpointName) {
28
+ $mediaQuery: map-get($breakpoints, $breakpointName);
29
+ @if ($mediaQuery == null) {
30
+ @content;
31
+ } @else {
32
+ @media #{$mediaQuery} {
33
+ @content;
34
+ }
35
+ }
36
+ }
37
+
38
+ // -----------------------------------------------------------------------------------------------------
39
+ // @ Size classes | Width and Height
40
+ // -----------------------------------------------------------------------------------------------------
41
+ @mixin _size-classes($prop, $abbrev, $length, $size, $infix: "") {
42
+ .#{$abbrev}#{$infix}-#{$size} {
43
+ #{$prop}: $length;
44
+ }
45
+
46
+ .#{$abbrev}#{$infix}-#{$size}--force {
47
+ #{$prop}: $length !important;
48
+ }
49
+
50
+ .max-#{$abbrev}#{$infix}-#{$size} {
51
+ max-#{$prop}: $length;
52
+ }
53
+
54
+ .max-#{$abbrev}#{$infix}-#{$size}--force {
55
+ max-#{$prop}: $length !important;
56
+ }
57
+
58
+ .min-#{$abbrev}#{$infix}-#{$size} {
59
+ min-#{$prop}: $length;
60
+ }
61
+
62
+ .min-#{$abbrev}#{$infix}-#{$size}--force {
63
+ min-#{$prop}: $length !important;
64
+ }
65
+ }
66
+ @mixin generate-size-classes($helper-breakpoints) {
67
+ @each $breakpoint, $media-size in $helper-breakpoints {
68
+ @include media-breakpoint($media-size) {
69
+ $infix: if($media-size == null, "", "-#{$breakpoint}");
70
+
71
+ @each $prop, $abbrev in (height: h, width: w) {
72
+ // Pixels
73
+ @for $index from 0 through 64 {
74
+ $size: $index * 4;
75
+ $length: #{$size}px;
76
+
77
+ @include _size-classes($prop, $abbrev, $length, $size, $infix);
78
+ }
79
+
80
+ // Percentages
81
+ @for $i from 0 through 20 {
82
+ $i-p: 5 * $i;
83
+ $size-p: 5% * $i;
84
+
85
+ @include _size-classes($prop, $abbrev, $size-p, "#{$i-p}-p", $infix);
86
+ }
87
+
88
+ // Big sizes
89
+ @for $i from 3 through 10 {
90
+ $size: $i * 100;
91
+ $length: #{$size}px;
92
+
93
+ @include _size-classes($prop, $abbrev, $length, $size, $infix);
94
+ }
95
+
96
+ // Auto
97
+ .#{$abbrev}#{$infix}-auto {
98
+ #{$prop}: auto;
99
+ }
100
+
101
+ .#{$abbrev}#{$infix}-auto--force {
102
+ #{$prop}: auto !important;
103
+ }
104
+ }
105
+ }
106
+ }
107
+ }
108
+ @include generate-size-classes($helper-breakpoints);
109
+
110
+ // -----------------------------------------------------------------------------------------------------
111
+ // @ Spacing classes - Margin and Padding
112
+ // Generate spacing values from -64 to 64 jumping from 4 to 4
113
+ // -----------------------------------------------------------------------------------------------------
114
+ @mixin _spacing-classes($prop, $abbrev, $length, $size, $infix: "") {
115
+ .#{$abbrev}#{$infix}-#{$size} {
116
+ #{$prop}: $length;
117
+ }
118
+
119
+ .#{$abbrev}#{$infix}-#{$size}--force {
120
+ #{$prop}: $length !important;
121
+ }
122
+
123
+ .#{$abbrev}x#{$infix}-#{$size} {
124
+ #{$prop}-right: $length;
125
+ #{$prop}-left: $length;
126
+ }
127
+
128
+ .#{$abbrev}x#{$infix}-#{$size}--force {
129
+ #{$prop}-right: $length !important;
130
+ #{$prop}-left: $length !important;
131
+ }
132
+
133
+ .#{$abbrev}y#{$infix}-#{$size} {
134
+ #{$prop}-top: $length;
135
+ #{$prop}-bottom: $length;
136
+ }
137
+
138
+ .#{$abbrev}y#{$infix}-#{$size}--force {
139
+ #{$prop}-top: $length !important;
140
+ #{$prop}-bottom: $length !important;
141
+ }
142
+
143
+ .#{$abbrev}t#{$infix}-#{$size} {
144
+ #{$prop}-top: $length;
145
+ }
146
+
147
+ .#{$abbrev}t#{$infix}-#{$size}--force {
148
+ #{$prop}-top: $length !important;
149
+ }
150
+
151
+ .#{$abbrev}r#{$infix}-#{$size} {
152
+ #{$prop}-right: $length;
153
+ }
154
+
155
+ .#{$abbrev}r#{$infix}-#{$size}--force {
156
+ #{$prop}-right: $length !important;
157
+ }
158
+
159
+ .#{$abbrev}b#{$infix}-#{$size} {
160
+ #{$prop}-bottom: $length;
161
+ }
162
+
163
+ .#{$abbrev}b#{$infix}-#{$size}--force {
164
+ #{$prop}-bottom: $length !important;
165
+ }
166
+
167
+ .#{$abbrev}l#{$infix}-#{$size} {
168
+ #{$prop}-left: $length;
169
+ }
170
+
171
+ .#{$abbrev}l#{$infix}-#{$size}--force {
172
+ #{$prop}-left: $length !important;
173
+ }
174
+ }
175
+ @mixin generate-spacing-classes($helper-breakpoints) {
176
+ @each $breakpoint, $media-size in $helper-breakpoints {
177
+ @include media-breakpoint($media-size) {
178
+ $infix: if($media-size == null, "", "-#{$breakpoint}");
179
+
180
+ @each $prop, $abbrev in (margin: m, padding: p) {
181
+ // For margins, include negative values
182
+ @for $index from -16 through 16 {
183
+ $size: $index * 4;
184
+ $length: #{$size}px;
185
+
186
+ @include _spacing-classes($prop, $abbrev, $length, $size, $infix);
187
+ }
188
+
189
+ // For paddings, only positive values
190
+ @if ($prop == padding) {
191
+ @for $index from 0 through 16 {
192
+ $size: $index * 4;
193
+ $length: #{$size}px;
194
+
195
+ @include _spacing-classes($prop, $abbrev, $length, $size, $infix);
196
+ }
197
+ }
198
+
199
+ // Special auto classes for margin
200
+ @if ($prop == margin) {
201
+ .m#{$infix}-auto {
202
+ margin: auto;
203
+ }
204
+
205
+ .m#{$infix}-auto--force {
206
+ margin: auto !important;
207
+ }
208
+
209
+ .mt#{$infix}-auto {
210
+ margin-top: auto;
211
+ }
212
+
213
+ .mt#{$infix}-auto--force {
214
+ margin-top: auto !important;
215
+ }
216
+
217
+ .mr#{$infix}-auto {
218
+ margin-right: auto;
219
+ }
220
+
221
+ .mr#{$infix}-auto--force {
222
+ margin-right: auto !important;
223
+ }
224
+
225
+ .mb#{$infix}-auto {
226
+ margin-bottom: auto;
227
+ }
228
+
229
+ .mb#{$infix}-auto--force {
230
+ margin-bottom: auto !important;
231
+ }
232
+
233
+ .ml#{$infix}-auto {
234
+ margin-left: auto;
235
+ }
236
+
237
+ .ml#{$infix}-auto--force {
238
+ margin-left: auto !important;
239
+ }
240
+
241
+ .mx#{$infix}-auto {
242
+ margin-right: auto;
243
+ margin-left: auto;
244
+ }
245
+
246
+ .mx#{$infix}-auto--force {
247
+ margin-right: auto !important;
248
+ margin-left: auto !important;
249
+ }
250
+
251
+ .my#{$infix}-auto {
252
+ margin-top: auto;
253
+ margin-bottom: auto;
254
+ }
255
+
256
+ .my#{$infix}-auto--force {
257
+ margin-top: auto !important;
258
+ margin-bottom: auto !important;
259
+ }
260
+ }
261
+ }
262
+ }
263
+ }
264
+ }
265
+ @include generate-spacing-classes($helper-breakpoints);
266
+
267
+ // -------------------------------------------------------------------------------------------------------------------
268
+ // @ Display classes | Flex and Grid
269
+ // -------------------------------------------------------------------------------------------------------------------
270
+
271
+ $grid-prefix: "col";
272
+ @mixin _grid-prop($i) {
273
+ display: grid;
274
+ grid-template-columns: repeat($i, minmax(0, 1fr));
275
+ }
276
+ @mixin generate-layout-grid($grid-prefix, $grid-length, $helper-breakpoints) {
277
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
278
+ @include media-breakpoint($materialBreakpoint) {
279
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
280
+
281
+ .row#{$infix} {
282
+ display: flex;
283
+ flex-direction: column;
284
+ }
285
+
286
+ @for $i from 1 through $grid-length {
287
+ .row#{$infix} > .#{$grid-prefix}-#{$i} {
288
+ flex-basis: #{($i / $grid-length) * 100%};
289
+ }
290
+ .row#{$infix} > .#{$grid-prefix}-offset-#{$i} {
291
+ margin-left: #{($i / $grid-length) * 100%};
292
+ }
293
+ }
294
+
295
+ .row#{$infix} {
296
+ flex-direction: row;
297
+ }
298
+ }
299
+ }
300
+
301
+ [class^="grid-"] {
302
+ display: grid;
303
+ grid-template-columns: minmax(0, 1fr);
304
+ }
305
+
306
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
307
+ @include media-breakpoint($materialBreakpoint) {
308
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
309
+
310
+ @for $i from 1 through $grid-length {
311
+ .grid#{$infix}-#{$i} {
312
+ @include _grid-prop($i);
313
+ }
314
+
315
+ .span#{$infix}-#{$i}c,
316
+ .colspan#{$infix}-#{$i} {
317
+ grid-column-end: span #{$i};
318
+ }
319
+
320
+ .span#{$infix}-#{$i}r,
321
+ .rowspan#{$infix}-#{$i} {
322
+ grid-row-end: span #{$i};
323
+ }
324
+ }
325
+ }
326
+ }
327
+ }
328
+ @mixin generate-layout-flex($grid-prefix, $grid-length, $helper-breakpoints) {
329
+ .row {
330
+ display: flex;
331
+ flex-wrap: wrap;
332
+
333
+ > div[class*="#{$grid-prefix}-"] {
334
+ box-sizing: border-box;
335
+ }
336
+
337
+ > div:not([class*="#{$grid-prefix}-"]) {
338
+ flex: 1;
339
+ }
340
+
341
+ @for $i from 1 through $grid-length {
342
+ .#{$grid-prefix}-#{$i} {
343
+ flex-basis: #{($i / $grid-length) * 100%};
344
+ }
345
+
346
+ .#{$grid-prefix}-offset-#{$i} {
347
+ margin-left: #{($i / $grid-length) * 100%};
348
+ }
349
+ }
350
+
351
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
352
+ @include media-breakpoint($materialBreakpoint) {
353
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
354
+
355
+ @for $i from 1 through $grid-length {
356
+ .#{$grid-prefix}#{$infix}-#{$i} {
357
+ flex-basis: 100%;
358
+ }
359
+
360
+ .#{$grid-prefix}-offset#{$infix}-#{$i} {
361
+ margin-left: 0;
362
+ }
363
+ }
364
+ }
365
+ }
366
+
367
+ @each $classLabel, $cssValue in (align-start flex-start, align-center center, align-end flex-end) {
368
+ > div[class*="#{$grid-prefix}-"].#{$classLabel} {
369
+ align-self: $cssValue;
370
+ }
371
+ }
372
+
373
+ @each $classLabel, $cssValue in (align-start flex-start, align-center center, align-end flex-end, space-around space-around, space-between space-between) {
374
+ &.#{$classLabel} {
375
+ justify-content: $cssValue;
376
+ }
377
+ }
378
+ }
379
+ }
380
+ @include generate-layout-grid($grid-prefix, 12, $helper-breakpoints);
381
+ @include generate-layout-flex($grid-prefix, 12, $helper-breakpoints);
382
+
383
+ // -------------------------------------------------------------------------------------------------------------------
384
+ // @Gaps classes
385
+ // -------------------------------------------------------------------------------------------------------------------
386
+ @mixin generate-gap-classes($helper-breakpoints) {
387
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
388
+ @include media-breakpoint($materialBreakpoint) {
389
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
390
+
391
+ @for $i from 0 through 12 {
392
+ $size: $i * 4;
393
+ .gap#{$infix}-#{$size} {
394
+ column-gap: #{$size}px;
395
+ row-gap: #{$size}px;
396
+ }
397
+ }
398
+ }
399
+ }
400
+ }
401
+ @include generate-gap-classes($helper-breakpoints);
402
+ // Dynamic gaps
403
+ .gap-inside {
404
+ -moz-column-gap: 16px;
405
+ column-gap: 16px;
406
+ row-gap: 16px;
407
+ }
408
+ .gap-outside {
409
+ -moz-column-gap: 16px;
410
+ column-gap: 16px;
411
+ row-gap: 16px;
412
+ }
413
+ @media screen and (min-width: 600px) {
414
+ .gap-outside {
415
+ -moz-column-gap: 24px;
416
+ column-gap: 24px;
417
+ row-gap: 24px;
418
+ }
419
+ }
420
+
421
+ // -----------------------------------------------------------------------------------------------------
422
+ // @ Z-index classes
423
+ // -----------------------------------------------------------------------------------------------------
424
+ @mixin generate-z-index-classes($zIndex, $helper-breakpoints) {
425
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
426
+ @include media-breakpoint($materialBreakpoint) {
427
+
428
+ @for $z from -1 through $zIndex {
429
+ $class-name: if($materialBreakpoint == null, ".z-index-#{$z}", ".z-index-#{$materialBreakpoint}-#{$z}");
430
+ $class-name-force: if($materialBreakpoint == null, ".z-index-#{$z}--force", ".z-index-#{$materialBreakpoint}-#{$z}--force");
431
+
432
+ #{$class-name} {
433
+ z-index: #{$z};
434
+ }
435
+
436
+ #{$class-name-force} {
437
+ z-index: #{$z} !important;
438
+ }
439
+ }
440
+ }
441
+ }
442
+ }
443
+ @include generate-z-index-classes(24, $helper-breakpoints);
444
+
445
+ // -----------------------------------------------------------------------------------------------------
446
+ // @ Order classes
447
+ // -----------------------------------------------------------------------------------------------------
448
+ @mixin generate-order-classes($helper-breakpoints) {
449
+ @each $breakpoint, $breakpointName in $helper-breakpoints {
450
+ @include media-breakpoint($breakpointName) {
451
+ $infix: if($breakpointName == null, "", "-#{$breakpoint}");
452
+
453
+ /* <integer> values */
454
+ @for $i from -12 through 12 {
455
+ .order#{$infix}-#{$i} {
456
+ order: #{$i};
457
+ }
458
+
459
+ .order#{$infix}-#{$i}--force {
460
+ order: #{$i} !important;
461
+ }
462
+ }
463
+
464
+ /* Global values */
465
+ @each $value in (inherit, initial) {
466
+ .order#{$infix}-#{$value} {
467
+ order: #{$value};
468
+ }
469
+
470
+ .order#{$infix}-#{$value}--force {
471
+ order: #{$value} !important;
472
+ }
473
+ }
474
+ }
475
+ }
476
+ }
477
+ @include generate-order-classes($helper-breakpoints);
478
+
479
+ // -----------------------------------------------------------------------------------------------------
480
+ // @ Absolute position alignment classes
481
+ // -----------------------------------------------------------------------------------------------------
482
+ @mixin generate-position-classes($helper-breakpoints) {
483
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
484
+ @include media-breakpoint($materialBreakpoint) {
485
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
486
+
487
+ @each $position in (top, right, bottom, left) {
488
+ .place#{$infix}-#{$position} {
489
+ #{$position}: 0;
490
+ }
491
+
492
+ .place#{$infix}-#{$position}--force {
493
+ #{$position}: 0 !important;
494
+ }
495
+ }
496
+ }
497
+ }
498
+ }
499
+ @include generate-position-classes($helper-breakpoints);
500
+
501
+ // -----------------------------------------------------------------------------------------------------
502
+ // @ Position classes
503
+ // -----------------------------------------------------------------------------------------------------
504
+ @mixin generate-position-classes($helper-breakpoints) {
505
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
506
+ @include media-breakpoint($materialBreakpoint) {
507
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
508
+
509
+ @each $pos in (relative, absolute, static, fixed) {
510
+ .position#{$infix}-#{$pos} {
511
+ position: #{$pos};
512
+ }
513
+
514
+ .position#{$infix}-#{$pos}--force {
515
+ position: #{$pos} !important;
516
+ }
517
+ }
518
+ }
519
+ }
520
+ }
521
+ @include generate-position-classes($helper-breakpoints);
522
+
523
+ // -----------------------------------------------------------------------------------------------------
524
+ // @ Display classes
525
+ // -----------------------------------------------------------------------------------------------------
526
+ @mixin generate-display-classes($helper-breakpoints) {
527
+ @each $breakpoint, $media-size in $helper-breakpoints {
528
+ @include media-breakpoint($media-size) {
529
+ $infix: if($media-size == null, "", "-#{$breakpoint}");
530
+
531
+ @each $class-suffix, $value in (
532
+ none: none,
533
+ inline: inline,
534
+ inline-block: inline-block,
535
+ block: block,
536
+ grid: grid,
537
+ table: table,
538
+ table-cell: table-cell,
539
+ table-row: table-row,
540
+ inline-flex: inline-flex,
541
+ flex: flex
542
+ ) {
543
+ .d#{$infix}-#{$class-suffix} {
544
+ display: $value;
545
+ }
546
+
547
+ .d#{$infix}-#{$class-suffix}--force {
548
+ display: $value !important;
549
+ }
550
+ }
551
+ }
552
+ }
553
+ }
554
+ @include generate-display-classes($helper-breakpoints);
555
+
556
+ // -----------------------------------------------------------------------------------------------------
557
+ // @ Flex classes
558
+ // -----------------------------------------------------------------------------------------------------
559
+ @mixin generate-flex-classes($helper-breakpoints) {
560
+ @each $breakpoint, $media-size in $helper-breakpoints {
561
+ @include media-breakpoint($media-size) {
562
+ $infix: if($media-size == null, "", "-#{$breakpoint}");
563
+
564
+ @each $class-suffix, $value in (
565
+ row: (flex-direction: row),
566
+ row-reverse: (flex-direction: row-reverse),
567
+ column: (flex-direction: column),
568
+ column-reverse: (flex-direction: column-reverse),
569
+
570
+ nowrap: (flex-wrap: nowrap),
571
+ wrap: (flex-wrap: wrap),
572
+
573
+ align-center: (align-items: center),
574
+ align-start: (align-items: flex-start),
575
+ align-end: (align-items: flex-end),
576
+ align-inherit: (align-items: inherit),
577
+ align-initial: (align-items: initial),
578
+
579
+ align-self-end: (align-self: flex-end),
580
+ align-self-start: (align-self: flex-start),
581
+ align-self-inherit: (align-self: inherit),
582
+ align-self-initial: (align-self: initial),
583
+
584
+ center-center: (justify-content: center, align-items: center),
585
+ center: (justify-content: center),
586
+ end: (justify-content: flex-end),
587
+ start: (justify-content: flex-start),
588
+ inherit: (justify-content: inherit),
589
+ initial: (justify-content: initial),
590
+ left: (justify-content: left),
591
+ normal: (justify-content: normal),
592
+ revert: (justify-content: revert),
593
+ right: (justify-content: right),
594
+ space-around: (justify-content: space-around),
595
+ space-between: (justify-content: space-between),
596
+ space-evenly: (justify-content: space-evenly),
597
+ stretch: (justify-content: stretch),
598
+ unset: (justify-content: unset)
599
+ ) {
600
+ $class-name: ".flex#{$infix}-#{$class-suffix}";
601
+ $class-name-force: ".flex#{$infix}-#{$class-suffix}--force";
602
+
603
+ #{$class-name} {
604
+ @each $property, $prop-value in $value {
605
+ #{$property}: #{$prop-value};
606
+ }
607
+ }
608
+
609
+ #{$class-name-force} {
610
+ @each $property, $prop-value in $value {
611
+ #{$property}: #{$prop-value} !important;
612
+ }
613
+ }
614
+ }
615
+ }
616
+ }
617
+ }
618
+ @include generate-flex-classes($helper-breakpoints);
619
+
620
+ // -----------------------------------------------------------------------------------------------------
621
+ // @ Font Weight classes
622
+ // -----------------------------------------------------------------------------------------------------
623
+ @mixin generate-font-weight-classes($helper-breakpoints) {
624
+ @each $breakpoint, $media-size in $helper-breakpoints {
625
+ @include media-breakpoint($media-size) {
626
+ $infix: if($media-size == null, "", "-#{$breakpoint}");
627
+
628
+ @for $index from 1 through 9 {
629
+ $weight: $index * 100;
630
+
631
+ .fw#{$infix}-#{$weight} {
632
+ font-weight: $weight;
633
+ }
634
+
635
+ .fw#{$infix}-#{$weight}--force {
636
+ font-weight: $weight !important;
637
+ }
638
+ }
639
+ }
640
+ }
641
+ }
642
+ @include generate-font-weight-classes($helper-breakpoints);
643
+
644
+ // -----------------------------------------------------------------------------------------------------
645
+ // @ Font Size classes
646
+ // -----------------------------------------------------------------------------------------------------
647
+ @mixin generate-font-size-classes($helper-breakpoints) {
648
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
649
+ @include media-breakpoint($materialBreakpoint) {
650
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
651
+ $index: 0;
652
+ @while $index <= 18 {
653
+ $size: $index * 4;
654
+ .fs#{$infix}-#{$size} {
655
+ font-size: #{$size}px;
656
+ }
657
+ .fs#{$infix}-#{$size}--force {
658
+ font-size: #{$size}px !important;
659
+ }
660
+ $index: $index + 1;
661
+ }
662
+ }
663
+ }
664
+ }
665
+ @include generate-font-size-classes($helper-breakpoints);
666
+
667
+ // -----------------------------------------------------------------------------------------------------
668
+ // @ Line Height classes
669
+ // -----------------------------------------------------------------------------------------------------
670
+ @mixin generate-line-height-classes($helper-breakpoints) {
671
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
672
+ @include media-breakpoint($materialBreakpoint) {
673
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
674
+
675
+ $index: 0;
676
+ @while $index <= 36 {
677
+ $height: $index * 2;
678
+
679
+ .lh#{$infix}-#{$height} {
680
+ line-height: #{$height}px;
681
+ }
682
+
683
+ .lh#{$infix}-#{$height}--force {
684
+ line-height: #{$height}px !important;
685
+ }
686
+
687
+ $index: $index + 1;
688
+ }
689
+ }
690
+ }
691
+ }
692
+ @include generate-line-height-classes($helper-breakpoints);
693
+
694
+ // -----------------------------------------------------------------------------------------------------
695
+ // @ Aspect Ratio classes
696
+ // -----------------------------------------------------------------------------------------------------
697
+ @mixin generate-aspect-ratio-classes($helper-breakpoints) {
698
+ // Aspect ratios definition
699
+ $aspect-ratios: (
700
+ 'auto': 'auto',
701
+ '1x1': '1/1',
702
+ '1x2': '1/2',
703
+ '2x1': '2/1',
704
+ '3x4': '3/4',
705
+ '4x3': '4/3',
706
+ '9x16': '9/16',
707
+ '16x9': '16/9',
708
+ 'half': '0.5',
709
+ 'inherit': 'inherit',
710
+ 'initial': 'initial',
711
+ 'unset': 'unset'
712
+ );
713
+
714
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
715
+ @include media-breakpoint($materialBreakpoint) {
716
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
717
+
718
+ @each $ratio, $value in $aspect-ratios {
719
+ $class-name: ".aspect-ratio#{$infix}-#{$ratio}";
720
+
721
+ #{$class-name} {
722
+ aspect-ratio: #{$value};
723
+ }
724
+
725
+ #{$class-name}--force {
726
+ aspect-ratio: #{$value} !important;
727
+ }
728
+ }
729
+ }
730
+ }
731
+ }
732
+ @include generate-aspect-ratio-classes($helper-breakpoints);
733
+
734
+ // -----------------------------------------------------------------------------------------------------
735
+ // @ Cursor classes
736
+ // -----------------------------------------------------------------------------------------------------
737
+ @mixin generate-cursor-classes($helper-breakpoints) {
738
+ $cursor-types: (
739
+ pointer,
740
+ default,
741
+ grab,
742
+ grabbing,
743
+ move,
744
+ help,
745
+ wait
746
+ );
747
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
748
+ @include media-breakpoint($materialBreakpoint) {
749
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
750
+
751
+ @for $i from 1 through length($cursor-types) {
752
+ $cursor-type: nth($cursor-types, $i);
753
+
754
+ .cursor-#{$cursor-type}#{$infix} {
755
+ cursor: #{$cursor-type};
756
+ }
757
+
758
+ .cursor-#{$cursor-type}#{$infix}--force {
759
+ cursor: #{$cursor-type} !important;
760
+ }
761
+ }
762
+ }
763
+ }
764
+ }
765
+ @include generate-cursor-classes($helper-breakpoints);
766
+
767
+ // -----------------------------------------------------------------------------------------------------
768
+ // @ Opacity
769
+ // -----------------------------------------------------------------------------------------------------
770
+ @mixin generate-opacity-classes($helper-breakpoints) {
771
+ // Definindo os valores de opacidade e seus nomes de classe
772
+ $opacity-values: (
773
+ '0': 0,
774
+ '01': 0.1,
775
+ '02': 0.2,
776
+ '03': 0.3,
777
+ '04': 0.4,
778
+ '05': 0.5,
779
+ '06': 0.6,
780
+ '07': 0.7,
781
+ '08': 0.8,
782
+ '09': 0.9,
783
+ '10': 1.0,
784
+ '1':1
785
+ );
786
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
787
+ @include media-breakpoint($materialBreakpoint) {
788
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
789
+ @each $step, $opacity in $opacity-values {
790
+ .opacity#{$infix}-#{$step} {
791
+ opacity: $opacity;
792
+ }
793
+ .opacity#{$infix}-#{$step}--force {
794
+ opacity: $opacity !important;
795
+ }
796
+ }
797
+ }
798
+ }
799
+ }
800
+ @include generate-opacity-classes($helper-breakpoints);
801
+
802
+ // -----------------------------------------------------------------------------------------------------
803
+ // @ Float & List Style
804
+ // -----------------------------------------------------------------------------------------------------
805
+ @mixin generate-float-list-classes {
806
+ .clearfix::after {
807
+ content: "";
808
+ clear: both;
809
+ display: table;
810
+ }
811
+
812
+ .float-left {
813
+ float: left;
814
+ }
815
+
816
+ .float-right {
817
+ float: right;
818
+ }
819
+
820
+ .list-style-none {
821
+ list-style: none;
822
+ }
823
+
824
+ .list-style-disc {
825
+ list-style: disc;
826
+ }
827
+
828
+ .list-style-dot {
829
+ list-style: dot;
830
+ }
831
+ }
832
+ @include generate-float-list-classes;
833
+
834
+ // -----------------------------------------------------------------------------------------------------
835
+ // @ Text Decoration Helpers
836
+ // -----------------------------------------------------------------------------------------------------
837
+ @mixin generate-text-decoration-classes($helper-breakpoints){
838
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
839
+ @include media-breakpoint($materialBreakpoint) {
840
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
841
+
842
+ .text#{$infix}-decoration-strike,
843
+ .text#{$infix}-strike,
844
+ .text#{$infix}-line-through {
845
+ text-decoration: line-through;
846
+ }
847
+
848
+ .text#{$infix}-decoration-strike--force,
849
+ .text#{$infix}-strike--force,
850
+ .text#{$infix}-line-through--force {
851
+ text-decoration: line-through !important;
852
+ }
853
+
854
+ .text#{$infix}-decoration-none,
855
+ .text#{$infix}-none {
856
+ text-decoration: none;
857
+ }
858
+
859
+ .text#{$infix}-decoration-none--force,
860
+ .text#{$infix}-none--force {
861
+ text-decoration: none !important;
862
+ }
863
+
864
+ .text#{$infix}-super {
865
+ vertical-align: super;
866
+ }
867
+
868
+ .text#{$infix}-super--force {
869
+ vertical-align: super !important;
870
+ }
871
+
872
+ .text#{$infix}-sub {
873
+ vertical-align: sub;
874
+ }
875
+
876
+ .text#{$infix}-sub--force {
877
+ vertical-align: sub !important;
878
+ }
879
+ }
880
+ }
881
+ }
882
+ @include generate-text-decoration-classes($helper-breakpoints);
883
+
884
+ // -----------------------------------------------------------------------------------------------------
885
+ // @ Text Alignment and Transform Helpers
886
+ // -----------------------------------------------------------------------------------------------------
887
+ @mixin generate-text-alignment-classes($helper-breakpoints){
888
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
889
+ @include media-breakpoint($materialBreakpoint) {
890
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
891
+
892
+ .text#{$infix}-capitalize {
893
+ text-transform: capitalize;
894
+ }
895
+
896
+ .text#{$infix}-capitalize--force {
897
+ text-transform: capitalize !important;
898
+ }
899
+
900
+ .text#{$infix}-lowercase {
901
+ text-transform: lowercase;
902
+ }
903
+
904
+ .text#{$infix}-lowercase--force {
905
+ text-transform: lowercase !important;
906
+ }
907
+
908
+ .text#{$infix}-uppercase {
909
+ text-transform: uppercase;
910
+ }
911
+
912
+ .text#{$infix}-uppercase--force {
913
+ text-transform: uppercase !important;
914
+ }
915
+
916
+ .text#{$infix}-nowrap {
917
+ white-space: nowrap;
918
+ }
919
+
920
+ .text#{$infix}-left {
921
+ text-align: left;
922
+ }
923
+
924
+ .text#{$infix}-left--force {
925
+ text-align: left !important;
926
+ }
927
+
928
+ .text#{$infix}-center {
929
+ text-align: center;
930
+ }
931
+
932
+ .text#{$infix}-center--force {
933
+ text-align: center !important;
934
+ }
935
+
936
+ .text#{$infix}-right {
937
+ text-align: right;
938
+ }
939
+
940
+ .text#{$infix}-right--force {
941
+ text-align: right !important;
942
+ }
943
+ }
944
+ }
945
+ }
946
+ @include generate-text-alignment-classes($helper-breakpoints);
947
+
948
+ // -----------------------------------------------------------------------------------------------------
949
+ // @ Text Spacing and Truncation Helpers
950
+ // -----------------------------------------------------------------------------------------------------
951
+ @mixin generate-text-spacing-classes($helper-breakpoints){
952
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
953
+ @include media-breakpoint($materialBreakpoint) {
954
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
955
+
956
+ .text#{$infix}-boxed {
957
+ border-radius: 2px;
958
+ padding: 4px 8px;
959
+ margin: 0 8px;
960
+ font-size: 11px;
961
+ font-weight: 600;
962
+ white-space: nowrap;
963
+ }
964
+
965
+ .text#{$infix}-truncate,
966
+ .text#{$infix}-ellipsis {
967
+ display: block;
968
+ overflow: hidden;
969
+ text-overflow: ellipsis;
970
+ white-space: nowrap;
971
+ }
972
+ }
973
+ }
974
+ }
975
+ @include generate-text-spacing-classes($helper-breakpoints);
976
+
977
+ // -----------------------------------------------------------------------------------------------------
978
+ // @ Overflow Helpers
979
+ // -----------------------------------------------------------------------------------------------------
980
+ @mixin generate-overflow-classes($helper-breakpoints){
981
+ $overflow-classes: (
982
+ auto: auto,
983
+ scroll: scroll,
984
+ hidden: hidden,
985
+ overlay: overlay
986
+ );
987
+
988
+ $overflow-directions: (
989
+ x: (auto: auto, scroll: scroll, hidden: hidden, overlay: overlay),
990
+ y: (auto: auto, scroll: scroll, hidden: hidden, overlay: overlay)
991
+ );
992
+
993
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
994
+ @include media-breakpoint($materialBreakpoint) {
995
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
996
+
997
+ // Classes para overflow geral
998
+ @each $class, $value in $overflow-classes {
999
+ .overflow-#{$class}#{$infix} {
1000
+ overflow: $value;
1001
+ }
1002
+ .overflow-#{$class}#{$infix}--force {
1003
+ overflow: $value !important;
1004
+ }
1005
+ }
1006
+
1007
+ // Classes para overflow no eixo x
1008
+ @each $class, $value in map-get($overflow-directions, x) {
1009
+ .overflow-x-#{$class}#{$infix} {
1010
+ overflow-x: $value;
1011
+ }
1012
+ .overflow-x-#{$class}#{$infix}--force {
1013
+ overflow-x: $value !important;
1014
+ }
1015
+ }
1016
+
1017
+ // Classes para overflow no eixo y
1018
+ @each $class, $value in map-get($overflow-directions, y) {
1019
+ .overflow-y-#{$class}#{$infix} {
1020
+ overflow-y: $value;
1021
+ }
1022
+ .overflow-y-#{$class}#{$infix}--force {
1023
+ overflow-y: $value !important;
1024
+ }
1025
+ }
1026
+ }
1027
+ }
1028
+ }
1029
+ @include generate-overflow-classes($helper-breakpoints);
1030
+
1031
+ // -----------------------------------------------------------------------------------------------------
1032
+ // @ Border Size Helpers
1033
+ // -----------------------------------------------------------------------------------------------------
1034
+ @mixin generate-border-size-classes($helper-breakpoints){
1035
+ $border-directions: (bottom: bb, top: bt, left: bl, right: br);
1036
+
1037
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
1038
+ @include media-breakpoint($materialBreakpoint) {
1039
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
1040
+
1041
+ @for $i from 0 through 4 {
1042
+ $border-value: $i * 2;
1043
+ $border-suffix: "-#{$border-value}";
1044
+
1045
+ // Classes para borda geral
1046
+ .border#{$infix}#{$border-suffix},
1047
+ .b#{$infix}#{$border-suffix} {
1048
+ border: #{$border-value}px solid;
1049
+ }
1050
+
1051
+ // Classes para bordas individuais
1052
+ @each $direction, $abbrev in $border-directions {
1053
+ .border-#{$direction}#{$infix}#{$border-suffix},
1054
+ .#{$abbrev}#{$infix}#{$border-suffix} {
1055
+ border-#{$direction}: #{$border-value}px solid;
1056
+ }
1057
+ .border-#{$direction}#{$infix}#{$border-suffix}--force,
1058
+ .#{$abbrev}#{$infix}#{$border-suffix}--force {
1059
+ border-#{$direction}: #{$border-value}px solid !important;
1060
+ }
1061
+ }
1062
+ }
1063
+ }
1064
+ }
1065
+
1066
+ // Classe para borda nula
1067
+ .border-none {
1068
+ border: none !important;
1069
+ }
1070
+ }
1071
+ @include generate-border-size-classes($helper-breakpoints);
1072
+
1073
+ // -----------------------------------------------------------------------------------------------------
1074
+ // @ Border Radius Helpers
1075
+ // -----------------------------------------------------------------------------------------------------
1076
+ @mixin _border-radius-generic($breakpoint) {
1077
+ $infix: if($breakpoint == null, "", "-#{$breakpoint}");
1078
+ // Classes para todos os cantos e para formatos especiais
1079
+ @for $i from 0 through 8 {
1080
+ $radius-value: $i * 2;
1081
+ $radius-suffix: "-#{$radius-value}";
1082
+
1083
+ .radius#{$radius-suffix} {
1084
+ border-radius: #{$radius-value}px; // Sem !important
1085
+ }
1086
+
1087
+ .radius#{$radius-suffix}--force {
1088
+ border-radius: #{$radius-value}px !important; // Com !important
1089
+ }
1090
+ }
1091
+ .radius#{$infix}-circle,
1092
+ .radius#{$infix}-full,
1093
+ .radius#{$infix}-round {
1094
+ border-radius: 999px !important;
1095
+ }
1096
+ }
1097
+ @mixin _border-radius-individual($direction, $breakpoint) {
1098
+ // Define o sufixo do breakpoint
1099
+ $infix: if($breakpoint == null, "", "-#{$breakpoint}");
1100
+
1101
+ // Seletores para as classes de borda
1102
+ $direction-selector: unquote(".radius#{$infix}-#{$direction}");
1103
+
1104
+ // Aplica o raio dependendo da direção
1105
+ @for $i from 0 through 8 {
1106
+ $radius-value: $i * 2;
1107
+ $radius-suffix: "-#{$radius-value}";
1108
+
1109
+ @if $direction == bottom {
1110
+ #{$direction-selector}#{$radius-suffix} {
1111
+ border-radius: 0 0 #{$radius-value}px #{$radius-value}px; // Sem !important
1112
+ }
1113
+
1114
+ #{$direction-selector}#{$radius-suffix}--force {
1115
+ border-radius: 0 0 #{$radius-value}px #{$radius-value}px !important; // Com !important
1116
+ }
1117
+ } @else if $direction == top {
1118
+ #{$direction-selector}#{$radius-suffix} {
1119
+ border-radius: #{$radius-value}px #{$radius-value}px 0 0; // Sem !important
1120
+ }
1121
+
1122
+ #{$direction-selector}#{$radius-suffix}--force {
1123
+ border-radius: #{$radius-value}px #{$radius-value}px 0 0 !important; // Com !important
1124
+ }
1125
+ } @else if $direction == left {
1126
+ #{$direction-selector}#{$radius-suffix} {
1127
+ border-radius: #{$radius-value}px 0 0 #{$radius-value}px; // Sem !important
1128
+ }
1129
+
1130
+ #{$direction-selector}#{$radius-suffix}--force {
1131
+ border-radius: #{$radius-value}px 0 0 #{$radius-value}px !important; // Com !important
1132
+ }
1133
+ } @else if $direction == right {
1134
+ #{$direction-selector}#{$radius-suffix} {
1135
+ border-radius: 0 #{$radius-value}px #{$radius-value}px 0; // Sem !important
1136
+ }
1137
+
1138
+ #{$direction-selector}#{$radius-suffix}--force {
1139
+ border-radius: 0 #{$radius-value}px #{$radius-value}px 0 !important; // Com !important
1140
+ }
1141
+ }
1142
+ }
1143
+ }
1144
+ @mixin generate-border-radius-classes($helper-breakpoints) {
1145
+ // Aplicar os mixins para cada breakpoint
1146
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
1147
+ @include media-breakpoint($materialBreakpoint) {
1148
+ @include _border-radius-generic($breakpoint);
1149
+ // Aplica as classes individuais para cada direção de borda com e sem !important
1150
+ @each $direction in (bottom, top, left, right) {
1151
+ @include _border-radius-individual($direction, $breakpoint);
1152
+ }
1153
+ }
1154
+ }
1155
+ }
1156
+ @include generate-border-radius-classes($helper-breakpoints);
1157
+
1158
+ // -----------------------------------------------------------------------------------------------------
1159
+ // @ Hover - Show/Hide
1160
+ // -----------------------------------------------------------------------------------------------------
1161
+ @mixin generate-hover-show-hide-classes {
1162
+ .on-hover-show:hover {
1163
+ opacity: 1;
1164
+ }
1165
+ .on-hover-hide:hover {
1166
+ opacity: 0;
1167
+ }
1168
+ }
1169
+ @include generate-hover-show-hide-classes;
1170
+
1171
+ // -----------------------------------------------------------------------------------------------------
1172
+ // @ Transition
1173
+ // -----------------------------------------------------------------------------------------------------
1174
+ @mixin generate-transition-classes() {
1175
+ $durations: (100, 300);
1176
+ $easing: ('linear', 'ease-in', 'ease-out', 'ease-in-out');
1177
+ @each $duration in $durations {
1178
+ @each $ease in $easing {
1179
+ $class-suffix: if($ease == 'linear', 'l', if($ease == 'ease-in', 'ei', if($ease == 'ease-out', 'eo', 'eio')));
1180
+ .ts-#{$duration}-#{$class-suffix} {
1181
+ transition: all #{$duration}ms #{$ease};
1182
+ }
1183
+ }
1184
+ }
1185
+ }
1186
+ @include generate-transition-classes();
1187
+
1188
+ // -----------------------------------------------------------------------------------------------------
1189
+ // @ Rotate Animation
1190
+ // -----------------------------------------------------------------------------------------------------
1191
+ @mixin generate-rotate-animation-classes() {
1192
+ // Define as durações desejadas para a animação de rotação
1193
+ $durations: (1, 2, 3);
1194
+ @each $duration in $durations {
1195
+ .rotate-infinity-#{$duration}s {
1196
+ animation: spin #{$duration}s infinite;
1197
+ }
1198
+ }
1199
+ }
1200
+ // Define a keyframes para a animação de rotação
1201
+ @keyframes spin {
1202
+ 0% {
1203
+ transform: rotate(0deg);
1204
+ }
1205
+
1206
+ 100% {
1207
+ transform: rotate(360deg);
1208
+ }
1209
+ }
1210
+ @include generate-rotate-animation-classes();