matcha-core 1.1.14 → 1.1.16

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 CHANGED
@@ -57,6 +57,18 @@ $helper-breakpoints: (
57
57
  }
58
58
  }
59
59
 
60
+ // Define the variable for the base size (usually 16 pixels = 1 rem).
61
+ $base-font-size: 16px;
62
+
63
+ // Function to convert pixels to rem.
64
+ @function px-to-rem($value-in-px) {
65
+ @if $value-in-px != 0 {
66
+ @return calc($value-in-px / $base-font-size) * 1rem;
67
+ } @else {
68
+ @return $value-in-px;
69
+ }
70
+ }
71
+
60
72
  // -----------------------------------------------------------------------------------------------------
61
73
  // @ Size classes | Width and Height
62
74
  // -----------------------------------------------------------------------------------------------------
@@ -1310,3 +1322,38 @@ $helper-breakpoints: (
1310
1322
  }
1311
1323
  }
1312
1324
  @include generate-line-clamp-classes($helper-breakpoints);
1325
+
1326
+ // -----------------------------------------------------------------------------------------------------
1327
+ // @ Masonry
1328
+ // -----------------------------------------------------------------------------------------------------
1329
+ @mixin generate-masonry-classes($helper-breakpoints){
1330
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
1331
+ @include media-breakpoint($materialBreakpoint) {
1332
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
1333
+ @for $i from 1 through 12 {
1334
+ // Classes para borda geral
1335
+ .masonry#{$infix}-#{$i}{
1336
+ column-count: $i;
1337
+ > *{
1338
+ break-inside: avoid;
1339
+ display: inline-block;
1340
+ width: 100%;
1341
+ }
1342
+ }
1343
+ }
1344
+ @for $i from 0 through 12 {
1345
+ $size: $i * 4;
1346
+ // Classes para borda geral
1347
+ .masonry-gap#{$infix}-#{$size}{
1348
+ column-gap: #{$size}px;
1349
+ > *{
1350
+ margin-bottom: #{$size}px;
1351
+ }
1352
+ }
1353
+ }
1354
+ }
1355
+ }
1356
+ }
1357
+ @include generate-masonry-classes($helper-breakpoints);
1358
+
1359
+