yummacss 1.0.3 → 1.1.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.
@@ -1,22 +1,22 @@
1
1
  @use "sass:math";
2
2
 
3
3
  $utilities: (
4
-
5
4
  // borders & background
6
- "border-width": (
7
- "prefix": "b",
8
- "values": (
9
- "0": $base-border * 0,
10
- "1": $base-border,
11
- "2": $base-border * 2,
12
- "3": $base-border * 4,
13
- "4": $base-border * 6,
14
- "5": $base-border * 8,
15
- "6": $base-border * 10,
16
- "7": $base-border * 12,
17
- "8": $base-border * 14
18
- )
19
- ),
5
+ "border-width":
6
+ (
7
+ "prefix": "b",
8
+ "values": (
9
+ "0": $base-border * 0,
10
+ "1": $base-border,
11
+ "2": $base-border * 2,
12
+ "3": $base-border * 4,
13
+ "4": $base-border * 6,
14
+ "5": $base-border * 8,
15
+ "6": $base-border * 10,
16
+ "7": $base-border * 12,
17
+ "8": $base-border * 14
18
+ )
19
+ ),
20
20
 
21
21
  "border-bottom-width": (
22
22
  "prefix": "bb",
@@ -159,39 +159,41 @@ $utilities: (
159
159
  "prefix": "bs",
160
160
  "values": (
161
161
  "default": 1px 3px 5px rgba(0, 0, 0, 0.1),
162
- "xsm": 1px 3px 5px -3px rgba(0, 0, 0, 0.1),
162
+ "xs": 1px 3px 5px -3px rgba(0, 0, 0, 0.1),
163
163
  "sm": 1px 3px 5px -2px rgba(0, 0, 0, 0.1),
164
164
  "md": 1px 3px 5px -1px rgba(0, 0, 0, 0.1),
165
165
  "lg": 1px 3px 5px 1px rgba(0, 0, 0, 0.1),
166
- "xlg": 1px 3px 5px 2px rgba(0, 0, 0, 0.1)
166
+ "xl": 1px 3px 5px 2px rgba(0, 0, 0, 0.1)
167
167
  )
168
168
  ),
169
169
 
170
170
  // box model
171
- "box-sizing": (
172
- "prefix": "bs",
173
- "values": (
174
- "bb": border-box,
175
- "cb": content-box
176
- )
177
- ),
171
+ "box-sizing":
172
+ (
173
+ "prefix": "bs",
174
+ "values": (
175
+ "bb": border-box,
176
+ "cb": content-box
177
+ )
178
+ ),
178
179
 
179
180
  // flexbox & grid
180
- "align-content": (
181
- "prefix": "ac",
182
- "values": (
183
- "c": center,
184
- "start": start,
185
- "e": end,
186
- "fs": flex-start,
187
- "fe": flex-end,
188
- "n": normal,
189
- "sb": space-between,
190
- "sa": space-around,
191
- "se": space-evenly,
192
- "stretch": stretch
193
- )
194
- ),
181
+ "align-content":
182
+ (
183
+ "prefix": "ac",
184
+ "values": (
185
+ "c": center,
186
+ "start": start,
187
+ "e": end,
188
+ "fs": flex-start,
189
+ "fe": flex-end,
190
+ "n": normal,
191
+ "sb": space-between,
192
+ "sa": space-around,
193
+ "se": space-evenly,
194
+ "stretch": stretch
195
+ )
196
+ ),
195
197
 
196
198
  "align-items": (
197
199
  "prefix": "ai",
@@ -454,13 +456,14 @@ $utilities: (
454
456
  ),
455
457
 
456
458
  // miscellaneous
457
- "appearance": (
458
- "prefix": "a",
459
- "values": (
460
- "none": none,
461
- "auto": auto
462
- )
463
- ),
459
+ "appearance":
460
+ (
461
+ "prefix": "a",
462
+ "values": (
463
+ "none": none,
464
+ "auto": auto
465
+ )
466
+ ),
464
467
 
465
468
  "cursor": (
466
469
  "prefix": "c",
@@ -505,16 +508,17 @@ $utilities: (
505
508
  ),
506
509
 
507
510
  // positioning
508
- "overflow": (
509
- "prefix": "ovf",
510
- "values": (
511
- "v": visible,
512
- "h": hidden,
513
- "c": clip,
514
- "s": scroll,
515
- "auto": auto
516
- )
517
- ),
511
+ "overflow":
512
+ (
513
+ "prefix": "ovf",
514
+ "values": (
515
+ "v": visible,
516
+ "h": hidden,
517
+ "c": clip,
518
+ "s": scroll,
519
+ "auto": auto
520
+ )
521
+ ),
518
522
 
519
523
  "overflow-x": (
520
524
  "prefix": "ovf-x",
@@ -539,7 +543,7 @@ $utilities: (
539
543
  ),
540
544
 
541
545
  "columns": (
542
- "prefix": "col",
546
+ "prefix": "cols",
543
547
  "values": (
544
548
  "1": $base-columns,
545
549
  "2": $base-columns * 2,
@@ -734,15 +738,17 @@ $utilities: (
734
738
  ),
735
739
 
736
740
  // typography & text
737
- "font-size": (
738
- "prefix": "fs",
739
- "values": (
740
- "sm": $base-font-size-sm,
741
- "md": $base-font-size,
742
- "lg": $base-font-size-lg,
743
- "xlg": $base-font-size-xlg
744
- )
745
- ),
741
+ "font-size":
742
+ (
743
+ "prefix": "fs",
744
+ "values": (
745
+ "xs": $base-font-size-xs,
746
+ "sm": $base-font-size-sm,
747
+ "md": $base-font-size-md,
748
+ "lg": $base-font-size-lg,
749
+ "xl": $base-font-size-xl
750
+ )
751
+ ),
746
752
 
747
753
  "font-weight": (
748
754
  "prefix": "fw",
@@ -760,7 +766,7 @@ $utilities: (
760
766
  ),
761
767
 
762
768
  "list-style-type": (
763
- "prefix": "tst",
769
+ "prefix": "lst",
764
770
  "values": (
765
771
  "d": disc,
766
772
  "c": circle,
@@ -822,8 +828,7 @@ $utilities: (
822
828
  "n": normal,
823
829
  "bw": break-word
824
830
  )
825
- ),
826
-
831
+ )
827
832
  );
828
833
 
829
834
  @for $i from 0 through 100 {
@@ -853,6 +858,11 @@ $utilities: (
853
858
  min-width: $i * $base-width;
854
859
  }
855
860
 
861
+ .dim-#{$suffix} {
862
+ height: $i * $base-height;
863
+ width: $i * $base-width;
864
+ }
865
+
856
866
  .m-#{$i} {
857
867
  margin: $i * $base-margin;
858
868
  }
@@ -935,6 +945,7 @@ $utilities: (
935
945
  }
936
946
  }
937
947
 
948
+ // height & width
938
949
  @each $key, $value in $custom-values {
939
950
  .h-#{$key} {
940
951
  height: $value;
@@ -959,8 +970,14 @@ $utilities: (
959
970
  .min-w-#{$key} {
960
971
  min-width: $value;
961
972
  }
973
+
974
+ .dim-#{$key} {
975
+ height: $value;
976
+ width: $value;
977
+ }
962
978
  }
963
979
 
980
+ // margin & padding
964
981
  @each $key, $value in $custom-values {
965
982
  @if $key == "auto" {
966
983
  .m-#{$key} {
@@ -1005,6 +1022,7 @@ $utilities: (
1005
1022
  }
1006
1023
  }
1007
1024
 
1025
+ // viewport height
1008
1026
  @each $key, $value in $custom-height-values {
1009
1027
  .h-#{$key} {
1010
1028
  height: $value;
@@ -1019,6 +1037,7 @@ $utilities: (
1019
1037
  }
1020
1038
  }
1021
1039
 
1040
+ // viewport width
1022
1041
  @each $key, $value in $custom-width-values {
1023
1042
  .w-#{$key} {
1024
1043
  width: $value;
@@ -1031,4 +1050,223 @@ $utilities: (
1031
1050
  .min-w-#{$key} {
1032
1051
  min-width: $value;
1033
1052
  }
1034
- }
1053
+ }
1054
+
1055
+ @mixin breakpoint-classes($breakpoint) {
1056
+ @media (min-width: map-get($breakpoints, $breakpoint)) {
1057
+ .#{$breakpoint}\: {
1058
+ @for $i from 0 through 100 {
1059
+ $suffix: #{$i};
1060
+
1061
+ &h-#{$suffix} {
1062
+ height: $i * $base-height;
1063
+ }
1064
+
1065
+ &max-h-#{$suffix} {
1066
+ max-height: $i * $base-height;
1067
+ }
1068
+
1069
+ &min-h-#{$suffix} {
1070
+ min-height: $i * $base-height;
1071
+ }
1072
+
1073
+ &w-#{$suffix} {
1074
+ width: $i * $base-width;
1075
+ }
1076
+
1077
+ &max-w-#{$suffix} {
1078
+ max-width: $i * $base-width;
1079
+ }
1080
+
1081
+ &min-w-#{$suffix} {
1082
+ min-width: $i * $base-width;
1083
+ }
1084
+
1085
+ &m-#{$i} {
1086
+ margin: $i * $base-margin;
1087
+ }
1088
+
1089
+ &mb-#{$i} {
1090
+ margin-bottom: $i * $base-margin;
1091
+ }
1092
+
1093
+ &ml-#{$i} {
1094
+ margin-left: $i * $base-margin;
1095
+ }
1096
+
1097
+ &mr-#{$i} {
1098
+ margin-right: $i * $base-margin;
1099
+ }
1100
+
1101
+ &mt-#{$i} {
1102
+ margin-top: $i * $base-margin;
1103
+ }
1104
+
1105
+ &mx-#{$i} {
1106
+ margin-left: $i * $base-margin;
1107
+ margin-right: $i * $base-margin;
1108
+ }
1109
+
1110
+ &my-#{$i} {
1111
+ margin-top: $i * $base-margin;
1112
+ margin-bottom: $i * $base-margin;
1113
+ }
1114
+
1115
+ &p-#{$i} {
1116
+ padding: $i * $base-padding;
1117
+ }
1118
+
1119
+ &pb-#{$i} {
1120
+ padding-bottom: $i * $base-padding;
1121
+ }
1122
+
1123
+ &pl-#{$i} {
1124
+ padding-left: $i * $base-padding;
1125
+ }
1126
+
1127
+ &pr-#{$i} {
1128
+ padding-right: $i * $base-padding;
1129
+ }
1130
+
1131
+ &pt-#{$i} {
1132
+ padding-top: $i * $base-padding;
1133
+ }
1134
+
1135
+ &px-#{$i} {
1136
+ padding-left: $i * $base-padding;
1137
+ padding-right: $i * $base-padding;
1138
+ }
1139
+
1140
+ &py-#{$i} {
1141
+ padding-top: $i * $base-padding;
1142
+ padding-bottom: $i * $base-padding;
1143
+ }
1144
+
1145
+ &fb-#{$suffix} {
1146
+ flex-basis: $i * $base-flex-basis;
1147
+ }
1148
+ }
1149
+
1150
+ @each $property, $map in $utilities {
1151
+ $prefix: map-get($map, "prefix");
1152
+ $values: map-get($map, "values");
1153
+
1154
+ @each $k, $v in $values {
1155
+ @if ($k == "default") {
1156
+ &#{$prefix} {
1157
+ #{$property}: $v;
1158
+ }
1159
+ } @else {
1160
+ &#{$prefix}-#{$k} {
1161
+ #{$property}: $v;
1162
+ }
1163
+ }
1164
+ }
1165
+ }
1166
+
1167
+ @each $key, $value in $custom-values {
1168
+ &h-#{$key} {
1169
+ height: $value;
1170
+ }
1171
+
1172
+ &max-h-#{$key} {
1173
+ max-height: $value;
1174
+ }
1175
+
1176
+ &min-h-#{$key} {
1177
+ min-height: $value;
1178
+ }
1179
+
1180
+ &w-#{$key} {
1181
+ width: $value;
1182
+ }
1183
+
1184
+ &max-w-#{$key} {
1185
+ max-width: $value;
1186
+ }
1187
+
1188
+ &min-w-#{$key} {
1189
+ min-width: $value;
1190
+ }
1191
+ }
1192
+
1193
+ @each $key, $value in $custom-values {
1194
+ @if $key == "auto" {
1195
+ &m-#{$key} {
1196
+ margin: $value;
1197
+ }
1198
+
1199
+ &mb-#{$key} {
1200
+ margin-bottom: $value;
1201
+ }
1202
+
1203
+ &ml-#{$key} {
1204
+ margin-left: $value;
1205
+ }
1206
+
1207
+ &mr-#{$key} {
1208
+ margin-right: $value;
1209
+ }
1210
+
1211
+ &mt-#{$key} {
1212
+ margin-top: $value;
1213
+ }
1214
+
1215
+ &p-#{$key} {
1216
+ padding: $value;
1217
+ }
1218
+
1219
+ &pb-#{$key} {
1220
+ padding-bottom: $value;
1221
+ }
1222
+
1223
+ &pl-#{$key} {
1224
+ padding-left: $value;
1225
+ }
1226
+
1227
+ &pr-#{$key} {
1228
+ padding-right: $value;
1229
+ }
1230
+
1231
+ &pt-#{$key} {
1232
+ padding-top: $value;
1233
+ }
1234
+ }
1235
+ }
1236
+
1237
+ @each $key, $value in $custom-height-values {
1238
+ &h-#{$key} {
1239
+ height: $value;
1240
+ }
1241
+
1242
+ &max-h-#{$key} {
1243
+ max-height: $value;
1244
+ }
1245
+
1246
+ &min-h-#{$key} {
1247
+ min-height: $value;
1248
+ }
1249
+ }
1250
+
1251
+ @each $key, $value in $custom-width-values {
1252
+ &w-#{$key} {
1253
+ width: $value;
1254
+ }
1255
+
1256
+ &max-w-#{$key} {
1257
+ max-width: $value;
1258
+ }
1259
+
1260
+ &min-w-#{$key} {
1261
+ min-width: $value;
1262
+ }
1263
+ }
1264
+ }
1265
+ }
1266
+ }
1267
+
1268
+ @include breakpoint-classes(xs);
1269
+ @include breakpoint-classes(sm);
1270
+ @include breakpoint-classes(md);
1271
+ @include breakpoint-classes(lg);
1272
+ @include breakpoint-classes(xl);
@@ -1,23 +1,22 @@
1
- // default colors
1
+ // base colors
2
2
  $base-colors: (
3
- "red": rgb(242, 109, 80),
4
- "orange": rgb(246, 142, 85),
5
- "yellow": rgb(255, 244, 103),
6
- "green": rgb(59, 184, 120),
7
- "teal": rgb(26, 187, 180),
8
- "aqua": rgb(0, 191, 243),
9
- "blue": rgb(67, 140, 202),
10
- "violet": rgb(133, 95, 168),
11
- "magenta": rgb(168, 99, 168),
12
- "pink": rgb(240, 110, 169),
13
- "gray": rgb(153, 153, 153),
14
- "lead": rgb(63, 63, 78),
15
- "black": black,
16
- "white": white
3
+ "red": rgb(242, 109, 80),
4
+ "orange": rgb(246, 142, 85),
5
+ "yellow": rgb(255, 244, 103),
6
+ "green": rgb(59, 184, 120),
7
+ "teal": rgb(26, 187, 180),
8
+ "aqua": rgb(0, 191, 243),
9
+ "blue": rgb(67, 140, 202),
10
+ "violet": rgb(133, 95, 168),
11
+ "magenta": rgb(168, 99, 168),
12
+ "pink": rgb(240, 110, 169),
13
+ "gray": rgb(153, 153, 153),
14
+ "lead": rgb(63, 63, 78),
15
+ "black": black,
16
+ "white": white
17
17
  ) !default;
