@carbon/styles 0.2.0-rc.0 → 0.2.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 CHANGED
@@ -51,6 +51,7 @@ between version updates.
51
51
  | [`scss/compat/`](#compatibility) | Helper themes and tokens for migrating from v10 to v11 |
52
52
  | [`scss/config`](#config) | Configure various options for the package |
53
53
  | [`scss/feature-flags`](#feature-flags) | Configure various feature flags for experiments |
54
+ | [`scss/font-face`](#font-face) | Configure the IBM Plex font and languages |
54
55
  | [`scss/grid`](#grid) | Access and use the CSS Grid built-in to Carbon |
55
56
  | [`scss/motion`](#motion) | Helper function, mixins, and tokens for motion |
56
57
  | [`scss/reset`](#reset) | A CSS Reset |
@@ -100,6 +101,42 @@ docs.
100
101
  | :------------------------------------------ | :------------------------- |
101
102
  | `@use '@carbon/styles/scss/feature-flags';` | `scss/_feature-flags.scss` |
102
103
 
104
+ ## Font Face
105
+
106
+ | Import | Filepath |
107
+ | :-------------------------------------- | :--------------------- |
108
+ | `@use '@carbon/styles/scss/font-face';` | `scss/_font-face.scss` |
109
+
110
+ ### Using IBM Plex
111
+
112
+ By default, IBM Plex will be emitted when importing via the `@carbon/styles`
113
+ main entrypoint or referencing the `font-face` file directly. If you do not want
114
+ the font-face declarations to be emitted, you can set the `css--font-face` token
115
+ to `false`:
116
+
117
+ ```scss
118
+ @use '@carbon/styles/scss/config' with (
119
+ $css--font-face: false,
120
+ );
121
+ ```
122
+
123
+ ### Emitting additional typefaces
124
+
125
+ When using the font-face declarations, only `IBM Plex Sans` and `IBM Plex Mono`
126
+ are emitted. If you would like to emit additional typefaces, like
127
+ `IBM Plex Sans Arabic`, you can set additional config tokens:
128
+
129
+ ```scss
130
+ @use '@carbon/styles/scss/config' with (
131
+ $css--plex-arabic: true,
132
+ );
133
+ ```
134
+
135
+ | IBM Plex Language | Token |
136
+ | :---------------- | :------------------ |
137
+ | Arabic | `$css--plex-arabic` |
138
+ | TODO | `TODO` |
139
+
103
140
  ## Grid
104
141
 
105
142
  | Import | Filepath |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@carbon/styles",
3
3
  "description": "Styles for the Carbon Design System",
4
- "version": "0.2.0-rc.0",
4
+ "version": "0.2.0",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",
@@ -20,18 +20,18 @@
20
20
  "access": "public"
21
21
  },
22
22
  "dependencies": {
23
- "@carbon/colors": "^10.30.0-rc.0",
24
- "@carbon/feature-flags": "^0.6.0-rc.0",
25
- "@carbon/grid": "^10.33.0-rc.0",
26
- "@carbon/layout": "^10.29.0-rc.0",
27
- "@carbon/motion": "^10.22.0-rc.0",
28
- "@carbon/themes": "^10.40.0-rc.0",
29
- "@carbon/type": "^10.33.0-rc.0",
23
+ "@carbon/colors": "^10.30.0",
24
+ "@carbon/feature-flags": "^0.6.0",
25
+ "@carbon/grid": "^10.33.0",
26
+ "@carbon/layout": "^10.29.0",
27
+ "@carbon/motion": "^10.22.0",
28
+ "@carbon/themes": "^10.40.0",
29
+ "@carbon/type": "^10.33.0",
30
30
  "@ibm/plex": "6.0.0-next.6"
31
31
  },
32
32
  "devDependencies": {
33
- "@carbon/test-utils": "^10.17.0-rc.0",
33
+ "@carbon/test-utils": "^10.17.0",
34
34
  "css": "^3.0.0"
35
35
  },
36
- "gitHead": "df847d04273c0783bea8c3034bd4c11bdbe5eaa3"
36
+ "gitHead": "9c2eb1cfa0e5b2c4dc0142b98cd8828e84640af8"
37
37
  }
@@ -6,5 +6,5 @@
6
6
  //
7
7
 
8
8
  @function loading-progress($circumference, $percentage) {
9
- @return $circumference - $percentage / 100 * $circumference;
9
+ @return $circumference - $percentage * 0.01 * $circumference;
10
10
  }
@@ -31,7 +31,7 @@
31
31
 
32
32
  .#{$prefix}--pagination-nav__page--active + &::after,
33
33
  &.#{$prefix}--pagination-nav__page--active::after {
34
- left: calc(50% - #{$spacing-05 / 2});
34
+ left: calc(50% - #{$spacing-05 * 0.5});
35
35
  width: $spacing-05;
36
36
  opacity: 1;
37
37
  }
@@ -160,8 +160,8 @@
160
160
 
161
161
  .#{$prefix}--pagination-nav__select-icon {
162
162
  position: absolute;
163
- top: calc(50% - #{$select-icon-top-position / 2});
164
- left: calc(50% - #{$select-icon-top-position / 2});
163
+ top: calc(50% - #{$select-icon-top-position * 0.5});
164
+ left: calc(50% - #{$select-icon-top-position * 0.5});
165
165
  pointer-events: none;
166
166
  }
167
167
 
@@ -24,7 +24,7 @@ $structured-list-text-transform: none !default;
24
24
  /// @group structured-list
25
25
  /// @param {Number} $padding [$structured-list-padding]
26
26
  @mixin padding-td--condensed($padding: $structured-list-padding) {
27
- padding: $padding / 4;
27
+ padding: $padding * 0.25;
28
28
  }
29
29
 
30
30
  /// Used only for [data-structured-list]
@@ -32,13 +32,13 @@ $structured-list-text-transform: none !default;
32
32
  /// @group structured-list
33
33
  /// @param {Number} $padding [$structured-list-padding]
34
34
  @mixin padding--data-structured-list($padding: $structured-list-padding) {
35
- padding-right: $padding / 2;
36
- padding-left: $padding / 2;
35
+ padding-right: $padding * 0.5;
36
+ padding-left: $padding * 0.5;
37
37
 
38
38
  // Controls gutter sizes for check
39
39
  &:first-child {
40
- padding-right: $padding / 2;
41
- padding-left: $padding / 2;
40
+ padding-right: $padding * 0.5;
41
+ padding-left: $padding * 0.5;
42
42
  }
43
43
  }
44
44
 
@@ -8,6 +8,8 @@
8
8
  /// Default font size
9
9
  /// @type Number
10
10
  /// @access public
11
+ @use "sass:math";
12
+
11
13
  $base-font-size: 16px !default;
12
14
 
13
15
  /// Convert a given px unit to a rem unit
@@ -21,7 +23,7 @@ $base-font-size: 16px !default;
21
23
  @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
22
24
  }
23
25
 
24
- @return ($px / $base-font-size) * 1rem;
26
+ @return math.div($px, $base-font-size) * 1rem;
25
27
  }
26
28
 
27
29
  /// Convert a given px unit to a em unit
@@ -35,5 +37,5 @@ $base-font-size: 16px !default;
35
37
  @warn "Expected argument $px to be of type `px`, instead received: `#{unit($px)}`";
36
38
  }
37
39
 
38
- @return ($px / $base-font-size) * 1em;
40
+ @return math.div($px, $base-font-size) * 1em;
39
41
  }