@carbon/type 10.43.0 → 10.44.0-rc.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.
@@ -0,0 +1,55 @@
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
+ @use 'styles' as *;
9
+
10
+ /// Include default type styles
11
+ /// @access public
12
+ /// @group @carbon/type
13
+ @mixin default-type {
14
+ h1 {
15
+ @include type-style('productive-heading-06');
16
+ }
17
+
18
+ h2 {
19
+ @include type-style('productive-heading-05');
20
+ }
21
+
22
+ h3 {
23
+ @include type-style('productive-heading-04');
24
+ }
25
+
26
+ h4 {
27
+ @include type-style('productive-heading-03');
28
+ }
29
+
30
+ h5 {
31
+ @include type-style('productive-heading-02');
32
+ }
33
+
34
+ h6 {
35
+ @include type-style('productive-heading-01');
36
+ }
37
+
38
+ p {
39
+ @include type-style('body-long-02');
40
+ }
41
+
42
+ a {
43
+ @if meta.global-variable-exists('carbon--theme') and
44
+ map.has-key($carbon--theme, 'link-01')
45
+ {
46
+ color: map.get($carbon--theme, 'link-01');
47
+ } @else {
48
+ color: #0062fe;
49
+ }
50
+ }
51
+
52
+ em {
53
+ font-style: italic;
54
+ }
55
+ }
@@ -9,7 +9,6 @@
9
9
  @use 'sass:meta';
10
10
  @use '@carbon/layout';
11
11
  @use 'font-family' as *;
12
- @use 'styles' as *;
13
12
 
14
13
  /// Include a type reset for a given body and mono font family
15
14
  /// @param {String} $body-font-family [font-family('sans')] - The font family used on the `<body>` element
@@ -43,50 +42,3 @@
43
42
  @include font-weight('semibold');
44
43
  }
45
44
  }
46
-
47
- /// Include default type styles
48
- /// @access public
49
- /// @group @carbon/type
50
- @mixin default-type {
51
- h1 {
52
- @include type-style('productive-heading-06');
53
- }
54
-
55
- h2 {
56
- @include type-style('productive-heading-05');
57
- }
58
-
59
- h3 {
60
- @include type-style('productive-heading-04');
61
- }
62
-
63
- h4 {
64
- @include type-style('productive-heading-03');
65
- }
66
-
67
- h5 {
68
- @include type-style('productive-heading-02');
69
- }
70
-
71
- h6 {
72
- @include type-style('productive-heading-01');
73
- }
74
-
75
- p {
76
- @include type-style('body-long-02');
77
- }
78
-
79
- a {
80
- @if meta.global-variable-exists('carbon--theme') and
81
- map.has-key($carbon--theme, 'link-01')
82
- {
83
- color: map.get($carbon--theme, 'link-01');
84
- } @else {
85
- color: #0062fe;
86
- }
87
- }
88
-
89
- em {
90
- font-style: italic;
91
- }
92
- }
@@ -9,7 +9,8 @@
9
9
 
10
10
  @use 'sass:map';
11
11
  @use 'sass:math';
12
- @use '@carbon/grid/scss/modules/config' as grid;
12
+ @use '@carbon/grid/scss/modules/config' as gridconfig;
13
+ @use '@carbon/grid/scss/modules/breakpoint' as grid;
13
14
  @use 'font-family';
14
15
  @use 'scale';
15
16
 
@@ -716,7 +717,7 @@ $tokens: (
716
717
  /// @param {Map} $breakpoints [$grid-breakpoints] - Custom breakpoints to use
717
718
  /// @access public
718
719
  /// @group @carbon/type
719
- @mixin fluid-type($type-styles, $breakpoints: grid.$grid-breakpoints) {
720
+ @mixin fluid-type($type-styles, $breakpoints: gridconfig.$grid-breakpoints) {
720
721
  // Include the initial styles for the given token by default without any
721
722
  // media query guard. This includes `font-size` as a fallback in the case
722
723
  // that a browser does not support `calc()`
@@ -745,7 +746,7 @@ $tokens: (
745
746
  @mixin fluid-type-size(
746
747
  $type-styles,
747
748
  $name,
748
- $breakpoints: grid.$grid-breakpoints
749
+ $breakpoints: gridconfig.$grid-breakpoints
749
750
  ) {
750
751
  // Get the information about the breakpoint we're currently working in. Useful
751
752
  // for getting initial width information
@@ -846,7 +847,11 @@ $custom-property-prefix: 'cds' !default;
846
847
  /// @param {Map} $breakpoints [$grid-breakpoints] - Provide a custom breakpoint map to use
847
848
  /// @access public
848
849
  /// @group @carbon/type
849
- @mixin type-style($name, $fluid: false, $breakpoints: grid.$grid-breakpoints) {
850
+ @mixin type-style(
851
+ $name,
852
+ $fluid: false,
853
+ $breakpoints: gridconfig.$grid-breakpoints
854
+ ) {
850
855
  @if not map.has-key($tokens, $name) {
851
856
  @error 'Unable to find a token with the name: `#{$name}`';
852
857
  }