@carbon/grid 10.13.0 → 10.15.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 +3 -3
- package/scss/_inlined/_mixins.scss +36 -9
- package/scss/_mixins.scss +36 -9
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": "10.
|
|
4
|
+
"version": "10.15.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": "https://github.com/carbon-design-system/carbon/tree/master/packages/grid",
|
|
7
7
|
"bugs": "https://github.com/carbon-design-system/carbon/issues",
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@carbon/import-once": "^10.3.0",
|
|
31
|
-
"@carbon/layout": "^10.
|
|
31
|
+
"@carbon/layout": "^10.13.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
34
|
"@carbon/bundler": "^10.9.0",
|
|
@@ -40,5 +40,5 @@
|
|
|
40
40
|
"sassDir": "scss",
|
|
41
41
|
"needs": "^1.3.0"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "1ddaf4a45fd03d39ca695505d0c764b5879c924b"
|
|
44
44
|
}
|
|
@@ -41,6 +41,13 @@
|
|
|
41
41
|
padding-right: ($condensed-gutter / 2);
|
|
42
42
|
padding-left: ($condensed-gutter / 2);
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
// For our narrow use-case, our container hangs 16px into the gutter
|
|
46
|
+
.#{$prefix}--row--narrow &,
|
|
47
|
+
.#{$prefix}--grid--narrow & {
|
|
48
|
+
padding-right: ($gutter / 2);
|
|
49
|
+
padding-left: 0;
|
|
50
|
+
}
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
/// Define the width of the column for a given span and column count.
|
|
@@ -159,17 +166,28 @@
|
|
|
159
166
|
// No gutter
|
|
160
167
|
// -----------------------------------------------------------------------------
|
|
161
168
|
|
|
162
|
-
/// Add `no-gutter` and `no-gutter--{
|
|
169
|
+
/// Add `no-gutter` and `no-gutter--{start,end}` classes to the output CSS. These
|
|
163
170
|
/// classes are useful for dropping the gutter in fluid situations.
|
|
164
171
|
/// @access private
|
|
165
172
|
/// @group @carbon/grid
|
|
166
173
|
@mixin carbon--no-gutter {
|
|
167
174
|
.#{$prefix}--no-gutter,
|
|
168
175
|
.#{$prefix}--row.#{$prefix}--no-gutter [class*='#{$prefix}--col'] {
|
|
176
|
+
padding-right: 0;
|
|
177
|
+
padding-left: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.#{$prefix}--no-gutter--start,
|
|
181
|
+
.#{$prefix}--row.#{$prefix}--no-gutter--start [class*='#{$prefix}--col'] {
|
|
169
182
|
padding-left: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.#{$prefix}--no-gutter--end,
|
|
186
|
+
.#{$prefix}--row.#{$prefix}--no-gutter--end [class*='#{$prefix}--col'] {
|
|
170
187
|
padding-right: 0;
|
|
171
188
|
}
|
|
172
189
|
|
|
190
|
+
// Deprecated ☠️
|
|
173
191
|
.#{$prefix}--no-gutter--left,
|
|
174
192
|
.#{$prefix}--row.#{$prefix}--no-gutter--left [class*='#{$prefix}--col'] {
|
|
175
193
|
padding-left: 0;
|
|
@@ -185,12 +203,21 @@
|
|
|
185
203
|
// Hang
|
|
186
204
|
// -----------------------------------------------------------------------------
|
|
187
205
|
|
|
188
|
-
/// Add `hang--
|
|
189
|
-
/// used alongside `no-gutter--
|
|
206
|
+
/// Add `hang--start` and `hang--end` classes for a given gutter. These classes are
|
|
207
|
+
/// used alongside `no-gutter--start` and `no-gutter--end` to "hang" type.
|
|
190
208
|
/// @param {Number} $gutter [$carbon--grid-gutter] - The gutter in the grid system
|
|
191
209
|
/// @access private
|
|
192
210
|
/// @group @carbon/grid
|
|
193
211
|
@mixin carbon--hang($gutter: $carbon--grid-gutter) {
|
|
212
|
+
.#{$prefix}--hang--start {
|
|
213
|
+
padding-left: ($gutter / 2);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.#{$prefix}--hang--end {
|
|
217
|
+
padding-right: ($gutter / 2);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Deprecated ☠️
|
|
194
221
|
.#{$prefix}--hang--left {
|
|
195
222
|
padding-left: ($gutter / 2);
|
|
196
223
|
}
|
|
@@ -237,17 +264,17 @@ $carbon--aspect-ratios: (
|
|
|
237
264
|
}
|
|
238
265
|
|
|
239
266
|
.#{$prefix}--aspect-ratio::before {
|
|
240
|
-
content: '';
|
|
241
|
-
width: 1px;
|
|
242
|
-
margin-left: -1px;
|
|
243
267
|
float: left;
|
|
268
|
+
width: 1px;
|
|
244
269
|
height: 0;
|
|
270
|
+
margin-left: -1px;
|
|
271
|
+
content: '';
|
|
245
272
|
}
|
|
246
273
|
|
|
247
274
|
.#{$prefix}--aspect-ratio::after {
|
|
248
|
-
content: '';
|
|
249
275
|
display: table;
|
|
250
276
|
clear: both;
|
|
277
|
+
content: '';
|
|
251
278
|
}
|
|
252
279
|
|
|
253
280
|
@each $aspect-ratio in $aspect-ratios {
|
|
@@ -292,14 +319,14 @@ $carbon--aspect-ratios: (
|
|
|
292
319
|
$prev-margin: map-get($prev-breakpoint, margin);
|
|
293
320
|
@if $prev-margin != $margin {
|
|
294
321
|
@include carbon--breakpoint($name) {
|
|
295
|
-
padding-left: #{($carbon--grid-gutter / 2) + $margin};
|
|
296
322
|
padding-right: #{($carbon--grid-gutter / 2) + $margin};
|
|
323
|
+
padding-left: #{($carbon--grid-gutter / 2) + $margin};
|
|
297
324
|
}
|
|
298
325
|
}
|
|
299
326
|
} @else {
|
|
300
327
|
@include carbon--breakpoint($name) {
|
|
301
|
-
padding-left: #{($carbon--grid-gutter / 2) + $margin};
|
|
302
328
|
padding-right: #{($carbon--grid-gutter / 2) + $margin};
|
|
329
|
+
padding-left: #{($carbon--grid-gutter / 2) + $margin};
|
|
303
330
|
}
|
|
304
331
|
}
|
|
305
332
|
}
|
package/scss/_mixins.scss
CHANGED
|
@@ -41,6 +41,13 @@
|
|
|
41
41
|
padding-right: ($condensed-gutter / 2);
|
|
42
42
|
padding-left: ($condensed-gutter / 2);
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
// For our narrow use-case, our container hangs 16px into the gutter
|
|
46
|
+
.#{$prefix}--row--narrow &,
|
|
47
|
+
.#{$prefix}--grid--narrow & {
|
|
48
|
+
padding-right: ($gutter / 2);
|
|
49
|
+
padding-left: 0;
|
|
50
|
+
}
|
|
44
51
|
}
|
|
45
52
|
|
|
46
53
|
/// Define the width of the column for a given span and column count.
|
|
@@ -159,17 +166,28 @@
|
|
|
159
166
|
// No gutter
|
|
160
167
|
// -----------------------------------------------------------------------------
|
|
161
168
|
|
|
162
|
-
/// Add `no-gutter` and `no-gutter--{
|
|
169
|
+
/// Add `no-gutter` and `no-gutter--{start,end}` classes to the output CSS. These
|
|
163
170
|
/// classes are useful for dropping the gutter in fluid situations.
|
|
164
171
|
/// @access private
|
|
165
172
|
/// @group @carbon/grid
|
|
166
173
|
@mixin carbon--no-gutter {
|
|
167
174
|
.#{$prefix}--no-gutter,
|
|
168
175
|
.#{$prefix}--row.#{$prefix}--no-gutter [class*='#{$prefix}--col'] {
|
|
176
|
+
padding-right: 0;
|
|
177
|
+
padding-left: 0;
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
.#{$prefix}--no-gutter--start,
|
|
181
|
+
.#{$prefix}--row.#{$prefix}--no-gutter--start [class*='#{$prefix}--col'] {
|
|
169
182
|
padding-left: 0;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.#{$prefix}--no-gutter--end,
|
|
186
|
+
.#{$prefix}--row.#{$prefix}--no-gutter--end [class*='#{$prefix}--col'] {
|
|
170
187
|
padding-right: 0;
|
|
171
188
|
}
|
|
172
189
|
|
|
190
|
+
// Deprecated ☠️
|
|
173
191
|
.#{$prefix}--no-gutter--left,
|
|
174
192
|
.#{$prefix}--row.#{$prefix}--no-gutter--left [class*='#{$prefix}--col'] {
|
|
175
193
|
padding-left: 0;
|
|
@@ -185,12 +203,21 @@
|
|
|
185
203
|
// Hang
|
|
186
204
|
// -----------------------------------------------------------------------------
|
|
187
205
|
|
|
188
|
-
/// Add `hang--
|
|
189
|
-
/// used alongside `no-gutter--
|
|
206
|
+
/// Add `hang--start` and `hang--end` classes for a given gutter. These classes are
|
|
207
|
+
/// used alongside `no-gutter--start` and `no-gutter--end` to "hang" type.
|
|
190
208
|
/// @param {Number} $gutter [$carbon--grid-gutter] - The gutter in the grid system
|
|
191
209
|
/// @access private
|
|
192
210
|
/// @group @carbon/grid
|
|
193
211
|
@mixin carbon--hang($gutter: $carbon--grid-gutter) {
|
|
212
|
+
.#{$prefix}--hang--start {
|
|
213
|
+
padding-left: ($gutter / 2);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.#{$prefix}--hang--end {
|
|
217
|
+
padding-right: ($gutter / 2);
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
// Deprecated ☠️
|
|
194
221
|
.#{$prefix}--hang--left {
|
|
195
222
|
padding-left: ($gutter / 2);
|
|
196
223
|
}
|
|
@@ -237,17 +264,17 @@ $carbon--aspect-ratios: (
|
|
|
237
264
|
}
|
|
238
265
|
|
|
239
266
|
.#{$prefix}--aspect-ratio::before {
|
|
240
|
-
content: '';
|
|
241
|
-
width: 1px;
|
|
242
|
-
margin-left: -1px;
|
|
243
267
|
float: left;
|
|
268
|
+
width: 1px;
|
|
244
269
|
height: 0;
|
|
270
|
+
margin-left: -1px;
|
|
271
|
+
content: '';
|
|
245
272
|
}
|
|
246
273
|
|
|
247
274
|
.#{$prefix}--aspect-ratio::after {
|
|
248
|
-
content: '';
|
|
249
275
|
display: table;
|
|
250
276
|
clear: both;
|
|
277
|
+
content: '';
|
|
251
278
|
}
|
|
252
279
|
|
|
253
280
|
@each $aspect-ratio in $aspect-ratios {
|
|
@@ -292,14 +319,14 @@ $carbon--aspect-ratios: (
|
|
|
292
319
|
$prev-margin: map-get($prev-breakpoint, margin);
|
|
293
320
|
@if $prev-margin != $margin {
|
|
294
321
|
@include carbon--breakpoint($name) {
|
|
295
|
-
padding-left: #{($carbon--grid-gutter / 2) + $margin};
|
|
296
322
|
padding-right: #{($carbon--grid-gutter / 2) + $margin};
|
|
323
|
+
padding-left: #{($carbon--grid-gutter / 2) + $margin};
|
|
297
324
|
}
|
|
298
325
|
}
|
|
299
326
|
} @else {
|
|
300
327
|
@include carbon--breakpoint($name) {
|
|
301
|
-
padding-left: #{($carbon--grid-gutter / 2) + $margin};
|
|
302
328
|
padding-right: #{($carbon--grid-gutter / 2) + $margin};
|
|
329
|
+
padding-left: #{($carbon--grid-gutter / 2) + $margin};
|
|
303
330
|
}
|
|
304
331
|
}
|
|
305
332
|
}
|