matcha-core 1.1.2 → 1.1.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.
package/core.scss CHANGED
@@ -274,29 +274,6 @@ $helper-breakpoints: (
274
274
  @mixin generate-layout-grid($helper-breakpoints) {
275
275
  $grid-length: 12;
276
276
  $grid-prefix: "col";
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
277
 
301
278
  [class^="grid-"] {
302
279
  display: grid;
@@ -413,17 +390,17 @@ $helper-breakpoints: (
413
390
  // @ Z-index classes
414
391
  // -----------------------------------------------------------------------------------------------------
415
392
  @mixin generate-z-index-classes($helper-breakpoints) {
416
- $zIndex: 24;
417
- @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
418
- @include media-breakpoint($materialBreakpoint) {
419
- @for $z from -1 through $zIndex {
420
- $class-name: if($materialBreakpoint == null, ".z-index-#{$z}", ".z-index-#{$materialBreakpoint}-#{$z}");
421
- $class-name-force: if($materialBreakpoint == null, ".z-index-#{$z}--force", ".z-index-#{$materialBreakpoint}-#{$z}--force");
422
- #{$class-name} {
423
- z-index: #{$z};
393
+ @each $breakpoint, $breakpointName in $helper-breakpoints {
394
+ @include media-breakpoint($breakpointName) {
395
+ $infix: if($breakpointName == null, "", "-#{$breakpoint}");
396
+
397
+ @for $i from -1 through 24 {
398
+ .z-index#{$infix}-#{$i} {
399
+ z-index: #{$i};
424
400
  }
425
- #{$class-name-force} {
426
- z-index: #{$z} !important;
401
+
402
+ .z-index#{$infix}-#{$i}--force {
403
+ z-index: #{$i} !important;
427
404
  }
428
405
  }
429
406
  }
@@ -1003,30 +980,30 @@ $helper-breakpoints: (
1003
980
 
1004
981
  // Classes para overflow geral
1005
982
  @each $class, $value in $overflow-classes {
1006
- .overflow-#{$class}#{$infix} {
983
+ .overflow#{$infix}-#{$class} {
1007
984
  overflow: $value;
1008
985
  }
1009
- .overflow-#{$class}#{$infix}--force {
986
+ .overflow#{$infix}-#{$class}--force {
1010
987
  overflow: $value !important;
1011
988
  }
1012
989
  }
1013
990
 
1014
991
  // Classes para overflow no eixo x
1015
992
  @each $class, $value in map-get($overflow-directions, x) {
1016
- .overflow-x-#{$class}#{$infix} {
993
+ .overflow-x#{$infix}-#{$class} {
1017
994
  overflow-x: $value;
1018
995
  }
1019
- .overflow-x-#{$class}#{$infix}--force {
996
+ .overflow-x#{$infix}-#{$class}--force {
1020
997
  overflow-x: $value !important;
1021
998
  }
1022
999
  }
1023
1000
 
1024
1001
  // Classes para overflow no eixo y
1025
1002
  @each $class, $value in map-get($overflow-directions, y) {
1026
- .overflow-y-#{$class}#{$infix} {
1003
+ .overflow-y#{$infix}-#{$class} {
1027
1004
  overflow-y: $value;
1028
1005
  }
1029
- .overflow-y-#{$class}#{$infix}--force {
1006
+ .overflow-y#{$infix}-#{$class}--force {
1030
1007
  overflow-y: $value !important;
1031
1008
  }
1032
1009
  }
@@ -1077,12 +1054,73 @@ $helper-breakpoints: (
1077
1054
  }
1078
1055
  @include generate-border-size-classes($helper-breakpoints);
1079
1056
 
1057
+
1058
+ // -----------------------------------------------------------------------------------------------------
1059
+ // @ Border Size Helpers
1060
+ // -----------------------------------------------------------------------------------------------------
1061
+ @mixin generate-radius-classes($helper-breakpoints){
1062
+ $radius-directions: (bottom: b, top: t, left: l, right: r);
1063
+
1064
+ @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
1065
+ @include media-breakpoint($materialBreakpoint) {
1066
+ $infix: if($materialBreakpoint == null, "", "-#{$breakpoint}");
1067
+
1068
+ @for $i from 0 through 8 {
1069
+ $radius-value: $i * 2;
1070
+ $radius-suffix: "-#{$radius-value}";
1071
+
1072
+ // Classes para borda geral
1073
+ .radius#{$infix}#{$radius-suffix} {
1074
+ border-radius: #{$radius-value}px; // Sem !important
1075
+ }
1076
+
1077
+ // Classes para bordas individuais
1078
+ @each $direction, $abbrev in $radius-directions {
1079
+ @if $direction == bottom {
1080
+ .radius#{$infix}-#{$direction}#{$radius-suffix} {
1081
+ border-radius: 0 0 #{$radius-value}px #{$radius-value}px; // Sem !important
1082
+ }
1083
+
1084
+ .radius#{$infix}-#{$direction}#{$radius-suffix}--force {
1085
+ border-radius: 0 0 #{$radius-value}px #{$radius-value}px !important; // Com !important
1086
+ }
1087
+ } @else if $direction == top {
1088
+ .radius#{$infix}-#{$direction}#{$radius-suffix} {
1089
+ border-radius: #{$radius-value}px #{$radius-value}px 0 0; // Sem !important
1090
+ }
1091
+
1092
+ .radius#{$infix}-#{$direction}#{$radius-suffix}--force {
1093
+ border-radius: #{$radius-value}px #{$radius-value}px 0 0 !important; // Com !important
1094
+ }
1095
+ } @else if $direction == left {
1096
+ .radius#{$infix}-#{$direction}#{$radius-suffix} {
1097
+ border-radius: #{$radius-value}px 0 0 #{$radius-value}px; // Sem !important
1098
+ }
1099
+
1100
+ .radius#{$infix}-#{$direction}#{$radius-suffix}--force {
1101
+ border-radius: #{$radius-value}px 0 0 #{$radius-value}px !important; // Com !important
1102
+ }
1103
+ } @else if $direction == right {
1104
+ .radius#{$infix}-#{$direction}#{$radius-suffix} {
1105
+ border-radius: 0 #{$radius-value}px #{$radius-value}px 0; // Sem !important
1106
+ }
1107
+ }
1108
+ }
1109
+ }
1110
+ }
1111
+ }
1112
+ // Classe para borda nula
1113
+ .border-none {
1114
+ border: none !important;
1115
+ }
1116
+ }
1117
+ @include generate-radius-classes($helper-breakpoints);
1118
+
1080
1119
  // -----------------------------------------------------------------------------------------------------
