cacao-css 6.3.0 → 7.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.
Files changed (183) hide show
  1. package/dist/display/2xl/display.css +12 -6
  2. package/dist/display/2xs/display.css +12 -6
  3. package/dist/display/3xl/display.css +12 -6
  4. package/dist/display/3xs/display.css +12 -6
  5. package/dist/display/4xl/display.css +12 -6
  6. package/dist/display/5xl/display.css +12 -6
  7. package/dist/display/display.css +12 -6
  8. package/dist/display/lg/display.css +12 -6
  9. package/dist/display/md/display.css +12 -6
  10. package/dist/display/sm/display.css +12 -6
  11. package/dist/display/xl/display.css +12 -6
  12. package/dist/display/xs/display.css +12 -6
  13. package/dist/grid/2xl/grid.css +11 -14
  14. package/dist/grid/2xl/num-columns.css +56 -0
  15. package/dist/grid/2xs/grid.css +11 -14
  16. package/dist/grid/2xs/num-columns.css +56 -0
  17. package/dist/grid/3xl/grid.css +11 -14
  18. package/dist/grid/3xl/num-columns.css +56 -0
  19. package/dist/grid/3xs/grid.css +11 -14
  20. package/dist/grid/3xs/num-columns.css +56 -0
  21. package/dist/grid/4xl/grid.css +11 -14
  22. package/dist/grid/4xl/num-columns.css +56 -0
  23. package/dist/grid/5xl/grid.css +11 -14
  24. package/dist/grid/5xl/num-columns.css +56 -0
  25. package/dist/grid/grid.css +9 -14
  26. package/dist/grid/lg/grid.css +11 -14
  27. package/dist/grid/lg/num-columns.css +56 -0
  28. package/dist/grid/md/grid.css +11 -14
  29. package/dist/grid/md/num-columns.css +56 -0
  30. package/dist/grid/num-columns.css +54 -0
  31. package/dist/grid/sm/grid.css +11 -14
  32. package/dist/grid/sm/num-columns.css +56 -0
  33. package/dist/grid/xl/grid.css +11 -14
  34. package/dist/grid/xl/num-columns.css +56 -0
  35. package/dist/grid/xs/grid.css +11 -14
  36. package/dist/grid/xs/num-columns.css +56 -0
  37. package/dist/grid-column/2xl/col-1.css +1 -1
  38. package/dist/grid-column/2xl/col-10.css +10 -10
  39. package/dist/grid-column/2xl/col-11.css +11 -11
  40. package/dist/grid-column/2xl/col-12.css +14 -12
  41. package/dist/grid-column/2xl/col-2.css +2 -2
  42. package/dist/grid-column/2xl/col-3.css +3 -3
  43. package/dist/grid-column/2xl/col-4.css +4 -4
  44. package/dist/grid-column/2xl/col-5.css +5 -5
  45. package/dist/grid-column/2xl/col-6.css +6 -6
  46. package/dist/grid-column/2xl/col-7.css +7 -7
  47. package/dist/grid-column/2xl/col-8.css +8 -8
  48. package/dist/grid-column/2xl/col-9.css +9 -9
  49. package/dist/grid-column/2xs/col-1.css +1 -1
  50. package/dist/grid-column/2xs/col-10.css +10 -10
  51. package/dist/grid-column/2xs/col-11.css +11 -11
  52. package/dist/grid-column/2xs/col-12.css +14 -12
  53. package/dist/grid-column/2xs/col-2.css +2 -2
  54. package/dist/grid-column/2xs/col-3.css +3 -3
  55. package/dist/grid-column/2xs/col-4.css +4 -4
  56. package/dist/grid-column/2xs/col-5.css +5 -5
  57. package/dist/grid-column/2xs/col-6.css +6 -6
  58. package/dist/grid-column/2xs/col-7.css +7 -7
  59. package/dist/grid-column/2xs/col-8.css +8 -8
  60. package/dist/grid-column/2xs/col-9.css +9 -9
  61. package/dist/grid-column/3xl/col-1.css +1 -1
  62. package/dist/grid-column/3xl/col-10.css +10 -10
  63. package/dist/grid-column/3xl/col-11.css +11 -11
  64. package/dist/grid-column/3xl/col-12.css +14 -12
  65. package/dist/grid-column/3xl/col-2.css +2 -2
  66. package/dist/grid-column/3xl/col-3.css +3 -3
  67. package/dist/grid-column/3xl/col-4.css +4 -4
  68. package/dist/grid-column/3xl/col-5.css +5 -5
  69. package/dist/grid-column/3xl/col-6.css +6 -6
  70. package/dist/grid-column/3xl/col-7.css +7 -7
  71. package/dist/grid-column/3xl/col-8.css +8 -8
  72. package/dist/grid-column/3xl/col-9.css +9 -9
  73. package/dist/grid-column/3xs/col-1.css +1 -1
  74. package/dist/grid-column/3xs/col-10.css +10 -10
  75. package/dist/grid-column/3xs/col-11.css +11 -11
  76. package/dist/grid-column/3xs/col-12.css +14 -12
  77. package/dist/grid-column/3xs/col-2.css +2 -2
  78. package/dist/grid-column/3xs/col-3.css +3 -3
  79. package/dist/grid-column/3xs/col-4.css +4 -4
  80. package/dist/grid-column/3xs/col-5.css +5 -5
  81. package/dist/grid-column/3xs/col-6.css +6 -6
  82. package/dist/grid-column/3xs/col-7.css +7 -7
  83. package/dist/grid-column/3xs/col-8.css +8 -8
  84. package/dist/grid-column/3xs/col-9.css +9 -9
  85. package/dist/grid-column/4xl/col-1.css +1 -1
  86. package/dist/grid-column/4xl/col-10.css +10 -10
  87. package/dist/grid-column/4xl/col-11.css +11 -11
  88. package/dist/grid-column/4xl/col-12.css +14 -12
  89. package/dist/grid-column/4xl/col-2.css +2 -2
  90. package/dist/grid-column/4xl/col-3.css +3 -3
  91. package/dist/grid-column/4xl/col-4.css +4 -4
  92. package/dist/grid-column/4xl/col-5.css +5 -5
  93. package/dist/grid-column/4xl/col-6.css +6 -6
  94. package/dist/grid-column/4xl/col-7.css +7 -7
  95. package/dist/grid-column/4xl/col-8.css +8 -8
  96. package/dist/grid-column/4xl/col-9.css +9 -9
  97. package/dist/grid-column/5xl/col-1.css +1 -1
  98. package/dist/grid-column/5xl/col-10.css +10 -10
  99. package/dist/grid-column/5xl/col-11.css +11 -11
  100. package/dist/grid-column/5xl/col-12.css +14 -12
  101. package/dist/grid-column/5xl/col-2.css +2 -2
  102. package/dist/grid-column/5xl/col-3.css +3 -3
  103. package/dist/grid-column/5xl/col-4.css +4 -4
  104. package/dist/grid-column/5xl/col-5.css +5 -5
  105. package/dist/grid-column/5xl/col-6.css +6 -6
  106. package/dist/grid-column/5xl/col-7.css +7 -7
  107. package/dist/grid-column/5xl/col-8.css +8 -8
  108. package/dist/grid-column/5xl/col-9.css +9 -9
  109. package/dist/grid-column/col-1.css +1 -1
  110. package/dist/grid-column/col-10.css +10 -10
  111. package/dist/grid-column/col-11.css +11 -11
  112. package/dist/grid-column/col-12.css +12 -12
  113. package/dist/grid-column/col-2.css +2 -2
  114. package/dist/grid-column/col-3.css +3 -3
  115. package/dist/grid-column/col-4.css +4 -4
  116. package/dist/grid-column/col-5.css +5 -5
  117. package/dist/grid-column/col-6.css +6 -6
  118. package/dist/grid-column/col-7.css +7 -7
  119. package/dist/grid-column/col-8.css +8 -8
  120. package/dist/grid-column/col-9.css +9 -9
  121. package/dist/grid-column/lg/col-1.css +1 -1
  122. package/dist/grid-column/lg/col-10.css +10 -10
  123. package/dist/grid-column/lg/col-11.css +11 -11
  124. package/dist/grid-column/lg/col-12.css +14 -12
  125. package/dist/grid-column/lg/col-2.css +2 -2
  126. package/dist/grid-column/lg/col-3.css +3 -3
  127. package/dist/grid-column/lg/col-4.css +4 -4
  128. package/dist/grid-column/lg/col-5.css +5 -5
  129. package/dist/grid-column/lg/col-6.css +6 -6
  130. package/dist/grid-column/lg/col-7.css +7 -7
  131. package/dist/grid-column/lg/col-8.css +8 -8
  132. package/dist/grid-column/lg/col-9.css +9 -9
  133. package/dist/grid-column/md/col-1.css +1 -1
  134. package/dist/grid-column/md/col-10.css +10 -10
  135. package/dist/grid-column/md/col-11.css +11 -11
  136. package/dist/grid-column/md/col-12.css +14 -12
  137. package/dist/grid-column/md/col-2.css +2 -2
  138. package/dist/grid-column/md/col-3.css +3 -3
  139. package/dist/grid-column/md/col-4.css +4 -4
  140. package/dist/grid-column/md/col-5.css +5 -5
  141. package/dist/grid-column/md/col-6.css +6 -6
  142. package/dist/grid-column/md/col-7.css +7 -7
  143. package/dist/grid-column/md/col-8.css +8 -8
  144. package/dist/grid-column/md/col-9.css +9 -9
  145. package/dist/grid-column/sm/col-1.css +1 -1
  146. package/dist/grid-column/sm/col-10.css +10 -10
  147. package/dist/grid-column/sm/col-11.css +11 -11
  148. package/dist/grid-column/sm/col-12.css +14 -12
  149. package/dist/grid-column/sm/col-2.css +2 -2
  150. package/dist/grid-column/sm/col-3.css +3 -3
  151. package/dist/grid-column/sm/col-4.css +4 -4
  152. package/dist/grid-column/sm/col-5.css +5 -5
  153. package/dist/grid-column/sm/col-6.css +6 -6
  154. package/dist/grid-column/sm/col-7.css +7 -7
  155. package/dist/grid-column/sm/col-8.css +8 -8
  156. package/dist/grid-column/sm/col-9.css +9 -9
  157. package/dist/grid-column/xl/col-1.css +1 -1
  158. package/dist/grid-column/xl/col-10.css +10 -10
  159. package/dist/grid-column/xl/col-11.css +11 -11
  160. package/dist/grid-column/xl/col-12.css +14 -12
  161. package/dist/grid-column/xl/col-2.css +2 -2
  162. package/dist/grid-column/xl/col-3.css +3 -3
  163. package/dist/grid-column/xl/col-4.css +4 -4
  164. package/dist/grid-column/xl/col-5.css +5 -5
  165. package/dist/grid-column/xl/col-6.css +6 -6
  166. package/dist/grid-column/xl/col-7.css +7 -7
  167. package/dist/grid-column/xl/col-8.css +8 -8
  168. package/dist/grid-column/xl/col-9.css +9 -9
  169. package/dist/grid-column/xs/col-1.css +1 -1
  170. package/dist/grid-column/xs/col-10.css +10 -10
  171. package/dist/grid-column/xs/col-11.css +11 -11
  172. package/dist/grid-column/xs/col-12.css +14 -12
  173. package/dist/grid-column/xs/col-2.css +2 -2
  174. package/dist/grid-column/xs/col-3.css +3 -3
  175. package/dist/grid-column/xs/col-4.css +4 -4
  176. package/dist/grid-column/xs/col-5.css +5 -5
  177. package/dist/grid-column/xs/col-6.css +6 -6
  178. package/dist/grid-column/xs/col-7.css +7 -7
  179. package/dist/grid-column/xs/col-8.css +8 -8
  180. package/dist/grid-column/xs/col-9.css +9 -9
  181. package/dist/imports.css +12 -0
  182. package/dist/media.css +4 -1
  183. package/package.json +1 -1
