@carbon/grid 11.3.0-rc.0 → 11.4.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 +4 -4
- package/scss/_css-grid.scss +9 -8
- package/scss/_flex-grid.scss +3 -12
- package/scss/_inlined/_css-grid.scss +9 -8
- package/scss/_inlined/_flex-grid.scss +3 -12
- package/scss/_inlined/_mixins.scss +3 -12
- package/scss/_mixins.scss +3 -12
- package/scss/vendor/@carbon/layout/_convert.scss +2 -10
- package/scss/vendor/@carbon/layout/modules/_convert.scss +2 -10
- package/scss/vendor/@carbon/layout/_convert.import.scss +0 -63
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.
|
|
4
|
+
"version": "11.4.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -32,10 +32,10 @@
|
|
|
32
32
|
"clean": "rimraf scss/_inlined scss/vendor"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@carbon/layout": "^11.
|
|
35
|
+
"@carbon/layout": "^11.4.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@carbon/cli": "^11.2.0
|
|
38
|
+
"@carbon/cli": "^11.2.0",
|
|
39
39
|
"rimraf": "^3.0.0"
|
|
40
40
|
},
|
|
41
41
|
"eyeglass": {
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"sassDir": "scss",
|
|
45
45
|
"needs": "^1.3.0"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "d263183ca413f661dc4d2ece09833d846b32328f"
|
|
48
48
|
}
|
package/scss/_css-grid.scss
CHANGED
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
--cds-grid-column-hang: calc(var(--cds-grid-gutter) / 2);
|
|
95
95
|
|
|
96
96
|
display: grid;
|
|
97
|
+
width: 100%;
|
|
97
98
|
max-width: get-grid-width(
|
|
98
99
|
$breakpoints,
|
|
99
100
|
largest-breakpoint-name($breakpoints)
|
|
@@ -246,21 +247,21 @@
|
|
|
246
247
|
$span: $columns * 0.75;
|
|
247
248
|
--cds-grid-columns: #{$span};
|
|
248
249
|
|
|
249
|
-
grid-column: span
|
|
250
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
250
251
|
}
|
|
251
252
|
|
|
252
253
|
.#{$prefix}--#{$name}\:col-span-50 {
|
|
253
254
|
$span: $columns * 0.5;
|
|
254
255
|
--cds-grid-columns: #{$span};
|
|
255
256
|
|
|
256
|
-
grid-column: span
|
|
257
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
257
258
|
}
|
|
258
259
|
|
|
259
260
|
.#{$prefix}--#{$name}\:col-span-25 {
|
|
260
261
|
$span: $columns * 0.25;
|
|
261
262
|
--cds-grid-columns: #{$span};
|
|
262
263
|
|
|
263
|
-
grid-column: span
|
|
264
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
264
265
|
}
|
|
265
266
|
} @else {
|
|
266
267
|
@include breakpoint($name) {
|
|
@@ -278,21 +279,21 @@
|
|
|
278
279
|
$span: $columns * 0.75;
|
|
279
280
|
--cds-grid-columns: #{$span};
|
|
280
281
|
|
|
281
|
-
grid-column: span
|
|
282
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
282
283
|
}
|
|
283
284
|
|
|
284
285
|
.#{$prefix}--#{$name}\:col-span-50 {
|
|
285
286
|
$span: $columns * 0.5;
|
|
286
287
|
--cds-grid-columns: #{$span};
|
|
287
288
|
|
|
288
|
-
grid-column: span
|
|
289
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
289
290
|
}
|
|
290
291
|
|
|
291
292
|
.#{$prefix}--#{$name}\:col-span-25 {
|
|
292
293
|
$span: $columns * 0.25;
|
|
293
294
|
--cds-grid-columns: #{$span};
|
|
294
295
|
|
|
295
|
-
grid-column: span
|
|
296
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
299
|
}
|
|
@@ -425,7 +426,7 @@
|
|
|
425
426
|
@if is-smallest-breakpoint($key, $breakpoints) {
|
|
426
427
|
--cds-grid-columns: #{$span};
|
|
427
428
|
|
|
428
|
-
grid-column: span
|
|
429
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
429
430
|
} @else {
|
|
430
431
|
$previous-breakpoint: breakpoint-prev($key, $breakpoints);
|
|
431
432
|
$previous-column-count: get-column-count(
|
|
@@ -438,7 +439,7 @@
|
|
|
438
439
|
@include breakpoint($key) {
|
|
439
440
|
--cds-grid-columns: #{$span};
|
|
440
441
|
|
|
441
|
-
grid-column: span
|
|
442
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
442
443
|
}
|
|
443
444
|
}
|
|
444
445
|
}
|
package/scss/_flex-grid.scss
CHANGED
|
@@ -70,13 +70,8 @@
|
|
|
70
70
|
// Add a `max-width` to ensure content within each column does not blow out
|
|
71
71
|
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
|
|
72
72
|
// do not appear to require this.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
flex: 0 0 math.percentage(math.div($span, $columns));
|
|
76
|
-
} @else {
|
|
77
|
-
max-width: math.percentage(($span / $columns));
|
|
78
|
-
flex: 0 0 math.percentage(($span / $columns));
|
|
79
|
-
}
|
|
73
|
+
max-width: math.percentage(math.div($span, $columns));
|
|
74
|
+
flex: 0 0 math.percentage(math.div($span, $columns));
|
|
80
75
|
}
|
|
81
76
|
}
|
|
82
77
|
|
|
@@ -87,11 +82,7 @@
|
|
|
87
82
|
/// @group @carbon/grid
|
|
88
83
|
@mixin -make-col-offset($span, $columns) {
|
|
89
84
|
$offset: 0;
|
|
90
|
-
|
|
91
|
-
$offset: math.div($span, $columns);
|
|
92
|
-
} @else {
|
|
93
|
-
$offset: ($span / $columns);
|
|
94
|
-
}
|
|
85
|
+
$offset: math.div($span, $columns);
|
|
95
86
|
@if $offset == 0 {
|
|
96
87
|
margin-left: 0;
|
|
97
88
|
} @else {
|
|
@@ -94,6 +94,7 @@
|
|
|
94
94
|
--cds-grid-column-hang: calc(var(--cds-grid-gutter) / 2);
|
|
95
95
|
|
|
96
96
|
display: grid;
|
|
97
|
+
width: 100%;
|
|
97
98
|
max-width: get-grid-width(
|
|
98
99
|
$breakpoints,
|
|
99
100
|
largest-breakpoint-name($breakpoints)
|
|
@@ -246,21 +247,21 @@
|
|
|
246
247
|
$span: $columns * 0.75;
|
|
247
248
|
--cds-grid-columns: #{$span};
|
|
248
249
|
|
|
249
|
-
grid-column: span
|
|
250
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
250
251
|
}
|
|
251
252
|
|
|
252
253
|
.#{$prefix}--#{$name}\:col-span-50 {
|
|
253
254
|
$span: $columns * 0.5;
|
|
254
255
|
--cds-grid-columns: #{$span};
|
|
255
256
|
|
|
256
|
-
grid-column: span
|
|
257
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
257
258
|
}
|
|
258
259
|
|
|
259
260
|
.#{$prefix}--#{$name}\:col-span-25 {
|
|
260
261
|
$span: $columns * 0.25;
|
|
261
262
|
--cds-grid-columns: #{$span};
|
|
262
263
|
|
|
263
|
-
grid-column: span
|
|
264
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
264
265
|
}
|
|
265
266
|
} @else {
|
|
266
267
|
@include breakpoint($name) {
|
|
@@ -278,21 +279,21 @@
|
|
|
278
279
|
$span: $columns * 0.75;
|
|
279
280
|
--cds-grid-columns: #{$span};
|
|
280
281
|
|
|
281
|
-
grid-column: span
|
|
282
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
282
283
|
}
|
|
283
284
|
|
|
284
285
|
.#{$prefix}--#{$name}\:col-span-50 {
|
|
285
286
|
$span: $columns * 0.5;
|
|
286
287
|
--cds-grid-columns: #{$span};
|
|
287
288
|
|
|
288
|
-
grid-column: span
|
|
289
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
289
290
|
}
|
|
290
291
|
|
|
291
292
|
.#{$prefix}--#{$name}\:col-span-25 {
|
|
292
293
|
$span: $columns * 0.25;
|
|
293
294
|
--cds-grid-columns: #{$span};
|
|
294
295
|
|
|
295
|
-
grid-column: span
|
|
296
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
296
297
|
}
|
|
297
298
|
}
|
|
298
299
|
}
|
|
@@ -425,7 +426,7 @@
|
|
|
425
426
|
@if is-smallest-breakpoint($key, $breakpoints) {
|
|
426
427
|
--cds-grid-columns: #{$span};
|
|
427
428
|
|
|
428
|
-
grid-column: span
|
|
429
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
429
430
|
} @else {
|
|
430
431
|
$previous-breakpoint: breakpoint-prev($key, $breakpoints);
|
|
431
432
|
$previous-column-count: get-column-count(
|
|
@@ -438,7 +439,7 @@
|
|
|
438
439
|
@include breakpoint($key) {
|
|
439
440
|
--cds-grid-columns: #{$span};
|
|
440
441
|
|
|
441
|
-
grid-column: span
|
|
442
|
+
grid-column: span list.slash($span, span) #{$span};
|
|
442
443
|
}
|
|
443
444
|
}
|
|
444
445
|
}
|
|
@@ -70,13 +70,8 @@
|
|
|
70
70
|
// Add a `max-width` to ensure content within each column does not blow out
|
|
71
71
|
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
|
|
72
72
|
// do not appear to require this.
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
flex: 0 0 math.percentage(math.div($span, $columns));
|
|
76
|
-
} @else {
|
|
77
|
-
max-width: math.percentage(($span / $columns));
|
|
78
|
-
flex: 0 0 math.percentage(($span / $columns));
|
|
79
|
-
}
|
|
73
|
+
max-width: math.percentage(math.div($span, $columns));
|
|
74
|
+
flex: 0 0 math.percentage(math.div($span, $columns));
|
|
80
75
|
}
|
|
81
76
|
}
|
|
82
77
|
|
|
@@ -87,11 +82,7 @@
|
|
|
87
82
|
/// @group @carbon/grid
|
|
88
83
|
@mixin -make-col-offset($span, $columns) {
|
|
89
84
|
$offset: 0;
|
|
90
|
-
|
|
91
|
-
$offset: math.div($span, $columns);
|
|
92
|
-
} @else {
|
|
93
|
-
$offset: ($span / $columns);
|
|
94
|
-
}
|
|
85
|
+
$offset: math.div($span, $columns);
|
|
95
86
|
@if $offset == 0 {
|
|
96
87
|
margin-left: 0;
|
|
97
88
|
} @else {
|
|
@@ -64,13 +64,8 @@
|
|
|
64
64
|
// Add a `max-width` to ensure content within each column does not blow out
|
|
65
65
|
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
|
|
66
66
|
// do not appear to require this.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
flex: 0 0 math.percentage(math.div($span, $columns));
|
|
70
|
-
} @else {
|
|
71
|
-
max-width: math.percentage(($span / $columns));
|
|
72
|
-
flex: 0 0 math.percentage(($span / $columns));
|
|
73
|
-
}
|
|
67
|
+
max-width: math.percentage(math.div($span, $columns));
|
|
68
|
+
flex: 0 0 math.percentage(math.div($span, $columns));
|
|
74
69
|
}
|
|
75
70
|
}
|
|
76
71
|
|
|
@@ -81,11 +76,7 @@
|
|
|
81
76
|
/// @group @carbon/grid
|
|
82
77
|
@mixin -make-col-offset($span, $columns) {
|
|
83
78
|
$offset: 0;
|
|
84
|
-
|
|
85
|
-
$offset: math.div($span, $columns);
|
|
86
|
-
} @else {
|
|
87
|
-
$offset: ($span / $columns);
|
|
88
|
-
}
|
|
79
|
+
$offset: math.div($span, $columns);
|
|
89
80
|
@if $offset == 0 {
|
|
90
81
|
margin-left: 0;
|
|
91
82
|
} @else {
|
package/scss/_mixins.scss
CHANGED
|
@@ -64,13 +64,8 @@
|
|
|
64
64
|
// Add a `max-width` to ensure content within each column does not blow out
|
|
65
65
|
// the width of the column. Applies to IE10+ and Firefox. Chrome and Safari
|
|
66
66
|
// do not appear to require this.
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
flex: 0 0 math.percentage(math.div($span, $columns));
|
|
70
|
-
} @else {
|
|
71
|
-
max-width: math.percentage(($span / $columns));
|
|
72
|
-
flex: 0 0 math.percentage(($span / $columns));
|
|
73
|
-
}
|
|
67
|
+
max-width: math.percentage(math.div($span, $columns));
|
|
68
|
+
flex: 0 0 math.percentage(math.div($span, $columns));
|
|
74
69
|
}
|
|
75
70
|
}
|
|
76
71
|
|
|
@@ -81,11 +76,7 @@
|
|
|
81
76
|
/// @group @carbon/grid
|
|
82
77
|
@mixin -make-col-offset($span, $columns) {
|
|
83
78
|
$offset: 0;
|
|
84
|
-
|
|
85
|
-
$offset: math.div($span, $columns);
|
|
86
|
-
} @else {
|
|
87
|
-
$offset: ($span / $columns);
|
|
88
|
-
}
|
|
79
|
+
$offset: math.div($span, $columns);
|
|
89
80
|
@if $offset == 0 {
|
|
90
81
|
margin-left: 0;
|
|
91
82
|
} @else {
|
|
@@ -24,11 +24,7 @@ $base-font-size: 16px !default;
|
|
|
24
24
|
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@
|
|
28
|
-
@return math.div($px, $base-font-size) * 1rem;
|
|
29
|
-
} @else {
|
|
30
|
-
@return ($px / $base-font-size) * 1rem;
|
|
31
|
-
}
|
|
27
|
+
@return math.div($px, $base-font-size) * 1rem;
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
/// Convert a given px unit to a em unit
|
|
@@ -41,9 +37,5 @@ $base-font-size: 16px !default;
|
|
|
41
37
|
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
42
38
|
}
|
|
43
39
|
|
|
44
|
-
@
|
|
45
|
-
@return math.div($px, $base-font-size) * 1em;
|
|
46
|
-
} @else {
|
|
47
|
-
@return ($px / $base-font-size) * 1em;
|
|
48
|
-
}
|
|
40
|
+
@return math.div($px, $base-font-size) * 1em;
|
|
49
41
|
}
|
|
@@ -24,11 +24,7 @@ $base-font-size: 16px !default;
|
|
|
24
24
|
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
@
|
|
28
|
-
@return math.div($px, $base-font-size) * 1rem;
|
|
29
|
-
} @else {
|
|
30
|
-
@return ($px / $base-font-size) * 1rem;
|
|
31
|
-
}
|
|
27
|
+
@return math.div($px, $base-font-size) * 1rem;
|
|
32
28
|
}
|
|
33
29
|
|
|
34
30
|
/// Convert a given px unit to a em unit
|
|
@@ -41,9 +37,5 @@ $base-font-size: 16px !default;
|
|
|
41
37
|
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
42
38
|
}
|
|
43
39
|
|
|
44
|
-
@
|
|
45
|
-
@return math.div($px, $base-font-size) * 1em;
|
|
46
|
-
} @else {
|
|
47
|
-
@return ($px / $base-font-size) * 1em;
|
|
48
|
-
}
|
|
40
|
+
@return math.div($px, $base-font-size) * 1em;
|
|
49
41
|
}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright IBM Corp. 2018, 2018
|
|
3
|
-
//
|
|
4
|
-
// This source code is licensed under the Apache-2.0 license found in the
|
|
5
|
-
// LICENSE file in the root directory of this source tree.
|
|
6
|
-
//
|
|
7
|
-
//-------------------------------------------
|
|
8
|
-
// Compatibility notes (*.import.scss)
|
|
9
|
-
// ------------------------------------------
|
|
10
|
-
//
|
|
11
|
-
// This file is intended to be consumed and processed with dart-sass.
|
|
12
|
-
// It is incompatible with node-sass/libsass as it contains sass language features
|
|
13
|
-
// or functions that are unavailable in node-sass/libsass, such as `math.div`.
|
|
14
|
-
//
|
|
15
|
-
// The non-`.import` suffixed version of this file eg. `_filename.scss`
|
|
16
|
-
// is intended to be compatible with node-sass/libsass.
|
|
17
|
-
//
|
|
18
|
-
// Styles authored within this file must be duplicated to the corresponding
|
|
19
|
-
// compatibility file to ensure we continue to support node-sass and dart-sass
|
|
20
|
-
// in v10.
|
|
21
|
-
|
|
22
|
-
@use 'sass:meta';
|
|
23
|
-
@use 'sass:math';
|
|
24
|
-
|
|
25
|
-
/// Default font size
|
|
26
|
-
/// @type Number
|
|
27
|
-
/// @access public
|
|
28
|
-
/// @group @carbon/layout
|
|
29
|
-
$carbon--base-font-size: 16px !default;
|
|
30
|
-
|
|
31
|
-
/// Convert a given px unit to a rem unit
|
|
32
|
-
/// @param {Number} $px - Number with px unit
|
|
33
|
-
/// @return {Number} Number with rem unit
|
|
34
|
-
/// @access public
|
|
35
|
-
/// @group @carbon/layout
|
|
36
|
-
@function carbon--rem($px) {
|
|
37
|
-
@if unit($px) != 'px' {
|
|
38
|
-
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
@if meta.function-exists('div', 'math') {
|
|
42
|
-
@return math.div($px, $carbon--base-font-size) * 1rem;
|
|
43
|
-
} @else {
|
|
44
|
-
@return ($px / $carbon--base-font-size) * 1rem;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
/// Convert a given px unit to a em unit
|
|
49
|
-
/// @param {Number} $px - Number with px unit
|
|
50
|
-
/// @return {Number} Number with em unit
|
|
51
|
-
/// @access public
|
|
52
|
-
/// @group @carbon/layout
|
|
53
|
-
@function carbon--em($px) {
|
|
54
|
-
@if unit($px) != 'px' {
|
|
55
|
-
@error "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
@if meta.function-exists('div', 'math') {
|
|
59
|
-
@return math.div($px, $carbon--base-font-size) * 1em;
|
|
60
|
-
} @else {
|
|
61
|
-
@return ($px / $carbon--base-font-size) * 1em;
|
|
62
|
-
}
|
|
63
|
-
}
|