18
18
 
19
19
  //borders & background
20
- $base-border-thickness: 1px !default;
21
20
  $base-border: 1px !default;
22
21
  $base-border-radius: 8px !default;
23
22
  $base-box-shadow: 1px 3px 5px rgba(0, 0, 0, 0.1) !default;
@@ -44,25 +43,30 @@ $base-direction: 1px !default;
44
43
 
45
44
  // typography & text
46
45
  $base-font-size: 1rem !default;
47
- $base-font: normal !default;
46
+ $base-font-weight: 500 !default;
47
+ $base-font-size-xs: $base-font-size * 0.6 !default;
48
48
  $base-font-size-sm: $base-font-size * 0.75 !default;
49
49
  $base-font-size-md: $base-font-size * 1.75 !default;
50
50
  $base-font-size-lg: $base-font-size * 2 !default;
51
- $base-font-size-xlg: $base-font-size * 3 !default;
51
+ $base-font-size-xl: $base-font-size * 3 !default;
52
+ $base-system-fonts: system-ui, sans-serif;
53
+ $base-charter-fonts: Charter, "Bitstream Charter", "Sitka Text", Cambria, serif;
54
+ $base-inter-fonts: Inter, Roboto, "Helvetica Neue", "Arial Nova", "Nimbus Sans", Arial, sans-serif;
55
+ $base-monospace-fonts: ui-monospace, "Cascadia Code", "Source Code Pro", Menlo, Consolas, "DejaVu Sans Mono", monospace;
52
56
 