1081
1120
  // @ Border Radius Helpers
1082
1121
  // -----------------------------------------------------------------------------------------------------
1083
- @mixin _border-radius-generic($breakpoint) {
1084
- $infix: if($breakpoint == null, "", "-#{$breakpoint}");
1085
- // Classes para todos os cantos e para formatos especiais
1122
+ @mixin generate-border-radius-classes($helper-breakpoints) {
1123
+ // Aplicar os mixins para cada breakpoint
1086
1124
  @for $i from 0 through 8 {
1087
1125
  $radius-value: $i * 2;
1088
1126
  $radius-suffix: "-#{$radius-value}";
@@ -1095,67 +1133,68 @@ $helper-breakpoints: (
1095
1133
  border-radius: #{$radius-value}px !important; // Com !important
1096
1134
  }
1097
1135
  }
1098
- .radius#{$infix}-circle,
1099
- .radius#{$infix}-full,
1100
- .radius#{$infix}-round {
1136
+ // Classes para todos os cantos e para formatos especiais
1137
+ .radius-circle,
1138
+ .radius-full,
1139
+ .radius-round {
1101
1140
  border-radius: 999px !important;
1102
1141
  }
1103
- }
1104
- @mixin _border-radius-individual($direction, $breakpoint) {
1105
- // Define o sufixo do breakpoint
1106
- $infix: if($breakpoint == null, "", "-#{$breakpoint}");
1107
-
1108
- // Seletores para as classes de borda
1109
- $direction-selector: unquote(".radius#{$infix}-#{$direction}");
1110
1142
 
1111
- // Aplica o raio dependendo da direção
1112
- @for $i from 0 through 8 {
1113
- $radius-value: $i * 2;
1114
- $radius-suffix: "-#{$radius-value}";
1115
-
1116
- @if $direction == bottom {
1117
- #{$direction-selector}#{$radius-suffix} {
1118
- border-radius: 0 0 #{$radius-value}px #{$radius-value}px; // Sem !important
1119
- }
1120
-
1121
- #{$direction-selector}#{$radius-suffix}--force {
1122
- border-radius: 0 0 #{$radius-value}px #{$radius-value}px !important; // Com !important
1123
- }
1124
- } @else if $direction == top {
1125
- #{$direction-selector}#{$radius-suffix} {
1126
- border-radius: #{$radius-value}px #{$radius-value}px 0 0; // Sem !important
1127
- }
1128
-
1129
- #{$direction-selector}#{$radius-suffix}--force {
1130
- border-radius: #{$radius-value}px #{$radius-value}px 0 0 !important; // Com !important
1131
- }
1132
- } @else if $direction == left {
1133
- #{$direction-selector}#{$radius-suffix} {
1134
- border-radius: #{$radius-value}px 0 0 #{$radius-value}px; // Sem !important
1135
- }
1136
-
1137
- #{$direction-selector}#{$radius-suffix}--force {
1138
- border-radius: #{$radius-value}px 0 0 #{$radius-value}px !important; // Com !important
1139
- }
1140
- } @else if $direction == right {
1141
- #{$direction-selector}#{$radius-suffix} {
1142
- border-radius: 0 #{$radius-value}px #{$radius-value}px 0; // Sem !important
1143
- }
1144
-
1145
- #{$direction-selector}#{$radius-suffix}--force {
1146
- border-radius: 0 #{$radius-value}px #{$radius-value}px 0 !important; // Com !important
1147
- }
1148
- }
1149
- }
1150
- }
1151
- @mixin generate-border-radius-classes($helper-breakpoints) {
1152
- // Aplicar os mixins para cada breakpoint
1153
1143
  @each $breakpoint, $materialBreakpoint in $helper-breakpoints {
1154
1144
  @include media-breakpoint($materialBreakpoint) {
1155
- @include _border-radius-generic($breakpoint);
1156
- // Aplica as classes individuais para cada direção de borda com e sem !important
1145
+ // Define o sufixo do breakpoint
1146
+ $infix: if($breakpoint == null, "", "-#{$breakpoint}");
1147
+
1157
1148
  @each $direction in (bottom, top, left, right) {
1158
- @include _border-radius-individual($direction, $breakpoint);
1149
+ // Seletores para as classes de borda
1150
+ // $direction-selector: unquote(".radius#{$infix}-#{$direction}");
1151
+
1152
+ // Aplica o raio dependendo da direção
1153
+ @for $i from 0 through 8 {
1154
+ $radius-value: $i * 2;
1155
+ $radius-suffix: "-#{$radius-value}";
1156
+
1157
+ @if $direction == bottom {
1158
+ .radius#{$infix}-#{$direction}#{$radius-suffix} {
1159
+ border-radius: 0 0 #{$radius-value}px #{$radius-value}px; // Sem !important
1160
+ }
1161
+
1162
+ .radius#{$infix}-#{$direction}#{$radius-suffix}--force {
1163
+ border-radius: 0 0 #{$radius-value}px #{$radius-value}px !important; // Com !important
1164
+ }
1165
+ } @else if $direction == top {
1166
+ .radius#{$infix}-#{$direction}#{$radius-suffix} {
1167
+ border-radius: #{$radius-value}px #{$radius-value}px 0 0; // Sem !important
1168
+ }
1169
+
1170
+ .radius#{$infix}-#{$direction}#{$radius-suffix}--force {
1171
+ border-radius: #{$radius-value}px #{$radius-value}px 0 0 !important; // Com !important
1172
+ }
1173
+ } @else if $direction == left {
1174
+ .radius#{$infix}-#{$direction}#{$radius-suffix} {
1175
+ border-radius: #{$radius-value}px 0 0 #{$radius-value}px; // Sem !important
1176
+ }
1177
+
1178
+ .radius#{$infix}-#{$direction}#{$radius-suffix}--force {
1179
+ border-radius: #{$radius-value}px 0 0 #{$radius-value}px !important; // Com !important
1180
+ }
1181
+ } @else if $direction == right {
1182
+ .radius#{$infix}-#{$direction}#{$radius-suffix} {
1183
+ border-radius: 0 #{$radius-value}px #{$radius-value}px 0; // Sem !important
1184
+ }
1185
+
1186
+ .radius#{$infix}-#{$direction}#{$radius-suffix}--force {
1187
+ border-radius: 0 #{$radius-value}px #{$radius-value}px 0 !important; // Com !important
1188
+ }
1189
+ }
1190
+ }
1191
+ }
1192
+
1193
+ // Classes para todos os cantos e para formatos especiais
1194
+ .radius#{$infix}-circle,
1195
+ .radius#{$infix}-full,
1196
+ .radius#{$infix}-round {
1197
+ border-radius: 999px !important;
1159
1198
  }
1160
1199
  }
1161
1200
  }