@@ -0,0 +1,56 @@
1
+ /* =========================================================================== *\
2
+ Number of columns
3
+ This is intended to be used with the grid system to specify the number of
4
+ columns in a grid to help with calculating the correct column widths when
5
+ there is a gap value.
6
+ \* =========================================================================== */
7
+
8
+ @media (--m-2xs) {
9
+ .nc-1-2xs {
10
+ --num-cols: 1;
11
+ }
12
+
13
+ .nc-2-2xs {
14
+ --num-cols: 2;
15
+ }
16
+
17
+ .nc-3-2xs {
18
+ --num-cols: 3;
19
+ }
20
+
21
+ .nc-4-2xs {
22
+ --num-cols: 4;
23
+ }
24
+
25
+ .nc-5-2xs {
26
+ --num-cols: 5;
27
+ }
28
+
29
+ .nc-6-2xs {
30
+ --num-cols: 6;
31
+ }
32
+
33
+ .nc-7-2xs {
34
+ --num-cols: 7;
35
+ }
36
+
37
+ .nc-8-2xs {
38
+ --num-cols: 8;
39
+ }
40
+
41
+ .nc-9-2xs {
42
+ --num-cols: 9;
43
+ }
44
+
45
+ .nc-10-2xs {
46
+ --num-cols: 10;
47
+ }
48
+
49
+ .nc-11-2xs {
50
+ --num-cols: 11;
51
+ }
52
+
53
+ .nc-12-2xs {
54
+ --num-cols: 12;
55
+ }
56
+ }
@@ -5,22 +5,19 @@
5
5
  @media (--m-3xl) {
6
6
  .grid-3xl {
7
7
  --gap: 0px;
8
+ --num-cols: 1;
9
+
10
+ /* Adjust the width of the columns to account for the gap between them.
11
+ This is only needed when using the "col-" classes because they set a percentage width.
12
+ In order to do this properly you need to know the number of columns in the grid.
13
+ This is set using the --num-cols variable. The "nc-" class is used to set this variable.
14
+ Based on https://stackoverflow.com/a/76429435.
15
+ */
16
+ --col-width-adjust: calc(
17
+ (((var(--num-cols) - 1) / var(--num-cols)) * var(--gap))
18
+ );
8
19
 
9
20
  display: flex;
10
21
  flex-wrap: wrap;
11
- margin-right: calc(var(--gap) * -1);
12
- }
13
-
14
- /* Not sure that overflow is necessary here. Removing it does not seem to have any consequences.
15
- Keeping it means that items in a grid can't overflow when overflow is wanted (like when adjusting
16
- the y-offset of an element when hovering over it). */
17
-
18
- /* .grid [class*=col-] {
19
- overflow: hidden;
20
- } */
21
-
22
- /* Don't adjust margin if column justification is being used. */
23
- .grid-3xl[class*="justify-"] {
24
- margin-right: 0;
25
22
  }
26
23
  }
