@carbon/type 10.44.0-rc.0 → 11.0.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/README.md +2 -6
- package/index.scss +7 -7
- package/package.json +6 -6
- package/scss/_classes.scss +8 -7
- package/scss/{modules/_default-type.scss → _default-type.scss} +2 -8
- package/scss/_font-family.scss +51 -17
- package/scss/_inlined/_classes.scss +8 -7
- package/scss/_inlined/_default-type.scss +49 -0
- package/scss/_inlined/_font-family.scss +51 -17
- package/scss/_inlined/_reset.scss +11 -59
- package/scss/_inlined/_scale.scss +13 -15
- package/scss/_inlined/_styles.scss +146 -214
- package/scss/_reset.scss +11 -59
- package/scss/_scale.scss +13 -15
- package/scss/_styles.scss +146 -214
- package/scss/vendor/@carbon/grid/{modules/_breakpoint.scss → _breakpoint.scss} +1 -1
- package/scss/vendor/@carbon/grid/{modules/_config.scss → _config.scss} +1 -1
- package/scss/vendor/@carbon/grid/{modules/_css-grid.scss → _css-grid.scss} +0 -0
- package/scss/vendor/@carbon/grid/{modules/_flex-grid.scss → _flex-grid.scss} +0 -20
- package/scss/vendor/@carbon/grid/_inlined/_breakpoint.scss +198 -0
- package/scss/vendor/@carbon/grid/_inlined/_config.scss +94 -0
- package/scss/vendor/@carbon/grid/_inlined/_css-grid.scss +470 -0
- package/scss/vendor/@carbon/grid/{modules/_mixins.scss → _inlined/_flex-grid.scss} +45 -38
- package/scss/vendor/@carbon/grid/_inlined/_mixins.scss +89 -188
- package/scss/vendor/@carbon/grid/_mixins.scss +89 -188
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_convert.import.scss +2 -4
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_convert.scss +18 -23
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_spacing.scss +2 -5
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_utilities.scss +4 -4
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_container.scss +13 -43
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_fluid-spacing.scss +11 -35
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_icon-size.scss +8 -17
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_size.scss +1 -1
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_spacing.scss +29 -107
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/modules/_convert.scss +2 -4
- package/scss/_inlined/_styles.import.scss +0 -766
- package/scss/_inlined/font-face/_mono.scss +0 -1166
- package/scss/_inlined/font-face/_sans-condensed.scss +0 -1009
- package/scss/_inlined/font-face/_sans.scss +0 -1326
- package/scss/_inlined/font-face/_serif.scss +0 -1166
- package/scss/_inlined/font-face/_settings.scss +0 -12
- package/scss/_styles.import.scss +0 -766
- package/scss/font-face/_mono.scss +0 -1166
- package/scss/font-face/_sans-condensed.scss +0 -1009
- package/scss/font-face/_sans.scss +0 -1326
- package/scss/font-face/_serif.scss +0 -1166
- package/scss/font-face/_settings.scss +0 -12
- package/scss/index.scss +0 -8
- package/scss/modules/_classes.scss +0 -42
- package/scss/modules/_font-family.scss +0 -104
- package/scss/modules/_prefix.scss +0 -11
- package/scss/modules/_reset.scss +0 -44
- package/scss/modules/_scale.scss +0 -57
- package/scss/modules/_styles.scss +0 -876
- package/scss/type.scss +0 -8
- package/scss/vendor/@carbon/grid/12.scss +0 -41
- package/scss/vendor/@carbon/grid/_inlined/12.scss +0 -41
- package/scss/vendor/@carbon/grid/_inlined/_mixins.import.scss +0 -431
- package/scss/vendor/@carbon/grid/_inlined/_prefix.scss +0 -12
- package/scss/vendor/@carbon/grid/_mixins.import.scss +0 -431
- package/scss/vendor/@carbon/grid/_prefix.scss +0 -12
- package/scss/vendor/@carbon/grid/grid.scss +0 -10
- package/scss/vendor/@carbon/grid/index.scss +0 -10
- package/scss/vendor/@carbon/grid/vendor/@carbon/import-once/import-once.scss +0 -27
- package/scss/vendor/@carbon/grid/vendor/@carbon/import-once/index.scss +0 -8
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_breakpoint.scss +0 -246
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_key-height.import.scss +0 -117
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_key-height.scss +0 -111
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/_mini-unit.scss +0 -23
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/generated/_layout.scss +0 -97
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/index.scss +0 -8
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/layout.scss +0 -12
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/modules/_spacing.scss +0 -9
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/modules/_utilities.scss +0 -41
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/modules/generated/_fluid-spacing.scss +0 -37
- package/scss/vendor/@carbon/grid/vendor/@carbon/layout/modules/generated/_spacing.scss +0 -91
- package/scss/vendor/@carbon/import-once/import-once.scss +0 -27
- package/scss/vendor/@carbon/import-once/index.scss +0 -8
|
@@ -1,12 +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
|
-
/// Defines how font files are loaded and displayed by the browser
|
|
9
|
-
/// @link https://css-tricks.com/almanac/properties/f/font-display/
|
|
10
|
-
/// @access public
|
|
11
|
-
/// @group @carbon/type
|
|
12
|
-
$carbon--font-display: auto !default;
|
package/scss/index.scss
DELETED
|
@@ -1,42 +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
|
-
@use 'sass:map';
|
|
9
|
-
@use 'font-family' as *;
|
|
10
|
-
@use 'prefix' as *;
|
|
11
|
-
@use 'styles' as *;
|
|
12
|
-
|
|
13
|
-
/// Create type classes for font families, weights, styles
|
|
14
|
-
/// @access public
|
|
15
|
-
/// @group @carbon/type
|
|
16
|
-
@mixin type-classes {
|
|
17
|
-
// Font families
|
|
18
|
-
@each $name, $value in $font-families {
|
|
19
|
-
.#{$prefix}--type-#{$name} {
|
|
20
|
-
font-family: $value;
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
// Font weights
|
|
25
|
-
@each $name, $value in $font-weights {
|
|
26
|
-
.#{$prefix}--type-#{$name} {
|
|
27
|
-
font-weight: $value;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// Font styles
|
|
32
|
-
.#{$prefix}--type-italic {
|
|
33
|
-
font-style: italic;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
// Type styles
|
|
37
|
-
@each $name, $value in $tokens {
|
|
38
|
-
.#{$prefix}--type-#{$name} {
|
|
39
|
-
@include type-style($name, map.has-key($value, breakpoints));
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,104 +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
|
-
@use 'sass:string';
|
|
9
|
-
|
|
10
|
-
/// Font family fallbacks for: IBM Plex Mono, IBM Plex Sans, IBM Plex Sans
|
|
11
|
-
/// Condensed, IBM Plex Sans Hebrew, and IBM Plex Serif
|
|
12
|
-
/// @type Map
|
|
13
|
-
/// @access public
|
|
14
|
-
/// @group @carbon/type
|
|
15
|
-
$font-families: (
|
|
16
|
-
'mono':
|
|
17
|
-
string.unquote(
|
|
18
|
-
"'IBM Plex Mono', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', monospace"
|
|
19
|
-
),
|
|
20
|
-
'sans':
|
|
21
|
-
string.unquote(
|
|
22
|
-
"'IBM Plex Sans', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
23
|
-
),
|
|
24
|
-
'sans-condensed':
|
|
25
|
-
string.unquote(
|
|
26
|
-
"'IBM Plex Sans Condensed', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
27
|
-
),
|
|
28
|
-
'sans-arabic':
|
|
29
|
-
string.unquote(
|
|
30
|
-
"'IBM Plex Sans Arabic', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
31
|
-
),
|
|
32
|
-
'sans-devanagari':
|
|
33
|
-
string.unquote(
|
|
34
|
-
"'IBM Plex Sans Devanagari', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
35
|
-
),
|
|
36
|
-
'sans-hebrew':
|
|
37
|
-
string.unquote(
|
|
38
|
-
"'IBM Plex Sans Hebrew', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
39
|
-
),
|
|
40
|
-
'sans-jp':
|
|
41
|
-
string.unquote(
|
|
42
|
-
"'IBM Plex Sans JP', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
43
|
-
),
|
|
44
|
-
'sans-kr':
|
|
45
|
-
string.unquote(
|
|
46
|
-
"'IBM Plex Sans KR', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
47
|
-
),
|
|
48
|
-
'sans-thai-looped':
|
|
49
|
-
string.unquote(
|
|
50
|
-
"'IBM Plex Sans Thai Looped', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
51
|
-
),
|
|
52
|
-
'sans-thai':
|
|
53
|
-
string.unquote(
|
|
54
|
-
"'IBM Plex Sans Thai', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', sans-serif"
|
|
55
|
-
),
|
|
56
|
-
'serif':
|
|
57
|
-
string.unquote(
|
|
58
|
-
"'IBM Plex Serif', system-ui, -apple-system, BlinkMacSystemFont, '.SFNSText-Regular', serif"
|
|
59
|
-
),
|
|
60
|
-
) !default;
|
|
61
|
-
|
|
62
|
-
/// Get the font-family for an IBM Plex font
|
|
63
|
-
/// @param {String} $name
|
|
64
|
-
/// @return {String}
|
|
65
|
-
/// @access public
|
|
66
|
-
/// @group @carbon/type
|
|
67
|
-
@function font-family($name) {
|
|
68
|
-
@return map-get($font-families, $name);
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
/// Include the `font-family` definition for the given name in your selector
|
|
72
|
-
/// @param {String} $name
|
|
73
|
-
/// @access public
|
|
74
|
-
/// @group @carbon/type
|
|
75
|
-
@mixin font-family($name) {
|
|
76
|
-
font-family: font-family($name);
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
/// Suggested font weights to be used in product
|
|
80
|
-
/// @type Map
|
|
81
|
-
/// @access public
|
|
82
|
-
/// @group @carbon/type
|
|
83
|
-
$font-weights: (
|
|
84
|
-
'light': 300,
|
|
85
|
-
'regular': 400,
|
|
86
|
-
'semibold': 600,
|
|
87
|
-
) !default;
|
|
88
|
-
|
|
89
|
-
/// Retrieve the font-weight value for a given name
|
|
90
|
-
/// @param {String} $weight
|
|
91
|
-
/// @return {Number}
|
|
92
|
-
/// @access public
|
|
93
|
-
/// @group @carbon/type
|
|
94
|
-
@function font-weight($weight) {
|
|
95
|
-
@return map-get($font-weights, $weight);
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
/// Set the `font-weight` property with the value for a given name
|
|
99
|
-
/// @param {String} $weight
|
|
100
|
-
/// @access public
|
|
101
|
-
/// @group @carbon/type
|
|
102
|
-
@mixin font-weight($weight) {
|
|
103
|
-
font-weight: font-weight($weight);
|
|
104
|
-
}
|
|
@@ -1,11 +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
|
-
/// @type String
|
|
9
|
-
/// @access public
|
|
10
|
-
/// @group @carbon/type
|
|
11
|
-
$prefix: 'bx' !default;
|
package/scss/modules/_reset.scss
DELETED
|
@@ -1,44 +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
|
-
@use 'sass:map';
|
|
9
|
-
@use 'sass:meta';
|
|
10
|
-
@use '@carbon/layout';
|
|
11
|
-
@use 'font-family' as *;
|
|
12
|
-
|
|
13
|
-
/// Include a type reset for a given body and mono font family
|
|
14
|
-
/// @param {String} $body-font-family [font-family('sans')] - The font family used on the `<body>` element
|
|
15
|
-
/// @param {String} $mono-font-family [font-family('mono')] - The font family used on elements that require mono fonts, like the `<code>` element
|
|
16
|
-
/// @access public
|
|
17
|
-
/// @group @carbon/type
|
|
18
|
-
@mixin reset(
|
|
19
|
-
// TODO: remove in next major release. This has been replaced with 100%
|
|
20
|
-
$base-font-size: layout.$base-font-size,
|
|
21
|
-
$body-font-family: font-family('sans'),
|
|
22
|
-
$mono-font-family: font-family('mono')
|
|
23
|
-
) {
|
|
24
|
-
html {
|
|
25
|
-
font-size: 100%;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
body {
|
|
29
|
-
@include font-weight('regular');
|
|
30
|
-
|
|
31
|
-
font-family: $body-font-family;
|
|
32
|
-
-moz-osx-font-smoothing: grayscale;
|
|
33
|
-
-webkit-font-smoothing: antialiased;
|
|
34
|
-
text-rendering: optimizeLegibility;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
code {
|
|
38
|
-
font-family: $mono-font-family;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
strong {
|
|
42
|
-
@include font-weight('semibold');
|
|
43
|
-
}
|
|
44
|
-
}
|
package/scss/modules/_scale.scss
DELETED
|
@@ -1,57 +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
|
-
@use '@carbon/layout';
|
|
9
|
-
@use 'sass:list';
|
|
10
|
-
|
|
11
|
-
/// Compute the type size for the given type scale step
|
|
12
|
-
/// @param {Number} $step
|
|
13
|
-
/// @return {Number} In px
|
|
14
|
-
/// @access public
|
|
15
|
-
/// @group @carbon/type
|
|
16
|
-
@function get-type-size($step) {
|
|
17
|
-
@if $step == 1 {
|
|
18
|
-
@return 12px;
|
|
19
|
-
}
|
|
20
|
-
// Yn = Yn-1 + {INT[(n-2)/4] + 1} * 2
|
|
21
|
-
@return get-type-size($step - 1) + (floor(($step - 2) * 0.25) + 1) * 2;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
/// Type scale follows a custom formula for determining each step size and supports sizes from 12px to 92px
|
|
25
|
-
/// @type Map
|
|
26
|
-
/// @access public
|
|
27
|
-
/// @group @carbon/type
|
|
28
|
-
$type-scale: ();
|
|
29
|
-
@for $i from 1 through 23 {
|
|
30
|
-
$type-scale: list.append($type-scale, layout.rem(get-type-size($i)));
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
/// Get the value of a specific step in the type scale
|
|
34
|
-
/// @param {Number} $step
|
|
35
|
-
/// @return {Number} In rem
|
|
36
|
-
/// @access public
|
|
37
|
-
/// @group @carbon/type
|
|
38
|
-
@function type-scale($step) {
|
|
39
|
-
@return nth($type-scale, $step);
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/// Set the font-size value of a selector with the value at the given `$step`
|
|
43
|
-
/// @param {Number} $step
|
|
44
|
-
/// @access public
|
|
45
|
-
/// @group @carbon/type
|
|
46
|
-
@mixin type-scale($step) {
|
|
47
|
-
font-size: type-scale($step);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
/// Alias of `type-scale` mixin.
|
|
51
|
-
/// @param {Number} $step
|
|
52
|
-
/// @alias type-scale
|
|
53
|
-
/// @access public
|
|
54
|
-
/// @group @carbon/type
|
|
55
|
-
@mixin font-size($step) {
|
|
56
|
-
font-size: type-scale($step);
|
|
57
|
-
}
|