@carbon/grid 11.54.0-rc.0 → 11.55.0-rc.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/grid",
3
3
  "description": "Grid for digital and software products using the Carbon Design System",
4
- "version": "11.54.0-rc.0",
4
+ "version": "11.55.0-rc.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -35,11 +35,11 @@
35
35
  "postinstall": "ibmtelemetry --config=telemetry.yml"
36
36
  },
37
37
  "dependencies": {
38
- "@carbon/layout": "^11.52.0-rc.0",
38
+ "@carbon/layout": "^11.52.0",
39
39
  "@ibm/telemetry-js": "^1.5.0"
40
40
  },
41
41
  "devDependencies": {
42
- "@carbon/cli": "^11.43.0-rc.0",
42
+ "@carbon/cli": "^11.43.0",
43
43
  "rimraf": "^6.0.1"
44
44
  },
45
45
  "eyeglass": {
@@ -48,5 +48,5 @@
48
48
  "sassDir": "scss",
49
49
  "needs": "^1.3.0"
50
50
  },
51
- "gitHead": "20a00767571db791cac99d499527e2f995ead478"
51
+ "gitHead": "32de263c201d0424d86bc47d97d1c085abecb24e"
52
52
  }
@@ -150,6 +150,21 @@
150
150
  )};
151
151
  }
152
152
 
153
+ // -----------------------------------------------------------------------------
154
+ // Row gap
155
+ // -----------------------------------------------------------------------------
156
+
157
+ // Add row gap support for CSS Grid
158
+ // Row gap should match the total gutter (start + end margins)
159
+ .#{$prefix}--css-grid--with-row-gap {
160
+ row-gap: var(--cds-grid-gutter);
161
+ }
162
+
163
+ // Narrow mode has 0 + 1rem = 1rem total gutter
164
+ .#{$prefix}--css-grid--narrow.#{$prefix}--css-grid--with-row-gap {
165
+ row-gap: calc(var(--cds-grid-gutter) / 2);
166
+ }
167
+
153
168
  // -----------------------------------------------------------------------------
154
169
  // Alignment
155
170
  // -----------------------------------------------------------------------------
@@ -193,6 +208,7 @@
193
208
  }
194
209
 
195
210
  .#{$prefix}--subgrid--condensed {
211
+ --cds-grid-gutter: #{$grid-gutter-condensed};
196
212
  --cds-grid-gutter-start: #{math.div($grid-gutter-condensed, 2)};
197
213
  --cds-grid-gutter-end: #{math.div($grid-gutter-condensed, 2)};
198
214
  --cds-grid-column-hang: #{math.div($grid-gutter, 2) - math.div(
@@ -201,6 +217,25 @@
201
217
  )};
202
218
  }
203
219
 
220
+ // -----------------------------------------------------------------------------
221
+ // Row gap
222
+ // -----------------------------------------------------------------------------
223
+
224
+ // Add row gap support for CSS subgrids
225
+ // Row gap should match the total gutter (start + end margins)
226
+ .#{$prefix}--subgrid--with-row-gap {
227
+ row-gap: #{$grid-gutter};
228
+ }
229
+
230
+ // Narrow mode has 0 + 1rem = 1rem total gutter
231
+ .#{$prefix}--subgrid--narrow.#{$prefix}--subgrid--with-row-gap {
232
+ row-gap: #{math.div($grid-gutter, 2)};
233
+ }
234
+
235
+ .#{$prefix}--subgrid--condensed.#{$prefix}--subgrid--with-row-gap {
236
+ row-gap: #{$grid-gutter-condensed};
237
+ }
238
+
204
239
  // -----------------------------------------------------------------------------
205
240
  // Column hang
206
241
  // -----------------------------------------------------------------------------
@@ -318,6 +318,32 @@
318
318
  padding-block: $condensed-gutter * 0.5;
319
319
  }
320
320
 
321
+ // Add row gap support for Flexbox Grid using gap and margin-block-end
322
+ .#{$prefix}--grid--with-row-gap {
323
+ --cds-grid-row-gap: #{$grid-gutter};
324
+ }
325
+
326
+ // Sets the gap between rows and wrapped columns
327
+ .#{$prefix}--grid--with-row-gap > .#{$prefix}--row {
328
+ gap: var(--cds-grid-row-gap) 0;
329
+ margin-block-end: var(--cds-grid-row-gap);
330
+ }
331
+
332
+ // Condensed mode has 0 in FlexGrid
333
+ .#{$prefix}--grid--with-row-gap.#{$prefix}--grid--condensed {
334
+ --cds-grid-row-gap: 0;
335
+ }
336
+
337
+ // Narrow mode has 0 + 1rem = 1rem total gutter
338
+ .#{$prefix}--grid--with-row-gap.#{$prefix}--grid--narrow {
339
+ --cds-grid-row-gap: calc(#{$grid-gutter} / 2);
340
+ }
341
+
342
+ // Remove margin from the last row
343
+ .#{$prefix}--grid--with-row-gap > .#{$prefix}--row:last-child {
344
+ margin-block-end: 0;
345
+ }
346
+
321
347
  @include -make-grid-columns($breakpoints, $grid-gutter);