@@ -0,0 +1,56 @@
1
+ /* =========================================================================== *\
2
+ Number of columns
3
+ This is intended to be used with the grid system to specify the number of
4
+ columns in a grid to help with calculating the correct column widths when
5
+ there is a gap value.
6
+ \* =========================================================================== */
7
+
8
+ @media (--m-3xl) {
9
+ .nc-1-3xl {
10
+ --num-cols: 1;
11
+ }
12
+
13
+ .nc-2-3xl {
14
+ --num-cols: 2;
15
+ }
16
+
17
+ .nc-3-3xl {
18
+ --num-cols: 3;
19
+ }
20
+
21
+ .nc-4-3xl {
22
+ --num-cols: 4;
23
+ }
24
+
25
+ .nc-5-3xl {
26
+ --num-cols: 5;
27
+ }
28
+
29
+ .nc-6-3xl {
30
+ --num-cols: 6;
31
+ }
32
+
33
+ .nc-7-3xl {
34
+ --num-cols: 7;
35
+ }
36
+
37
+ .nc-8-3xl {
38
+ --num-cols: 8;
39
+ }
40
+
41
+ .nc-9-3xl {
42
+ --num-cols: 9;
43
+ }
44
+
45
+ .nc-10-3xl {
46
+ --num-cols: 10;
47
+ }
48
+
49
+ .nc-11-3xl {
50
+ --num-cols: 11;
51
+ }
52
+
53
+ .nc-12-3xl {
54
+ --num-cols: 12;
55
+ }
56
+ }
@@ -5,22 +5,19 @@
5
5
  @media (--m-3xs) {
6
6
  .grid-3xs {
7
7
  --gap: 0px;
8
+ --num-cols: 1;
9
+
10
+ /* Adjust the width of the columns to account for the gap between them.
11
+ This is only needed when using the "col-" classes because they set a percentage width.
12
+ In order to do this properly you need to know the number of columns in the grid.
13
+ This is set using the --num-cols variable. The "nc-" class is used to set this variable.
14
+ Based on https://stackoverflow.com/a/76429435.
15
+ */
16
+ --col-width-adjust: calc(
17
+ (((var(--num-cols) - 1) / var(--num-cols)) * var(--gap))
18
+ );
8
19
 
9
20
  display: flex;
10
21
  flex-wrap: wrap;
11
- margin-right: calc(var(--gap) * -1);
12
- }
13
-
14
- /* Not sure that overflow is necessary here. Removing it does not seem to have any consequences.
15
- Keeping it means that items in a grid can't overflow when overflow is wanted (like when adjusting
16
- the y-offset of an element when hovering over it). */
17
-
18
- /* .grid [class*=col-] {
19
- overflow: hidden;
20
- } */
21
-
22
- /* Don't adjust margin if column justification is being used. */
23
- .grid-3xs[class*="justify-"] {
24
- margin-right: 0;
25
22
  }
26
23
  }