53
57
  // custom values
54
58
  $custom-values: (
55
- "auto": auto,
56
- "full": 100%,
57
- "half": 50%
59
+ "auto": auto,
60
+ "full": 100%,
61
+ "half": 50%
58
62
  );
59
63
 
60
64
  $custom-height-values: (
61
65
  "1\\/1": 100vh,
62
- "1\\/2": 50vh,
66
+ "1\\/2": 50vh
63
67
  );
64
68
 
65
69
  $custom-width-values: (
66
70
  "1\\/1": 100vw,
67
- "2\\/1": 50vw,
68
- );
71
+ "2\\/1": 50vw
72
+ );
@@ -1,11 +1,12 @@
1
1
  @mixin btn($bg-color: #e2e2e2) {
2
2
  text-decoration: none;
3
- cursor: pointer;
4
3
  display: inline-block;
5
4
  border: 0;
6
5
  padding: $base-padding $base-padding * 2;
7
6
  border-radius: $base-border-radius;
8
7
  background-color: $bg-color;
8
+ transition: background-color 0.3s ease;
9
+ cursor: pointer;
9
10
  }
10
11
 
11
12
  .btn {
@@ -46,7 +47,7 @@ $v in $base-colors {
46
47
 
47
48
  .btn-otl-#{$k} {
48
49
  @include btn(#fff);
49
- border: $base-border-thickness solid $v;
50
+ border: $base-border solid $v;
50
51
 
51
52
  &:hover {
52
53
  background-color: $v;
@@ -3,7 +3,7 @@
3
3
  .card {
4
4
  display: block;
5
5
  padding: $base-padding;
6
- border: $base-border-thickness solid #ddd;
6
+ border: $base-border solid #ddd;
7
7
  box-shadow: $base-box-shadow;
8
8
  border-radius: math.div($base-border-radius, 2);
9
9
 
@@ -1,22 +1,22 @@
1
1
  // functions & variables
2
- @import 'functions';
3
- @import 'variables';
2
+ @import "functions";
3
+ @import "variables";
4
4
 
5
5
  // base, layouts & breakpoints
6
- @import 'base';
7
- @import 'breakpoints';
8
- @import 'grid';
9
- @import 'layout';
6
+ @import "base";
7
+ @import "breakpoints";
8
+ @import "grid";
9
+ @import "layout";
10
10
 
11
11
  // colors
12
- @import 'colors';
12
+ @import "colors";
13
13
 
14
14
  // components
15
- @import 'components/card';
16
- @import 'components/button';
17
- @import 'components/navbar';
18
- @import 'components/badge';
15
+ @import "components/card";
16
+ @import "components/button";
17
+ @import "components/navbar";
18
+ @import "components/badge";
19
19
 
20
20
  // utilities
21
- @import 'utilities';
22
- @import 'fonts';
21
+ @import "utils";
22
+ @import "fonts";