@carbon/layout 10.8.2 → 10.9.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/docs/sass.md +6 -1
- package/package.json +5 -5
- package/scss/_breakpoint.scss +6 -1
package/docs/sass.md
CHANGED
|
@@ -388,8 +388,13 @@ Generate a media query for the maximum width of the given styles
|
|
|
388
388
|
@content;
|
|
389
389
|
}
|
|
390
390
|
} @else if map-has-key($breakpoints, $name) {
|
|
391
|
+
// We borrow this logic from bootstrap for specifying the value of the
|
|
392
|
+
// max-width. The maximum width is calculated by finding the breakpoint and
|
|
393
|
+
// subtracting .02 from its value. This value is used instead of .01 to
|
|
394
|
+
// avoid rounding issues in Safari
|
|
395
|
+
// https://github.com/twbs/bootstrap/blob/c5b1919deaf5393fcca9e9b9d7ce9c338160d99d/scss/mixins/_breakpoints.scss#L34-L46
|
|
391
396
|
$breakpoint: map-get($breakpoints, $name);
|
|
392
|
-
$width: map-get($breakpoint, width);
|
|
397
|
+
$width: map-get($breakpoint, width) - 0.02;
|
|
393
398
|
@media (max-width: $width) {
|
|
394
399
|
@content;
|
|
395
400
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/layout",
|
|
3
3
|
"description": "Layout helpers for digital and software products using the Carbon Design System",
|
|
4
|
-
"version": "10.
|
|
4
|
+
"version": "10.9.0",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
"clean": "rimraf es lib umd scss/generated"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"@carbon/bundler": "^10.
|
|
28
|
+
"@carbon/bundler": "^10.7.0",
|
|
29
29
|
"@carbon/cli-reporter": "^10.3.0",
|
|
30
|
-
"@carbon/scss-generator": "^10.
|
|
31
|
-
"@carbon/test-utils": "^10.
|
|
30
|
+
"@carbon/scss-generator": "^10.7.0",
|
|
31
|
+
"@carbon/test-utils": "^10.8.0",
|
|
32
32
|
"core-js": "^3.4.0",
|
|
33
33
|
"rimraf": "^3.0.0"
|
|
34
34
|
},
|
|
@@ -38,5 +38,5 @@
|
|
|
38
38
|
"sassDir": "scss",
|
|
39
39
|
"needs": "^1.3.0"
|
|
40
40
|
},
|
|
41
|
-
"gitHead": "
|
|
41
|
+
"gitHead": "6105a7b4c7f182f429109acbb1e6e01806de053f"
|
|
42
42
|
}
|
package/scss/_breakpoint.scss
CHANGED
|
@@ -163,8 +163,13 @@ $carbon--grid-breakpoints: (
|
|
|
163
163
|
@content;
|
|
164
164
|
}
|
|
165
165
|
} @else if map-has-key($breakpoints, $name) {
|
|
166
|
+
// We borrow this logic from bootstrap for specifying the value of the
|
|
167
|
+
// max-width. The maximum width is calculated by finding the breakpoint and
|
|
168
|
+
// subtracting .02 from its value. This value is used instead of .01 to
|
|
169
|
+
// avoid rounding issues in Safari
|
|
170
|
+
// https://github.com/twbs/bootstrap/blob/c5b1919deaf5393fcca9e9b9d7ce9c338160d99d/scss/mixins/_breakpoints.scss#L34-L46
|
|
166
171
|
$breakpoint: map-get($breakpoints, $name);
|
|
167
|
-
$width: map-get($breakpoint, width);
|
|
172
|
+
$width: map-get($breakpoint, width) - 0.02;
|
|
168
173
|
@media (max-width: $width) {
|
|
169
174
|
@content;
|
|
170
175
|
}
|