@@ -0,0 +1,56 @@
1
+ /* =========================================================================== *\
2
+ Number of columns
3
+ This is intended to be used with the grid system to specify the number of
4
+ columns in a grid to help with calculating the correct column widths when
5
+ there is a gap value.
6
+ \* =========================================================================== */
7
+
8
+ @media (--m-3xs) {
9
+ .nc-1-3xs {
10
+ --num-cols: 1;
11
+ }
12
+
13
+ .nc-2-3xs {
14
+ --num-cols: 2;
15
+ }
16
+
17
+ .nc-3-3xs {
18
+ --num-cols: 3;
19
+ }
20
+
21
+ .nc-4-3xs {
22
+ --num-cols: 4;
23
+ }
24
+
25
+ .nc-5-3xs {
26
+ --num-cols: 5;
27
+ }
28
+
29
+ .nc-6-3xs {
30
+ --num-cols: 6;
31
+ }
32
+
33
+ .nc-7-3xs {
34
+ --num-cols: 7;
35
+ }
36
+
37
+ .nc-8-3xs {
38
+ --num-cols: 8;
39
+ }
40
+
41
+ .nc-9-3xs {
42
+ --num-cols: 9;
43
+ }
44
+
45
+ .nc-10-3xs {
46
+ --num-cols: 10;
47
+ }
48
+
49
+ .nc-11-3xs {
50
+ --num-cols: 11;
51
+ }
52
+
53
+ .nc-12-3xs {
54
+ --num-cols: 12;
55
+ }
56
+ }
@@ -5,22 +5,19 @@
5
5
  @media (--m-4xl) {
6
6
  .grid-4xl {
7
7
  --gap: 0px;
8
+ --num-cols: 1;
9
+
10
+ /* Adjust the width of the columns to account for the gap between them.
11
+ This is only needed when using the "col-" classes because they set a percentage width.
12
+ In order to do this properly you need to know the number of columns in the grid.
13
+ This is set using the --num-cols variable. The "nc-" class is used to set this variable.
14
+ Based on https://stackoverflow.com/a/76429435.
15
+ */
16
+ --col-width-adjust: calc(
17
+ (((var(--num-cols) - 1) / var(--num-cols)) * var(--gap))
18
+ );
8
19
 
9
20
  display: flex;
10
21
  flex-wrap: wrap;
11
- margin-right: calc(var(--gap) * -1);
12
- }
13
-
14
- /* Not sure that overflow is necessary here. Removing it does not seem to have any consequences.
15
- Keeping it means that items in a grid can't overflow when overflow is wanted (like when adjusting
16
- the y-offset of an element when hovering over it). */
17
-
18
- /* .grid [class*=col-] {
19
- overflow: hidden;
20
- } */
21
-
22
- /* Don't adjust margin if column justification is being used. */
23
- .grid-4xl[class*="justify-"] {
24
- margin-right: 0;
25
22
  }
26
23
  }
