@carbon/type 11.36.0 → 11.36.2
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/_font-family.scss +3 -2
- package/scss/_scale.scss +3 -2
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@carbon/type",
|
|
3
3
|
"description": "Typography for digital and software products using the Carbon Design System",
|
|
4
|
-
"version": "11.36.
|
|
4
|
+
"version": "11.36.2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"module": "es/index.js",
|
|
@@ -40,8 +40,8 @@
|
|
|
40
40
|
"postinstall": "ibmtelemetry --config=telemetry.yml"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@carbon/grid": "^11.32.
|
|
44
|
-
"@carbon/layout": "^11.30.
|
|
43
|
+
"@carbon/grid": "^11.32.2",
|
|
44
|
+
"@carbon/layout": "^11.30.2",
|
|
45
45
|
"@ibm/telemetry-js": "^1.5.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
@@ -57,5 +57,5 @@
|
|
|
57
57
|
"sassDir": "scss",
|
|
58
58
|
"needs": "^1.3.0"
|
|
59
59
|
},
|
|
60
|
-
"gitHead": "
|
|
60
|
+
"gitHead": "5c8f7e2a47c2bfb2865f1f2f4efe55b26f45ad5c"
|
|
61
61
|
}
|
package/scss/_font-family.scss
CHANGED
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
//
|
|
7
7
|
|
|
8
8
|
@use 'sass:string';
|
|
9
|
+
@use 'sass:map';
|
|
9
10
|
|
|
10
11
|
/// Font family fallbacks for: IBM Plex Mono, IBM Plex Sans, IBM Plex Sans
|
|
11
12
|
/// Condensed, IBM Plex Sans Hebrew, and IBM Plex Serif
|
|
@@ -65,7 +66,7 @@ $font-families: (
|
|
|
65
66
|
/// @access public
|
|
66
67
|
/// @group @carbon/type
|
|
67
68
|
@function font-family($name) {
|
|
68
|
-
@return map
|
|
69
|
+
@return map.get($font-families, $name);
|
|
69
70
|
}
|
|
70
71
|
|
|
71
72
|
/// Include the `font-family` definition for the given name in your selector
|
|
@@ -92,7 +93,7 @@ $font-weights: (
|
|
|
92
93
|
/// @access public
|
|
93
94
|
/// @group @carbon/type
|
|
94
95
|
@function font-weight($weight) {
|
|
95
|
-
@return map
|
|
96
|
+
@return map.get($font-weights, $weight);
|
|
96
97
|
}
|
|
97
98
|
|
|
98
99
|
/// Set the `font-weight` property with the value for a given name
|
package/scss/_scale.scss
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
@use '@carbon/layout';
|
|
9
9
|
@use 'sass:list';
|
|
10
|
+
@use 'sass:math';
|
|
10
11
|
|
|
11
12
|
/// Compute the type size for the given type scale step
|
|
12
13
|
/// @param {Number} $step
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
@return 12px;
|
|
19
20
|
}
|
|
20
21
|
// Yn = Yn-1 + {INT[(n-2)/4] + 1} * 2
|
|
21
|
-
@return get-type-size($step - 1) + (floor(($step - 2) * 0.25) + 1) * 2;
|
|
22
|
+
@return get-type-size($step - 1) + (math.floor(($step - 2) * 0.25) + 1) * 2;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
/// Type scale follows a custom formula for determining each step size and supports sizes from 12px to 92px
|
|
@@ -36,7 +37,7 @@ $type-scale: ();
|
|
|
36
37
|
/// @access public
|
|
37
38
|
/// @group @carbon/type
|
|
38
39
|
@function type-scale($step) {
|
|
39
|
-
@return nth($type-scale, $step);
|
|
40
|
+
@return list.nth($type-scale, $step);
|
|
40
41
|
}
|
|
41
42
|
|
|
42
43
|
/// Set the font-size value of a selector with the value at the given `$step`
|