322
348
  @include -no-gutter();
323
349
  @include -hang($grid-gutter);
@@ -150,6 +150,21 @@
150
150
  )};
151
151
  }
152
152
 
153
+ // -----------------------------------------------------------------------------
154
+ // Row gap
155
+ // -----------------------------------------------------------------------------
156
+
157
+ // Add row gap support for CSS Grid
158
+ // Row gap should match the total gutter (start + end margins)
159
+ .#{$prefix}--css-grid--with-row-gap {
160
+ row-gap: var(--cds-grid-gutter);
161
+ }
162
+
163
+ // Narrow mode has 0 + 1rem = 1rem total gutter
164
+ .#{$prefix}--css-grid--narrow.#{$prefix}--css-grid--with-row-gap {
165
+ row-gap: calc(var(--cds-grid-gutter) / 2);
166
+ }
167
+
153
168
  // -----------------------------------------------------------------------------
154
169
  // Alignment
155
170
  // -----------------------------------------------------------------------------
@@ -193,6 +208,7 @@
193
208
  }
194
209
 
195
210
  .#{$prefix}--subgrid--condensed {
211
+ --cds-grid-gutter: #{$grid-gutter-condensed};
196
212
  --cds-grid-gutter-start: #{math.div($grid-gutter-condensed, 2)};
197
213
  --cds-grid-gutter-end: #{math.div($grid-gutter-condensed, 2)};
198
214
  --cds-grid-column-hang: #{math.div($grid-gutter, 2) - math.div(
@@ -201,6 +217,25 @@
201
217
  )};
202
218
  }
203
219
 
220
+ // -----------------------------------------------------------------------------
221
+ // Row gap
222
+ // -----------------------------------------------------------------------------
223
+
224
+ // Add row gap support for CSS subgrids
225
+ // Row gap should match the total gutter (start + end margins)
226
+ .#{$prefix}--subgrid--with-row-gap {
227
+ row-gap: #{$grid-gutter};
228
+ }
229
+
230
+ // Narrow mode has 0 + 1rem = 1rem total gutter
231
+ .#{$prefix}--subgrid--narrow.#{$prefix}--subgrid--with-row-gap {
232
+ row-gap: #{math.div($grid-gutter, 2)};
233
+ }
234
+
235
+ .#{$prefix}--subgrid--condensed.#{$prefix}--subgrid--with-row-gap {
236
+ row-gap: #{$grid-gutter-condensed};
237
+ }
238
+
204
239
  // -----------------------------------------------------------------------------
205
240
  // Column hang
206
241
  // -----------------------------------------------------------------------------
@@ -318,6 +318,32 @@
318
318
  padding-block: $condensed-gutter * 0.5;
319
319
  }
320
320
 
321
+ // Add row gap support for Flexbox Grid using gap and margin-block-end
322
+ .#{$prefix}--grid--with-row-gap {
323
+ --cds-grid-row-gap: #{$grid-gutter};
324
+ }
325
+
326
+ // Sets the gap between rows and wrapped columns
327
+ .#{$prefix}--grid--with-row-gap > .#{$prefix}--row {
328
+ gap: var(--cds-grid-row-gap) 0;
329
+ margin-block-end: var(--cds-grid-row-gap);
330
+ }
331
+
332
+ // Condensed mode has 0 in FlexGrid
333
+ .#{$prefix}--grid--with-row-gap.#{$prefix}--grid--condensed {
334
+ --cds-grid-row-gap: 0;
335
+ }
336
+
337
+ // Narrow mode has 0 + 1rem = 1rem total gutter
338
+ .#{$prefix}--grid--with-row-gap.#{$prefix}--grid--narrow {
339
+ --cds-grid-row-gap: calc(#{$grid-gutter} / 2);
340
+ }
341
+
342
+ // Remove margin from the last row
343
+ .#{$prefix}--grid--with-row-gap > .#{$prefix}--row:last-child {
344
+ margin-block-end: 0;
345
+ }
346
+
321
347
  @include -make-grid-columns($breakpoints, $grid-gutter);
322
348
  @include -no-gutter();
323
349
  @include -hang($grid-gutter);