@@ -0,0 +1,56 @@
1
+ /* =========================================================================== *\
2
+ Number of columns
3
+ This is intended to be used with the grid system to specify the number of
4
+ columns in a grid to help with calculating the correct column widths when
5
+ there is a gap value.
6
+ \* =========================================================================== */
7
+
8
+ @media (--m-4xl) {
9
+ .nc-1-4xl {
10
+ --num-cols: 1;
11
+ }
12
+
13
+ .nc-2-4xl {
14
+ --num-cols: 2;
15
+ }
16
+
17
+ .nc-3-4xl {
18
+ --num-cols: 3;
19
+ }
20
+
21
+ .nc-4-4xl {
22
+ --num-cols: 4;
23
+ }
24
+
25
+ .nc-5-4xl {
26
+ --num-cols: 5;
27
+ }
28
+
29
+ .nc-6-4xl {
30
+ --num-cols: 6;
31
+ }
32
+
33
+ .nc-7-4xl {
34
+ --num-cols: 7;
35
+ }
36
+
37
+ .nc-8-4xl {
38
+ --num-cols: 8;
39
+ }
40
+
41
+ .nc-9-4xl {
42
+ --num-cols: 9;
43
+ }
44
+
45
+ .nc-10-4xl {
46
+ --num-cols: 10;
47
+ }
48
+
49
+ .nc-11-4xl {
50
+ --num-cols: 11;
51
+ }
52
+
53
+ .nc-12-4xl {
54
+ --num-cols: 12;
55
+ }
56
+ }
@@ -5,22 +5,19 @@
5
5
  @media (--m-5xl) {
6
6
  .grid-5xl {
7
7
  --gap: 0px;
8
+ --num-cols: 1;
9
+
10
+ /* Adjust the width of the columns to account for the gap between them.
11
+ This is only needed when using the "col-" classes because they set a percentage width.
12
+ In order to do this properly you need to know the number of columns in the grid.
13
+ This is set using the --num-cols variable. The "nc-" class is used to set this variable.
14
+ Based on https://stackoverflow.com/a/76429435.
15
+ */
16
+ --col-width-adjust: calc(
17
+ (((var(--num-cols) - 1) / var(--num-cols)) * var(--gap))
18
+ );
8
19
 
9
20
  display: flex;
10
21
  flex-wrap: wrap;
11
- margin-right: calc(var(--gap) * -1);
12
- }
13
-
14
- /* Not sure that overflow is necessary here. Removing it does not seem to have any consequences.
15
- Keeping it means that items in a grid can't overflow when overflow is wanted (like when adjusting
16
- the y-offset of an element when hovering over it). */
17
-
18
- /* .grid [class*=col-] {
19
- overflow: hidden;
20
- } */
21
-
22
- /* Don't adjust margin if column justification is being used. */
23
- .grid-5xl[class*="justify-"] {
24
- margin-right: 0;
25
22
  }
26
23
  }
