@carbon/type 10.8.0 → 10.8.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 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": "10.8.0",
4
+ "version": "10.8.2",
5
5
  "license": "Apache-2.0",
6
6
  "main": "lib/index.js",
7
7
  "module": "es/index.js",
@@ -32,12 +32,12 @@
32
32
  "clean": "rimraf css es lib umd scss/_inlined scss/vendor"
33
33
  },
34
34
  "dependencies": {
35
- "@carbon/import-once": "10.3.0",
36
- "@carbon/layout": "^10.7.0"
35
+ "@carbon/import-once": "^10.3.0",
36
+ "@carbon/layout": "^10.7.2"
37
37
  },
38
38
  "devDependencies": {
39
- "@carbon/bundler": "^10.5.0",
40
- "@carbon/test-utils": "^10.6.0",
39
+ "@carbon/bundler": "^10.5.1",
40
+ "@carbon/test-utils": "^10.6.1",
41
41
  "change-case": "^3.1.0",
42
42
  "rimraf": "^2.6.2"
43
43
  },
@@ -47,5 +47,5 @@
47
47
  "sassDir": "scss",
48
48
  "needs": "^1.3.0"
49
49
  },
50
- "gitHead": "ca15c7806816840daa7cb944349314e2ebd04c2f"
50
+ "gitHead": "0a5f18f635e52e3304b115c92d3768defb30d3e7"
51
51
  }
@@ -186,7 +186,7 @@ $productive-heading-07: (
186
186
  $expressive-heading-01: map-merge(
187
187
  $heading-01,
188
188
  (
189
- line-height: carbon--rem(20),
189
+ line-height: carbon--rem(20px),
190
190
  )
191
191
  ) !default;
192
192
 
@@ -196,7 +196,7 @@ $expressive-heading-01: map-merge(
196
196
  $expressive-heading-02: map-merge(
197
197
  $heading-02,
198
198
  (
199
- line-height: carbon--rem(24),
199
+ line-height: carbon--rem(24px),
200
200
  )
201
201
  ) !default;
202
202
 
package/scss/_styles.scss CHANGED
@@ -186,7 +186,7 @@ $productive-heading-07: (
186
186
  $expressive-heading-01: map-merge(
187
187
  $heading-01,
188
188
  (
189
- line-height: carbon--rem(20),
189
+ line-height: carbon--rem(20px),
190
190
  )
191
191
  ) !default;
192
192
 
@@ -196,7 +196,7 @@ $expressive-heading-01: map-merge(
196
196
  $expressive-heading-02: map-merge(
197
197
  $heading-02,
198
198
  (
199
- line-height: carbon--rem(24),
199
+ line-height: carbon--rem(24px),
200
200
  )
201
201
  ) !default;
202
202
 
@@ -17,6 +17,11 @@ $carbon--base-font-size: 16px !default;
17
17
  /// @access public
18
18
  /// @group @carbon/layout
19
19
  @function carbon--rem($px) {
20
+ @if unit($px) != 'px' {
21
+ // TODO: update to @error in v11
22
+ @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
23
+ }
24
+
20
25
  @return ($px / $carbon--base-font-size) * 1rem;
21
26
  }
22
27
 
@@ -26,5 +31,10 @@ $carbon--base-font-size: 16px !default;
26
31
  /// @access public
27
32
  /// @group @carbon/layout
28
33
  @function carbon--em($px) {
34
+ @if unit($px) != 'px' {
35
+ // TODO: update to @error in v11
36
+ @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
37
+ }
38
+
29
39
  @return ($px / $carbon--base-font-size) * 1em;
30
40
  }