@@ -0,0 +1,56 @@
1
+ /* =========================================================================== *\
2
+ Number of columns
3
+ This is intended to be used with the grid system to specify the number of
4
+ columns in a grid to help with calculating the correct column widths when
5
+ there is a gap value.
6
+ \* =========================================================================== */
7
+
8
+ @media (--m-5xl) {
9
+ .nc-1-5xl {
10
+ --num-cols: 1;
11
+ }
12
+
13
+ .nc-2-5xl {
14
+ --num-cols: 2;
15
+ }
16
+
17
+ .nc-3-5xl {
18
+ --num-cols: 3;
19
+ }
20
+
21
+ .nc-4-5xl {
22
+ --num-cols: 4;
23
+ }
24
+
25
+ .nc-5-5xl {
26
+ --num-cols: 5;
27
+ }
28
+
29
+ .nc-6-5xl {
30
+ --num-cols: 6;
31
+ }
32
+
33
+ .nc-7-5xl {
34
+ --num-cols: 7;
35
+ }
36
+
37
+ .nc-8-5xl {
38
+ --num-cols: 8;
39
+ }
40
+
41
+ .nc-9-5xl {
42
+ --num-cols: 9;
43
+ }
44
+
45
+ .nc-10-5xl {
46
+ --num-cols: 10;
47
+ }
48
+
49
+ .nc-11-5xl {
50
+ --num-cols: 11;
51
+ }
52
+
53
+ .nc-12-5xl {
54
+ --num-cols: 12;
55
+ }
56
+ }
@@ -4,21 +4,16 @@
4
4
 
5
5
  .grid {
6
6
  --gap: 0px;
7
+ --num-cols: 1;
8
+
9
+ /* Adjust the width of the columns to account for the gap between them.
10
+ This is only needed when using the "col-" classes because they set a percentage width.
11
+ In order to do this properly you need to know the number of columns in the grid.
12
+ This is set using the --num-cols variable. The "nc-" class is used to set this variable.
13
+ Based on https://stackoverflow.com/a/76429435.
14
+ */
15
+ --col-width-adjust: calc((((var(--num-cols) - 1) / var(--num-cols)) * var(--gap)));
7
16
 
8
17
  display: flex;
9
18
  flex-wrap: wrap;
10
- margin-right: calc(var(--gap) * -1);
11
- }
12
-
13
- /* Not sure that overflow is necessary here. Removing it does not seem to have any consequences.
14
- Keeping it means that items in a grid can't overflow when overflow is wanted (like when adjusting
15
- the y-offset of an element when hovering over it). */
16
-
17
- /* .grid [class*=col-] {
18
- overflow: hidden;
19
- } */
20
-
21
- /* Don't adjust margin if column justification is being used. */
22
- .grid[class*='justify-'] {
23
- margin-right: 0;
24
19
  }
@@ -5,22 +5,19 @@
5
5
  @media (--m-lg) {
6
6
  .grid-lg {
7
7
  --gap: 0px;
8
+ --num-cols: 1;
9
+
10
+ /* Adjust the width of the columns to account for the gap between them.
11
+ This is only needed when using the "col-" classes because they set a percentage width.
12
+ In order to do this properly you need to know the number of columns in the grid.
13
+ This is set using the --num-cols variable. The "nc-" class is used to set this variable.
14
+ Based on https://stackoverflow.com/a/76429435.
15
+ */
16
+ --col-width-adjust: calc(
17
+ (((var(--num-cols) - 1) / var(--num-cols)) * var(--gap))
18
+ );
8
19
 
9
20
  display: flex;
10
21
  flex-wrap: wrap;
11
- margin-right: calc(var(--gap) * -1);
12
- }
13
-
14
- /* Not sure that overflow is necessary here. Removing it does not seem to have any consequences.
15
- Keeping it means that items in a grid can't overflow when overflow is wanted (like when adjusting
16
- the y-offset of an element when hovering over it). */
17
-
18
- /* .grid [class*=col-] {
19
- overflow: hidden;
20
- } */
21
-
22
- /* Don't adjust margin if column justification is being used. */
23
- .grid-lg[class*="justify-"] {
24
- margin-right: 0;
25
22
  }
26
23
  }
@@ -0,0 +1,56 @@
1
+ /* =========================================================================== *\
2
+ Number of columns
3
+ This is intended to be used with the grid system to specify the number of
4
+ columns in a grid to help with calculating the correct column widths when
5
+ there is a gap value.
6
+ \* =========================================================================== */
7
+
8
+ @media (--m-lg) {
9
+ .nc-1-lg {
10
+ --num-cols: 1;
11
+ }
12
+
13
+ .nc-2-lg {
14
+ --num-cols: 2;
15
+ }
16
+
17
+ .nc-3-lg {
18
+ --num-cols: 3;
19
+ }
20
+
21
+ .nc-4-lg {
22
+ --num-cols: 4;
23
+ }
24
+
25
+ .nc-5-lg {
26
+ --num-cols: 5;
27
+ }
28
+
29
+ .nc-6-lg {
30
+ --num-cols: 6;
31
+ }
32
+
33
+ .nc-7-lg {
34
+ --num-cols: 7;
35
+ }
36
+
37
+ .nc-8-lg {
38
+ --num-cols: 8;
39
+ }
40
+
41
+ .nc-9-lg {
42
+ --num-cols: 9;
43
+ }
44
+
45
+ .nc-10-lg {
46
+ --num-cols: 10;
47
+ }
48
+
49
+ .nc-11-lg {
50
+ --num-cols: 11;
51
+ }
52
+
53
+ .nc-12-lg {
54
+ --num-cols: 12;
55
+ }
56
+ }
@@ -5,22 +5,19 @@
5
5
  @media (--m-md) {
6
6
  .grid-md {
7
7
  --gap: 0px;
8
+ --num-cols: 1;
9
+
10
+ /* Adjust the width of the columns to account for the gap between them.
11
+ This is only needed when using the "col-" classes because they set a percentage width.
12
+ In order to do this properly you need to know the number of columns in the grid.
13
+ This is set using the --num-cols variable. The "nc-" class is used to set this variable.
14
+ Based on https://stackoverflow.com/a/76429435.
15
+ */
16
+ --col-width-adjust: calc(
17
+ (((var(--num-cols) - 1) / var(--num-cols)) * var(--gap))
18
+ );
8
19
 
9
20
  display: flex;
10
21
  flex-wrap: wrap;
11
- margin-right: calc(var(--gap) * -1);
12
- }
13
-
14
- /* Not sure that overflow is necessary here. Removing it does not seem to have any consequences.
15
- Keeping it means that items in a grid can't overflow when overflow is wanted (like when adjusting
16
- the y-offset of an element when hovering over it). */
17
-
18
- /* .grid [class*=col-] {
19
- overflow: hidden;
20
- } */
21
-
22
- /* Don't adjust margin if column justification is being used. */
23
- .grid-md[class*="justify-"] {
24
- margin-right: 0;
25
22
  }
26
23
  }
@@ -0,0 +1,56 @@
1
+ /* =========================================================================== *\
2
+ Number of columns
3
+ This is intended to be used with the grid system to specify the number of
4
+ columns in a grid to help with calculating the correct column widths when
5
+ there is a gap value.
6
+ \* =========================================================================== */
7
+
8
+ @media (--m-md) {
9
+ .nc-1-md {
10
+ --num-cols: 1;
11
+ }
12
+
13
+ .nc-2-md {
14
+ --num-cols: 2;
15
+ }
16
+
17
+ .nc-3-md {
18
+ --num-cols: 3;
19
+ }
20
+
21
+ .nc-4-md {
22
+ --num-cols: 4;
23
+ }
24
+
25
+ .nc-5-md {
26
+ --num-cols: 5;
27
+ }
28
+
29
+ .nc-6-md {
30
+ --num-cols: 6;
31
+ }
32
+
33
+ .nc-7-md {
34
+ --num-cols: 7;
35
+ }
36
+
37
+ .nc-8-md {
38
+ --num-cols: 8;
39
+ }
40
+
41
+ .nc-9-md {
42
+ --num-cols: 9;
43
+ }
44
+
45
+ .nc-10-md {
46
+ --num-cols: 10;
47
+ }
48
+
49
+ .nc-11-md {
50
+ --num-cols: 11;
51
+ }
52
+
53
+ .nc-12-md {
54
+ --num-cols: 12;
55
+ }
56
+ }
@@ -0,0 +1,54 @@
1
+ /* =========================================================================== *\
2
+ Number of columns
3
+ This is intended to be used with the grid system to specify the number of
4
+ columns in a grid to help with calculating the correct column widths when
5
+ there is a gap value.
6
+ \* =========================================================================== */
7
+
8
+ .nc-1 {
9
+ --num-cols: 1;
10
+ }
11
+
12
+ .nc-2 {
13
+ --num-cols: 2;
14
+ }
15
+
16
+ .nc-3 {
17
+ --num-cols: 3;
18
+ }
19
+
20
+ .nc-4 {
21
+ --num-cols: 4;
22
+ }
23
+
24
+ .nc-5 {
25
+ --num-cols: 5;
26
+ }
27
+
28
+ .nc-6 {
29
+ --num-cols: 6;
30
+ }
31
+
32
+ .nc-7 {
33
+ --num-cols: 7;
34
+ }
35
+
36
+ .nc-8 {
37
+ --num-cols: 8;
38
+ }
39
+
40
+ .nc-9 {
41
+ --num-cols: 9;
42
+ }
43
+
44
+ .nc-10 {
45
+ --num-cols: 10;
46
+ }
47
+
48
+ .nc-11 {
49
+ --num-cols: 11;
50
+ }
51
+
52
+ .nc-12 {
53
+ --num-cols: 12;
54
+ }