@carbon/styles 0.14.0-rc.0 → 0.14.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/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.14.0-rc.0",
4
+ "version": "0.14.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.36.0-rc.0",
23
+ "@carbon/colors": "^10.36.0",
24
24
  "@carbon/feature-flags": "^0.7.0",
25
- "@carbon/grid": "^10.41.0-rc.0",
26
- "@carbon/layout": "^10.36.0-rc.0",
27
- "@carbon/motion": "^10.28.0-rc.0",
28
- "@carbon/themes": "^10.51.0-rc.0",
29
- "@carbon/type": "^10.41.0-rc.0",
25
+ "@carbon/grid": "^10.41.0",
26
+ "@carbon/layout": "^10.36.0",
27
+ "@carbon/motion": "^10.28.0",
28
+ "@carbon/themes": "^10.51.0",
29
+ "@carbon/type": "^10.41.0",
30
30
  "@ibm/plex": "6.0.0-next.6"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@carbon/test-utils": "^10.21.0",
34
34
  "css": "^3.0.0"
35
35
  },
36
- "gitHead": "6f5bca3be0e19dc7590617c704a2834514b3176b"
36
+ "gitHead": "6a49764a3df2cc3e3b8fce6575f4853d1400e183"
37
37
  }
package/scss/_config.scss CHANGED
@@ -48,3 +48,9 @@ $use-google-fonts: false !default;
48
48
  /// @type String
49
49
  /// @group config
50
50
  $prefix: 'cds' !default;
51
+
52
+ /// Total columns used in the flex grid
53
+ /// @type Number
54
+ /// @access public
55
+ /// @group @carbon/grid
56
+ $flex-grid-columns: 16 !default;
package/scss/_grid.scss CHANGED
@@ -10,11 +10,13 @@
10
10
  @forward '@carbon/grid'
11
11
  show css-grid,
12
12
  subgrid,
13
+ flex-grid,
13
14
  $grid-gutter,
14
15
  $grid-gutter-condensed,
15
16
  $grid-breakpoints
16
17
  with (
17
- $prefix: config.$prefix
18
+ $prefix: config.$prefix,
19
+ $flex-grid-columns: config.$flex-grid-columns,
18
20
  );
19
21
 
20
22
  @use '@carbon/grid';
@@ -6,6 +6,7 @@
6
6
  //
7
7
 
8
8
  @use 'accordion';
9
+ @use 'aspect-ratio';
9
10
  @use 'breadcrumb';
10
11
  @use 'button';
11
12
  @use 'checkbox';
@@ -0,0 +1,72 @@
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:math';
9
+ @use 'sass:meta';
10
+ @use '../../config' as *;
11
+
12
+ /// The aspect ratios that are used to generate corresponding aspect ratio
13
+ /// classes in code
14
+ /// @type List
15
+ /// @access public
16
+ /// @group @carbon/grid
17
+ $carbon--aspect-ratios: (
18
+ (16, 9),
19
+ (9, 16),
20
+ (2, 1),
21
+ (1, 2),
22
+ (4, 3),
23
+ (3, 4),
24
+ (3, 2),
25
+ (2, 3),
26
+ (1, 1)
27
+ );
28
+
29
+ /// Generates the CSS classname utilities for the aspect ratios
30
+ ///
31
+ /// CSS Tricks article on aspect ratios and all the different ways it can be done.
32
+ /// https://css-tricks.com/aspect-ratio-boxes/#article-header-id-6
33
+ ///
34
+ /// That article references an earlier article on the topic.
35
+ /// https://keithjgrant.com/posts/2017/03/aspect-ratios/
36
+ ///
37
+ /// @param {Number} $width width from an aspect ratio
38
+ /// @param {Number} $height height from an aspect ratio
39
+ /// @access private
40
+ /// @group @carbon/grid
41
+ @mixin aspect-ratio($aspect-ratios: $carbon--aspect-ratios) {
42
+ .#{$prefix}--aspect-ratio {
43
+ position: relative;
44
+ }
45
+
46
+ .#{$prefix}--aspect-ratio::before {
47
+ width: 1px;
48
+ height: 0;
49
+ margin-left: -1px;
50
+ content: '';
51
+ float: left;
52
+ }
53
+
54
+ .#{$prefix}--aspect-ratio::after {
55
+ display: table;
56
+ clear: both;
57
+ content: '';
58
+ }
59
+
60
+ @each $aspect-ratio in $aspect-ratios {
61
+ $width: nth($aspect-ratio, 1);
62
+ $height: nth($aspect-ratio, 2);
63
+
64
+ .#{$prefix}--aspect-ratio--#{$width}x#{$height}::before {
65
+ @if meta.function-exists('div', 'math') {
66
+ padding-top: percentage(math.div($height, $width));
67
+ } @else {
68
+ padding-top: percentage(($height / $width));
69
+ }
70
+ }
71
+ }
72
+ }
@@ -0,0 +1,11 @@
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
+ @forward 'aspect-ratio';
9
+ @use 'aspect-ratio';
10
+
11
+ @include aspect-ratio.aspect-ratio;
@@ -112,7 +112,7 @@ $list-box-menu-width: rem(300px);
112
112
 
113
113
  // V11: Possibly deprecate
114
114
  .#{$prefix}--list-box--expanded:hover.#{$prefix}--list-box--light:hover {
115
- background-color: $field-02;
115
+ background-color: $field;
116
116
  }
117
117
 
118
118
  .#{$prefix}--list-box .#{$prefix}--text-input {
@@ -153,21 +153,21 @@ $list-box-menu-width: rem(300px);
153
153
  // V11: Possibly deprecate
154
154
  // Light variation for 'list-box'
155
155
  .#{$prefix}--list-box--light {
156
- background-color: $field-02;
156
+ background-color: $field;
157
157
 
158
158
  &:hover {
159
- background-color: $layer-hover-02;
159
+ background-color: $layer-hover;
160
160
  }
161
161
  }
162
162
 
163
163
  // V11: Possibly deprecate
164
164
  .#{$prefix}--list-box--light .#{$prefix}--list-box__menu {
165
- background: $field-02;
165
+ background: $field;
166
166
  }
167
167
 
168
168
  // V11: Possibly deprecate
169
169
  .#{$prefix}--list-box--light .#{$prefix}--list-box__menu-item__option {
170
- border-top-color: $border-subtle-02;
170
+ border-top-color: $border-subtle;
171
171
  }
172
172
 
173
173
  .#{$prefix}--list-box--light.#{$prefix}--list-box--expanded {
@@ -181,7 +181,7 @@ $list-box-menu-width: rem(300px);
181
181
 
182
182
  // V11: Possibly deprecate
183
183
  .#{$prefix}--list-box--light.#{$prefix}--list-box--disabled {
184
- background-color: $field-02;
184
+ background-color: $field;
185
185
  }
186
186
 
187
187
  .#{$prefix}--list-box--disabled,
@@ -556,7 +556,7 @@ $list-box-menu-width: rem(300px);
556
556
 
557
557
  // V11: Possibly deprecate
558
558
  .#{$prefix}--list-box--light .#{$prefix}--list-box__menu-item:hover {
559
- background-color: $layer-hover-02;
559
+ background-color: $layer-hover;
560
560
  }
561
561
 
562
562
  .#{$prefix}--list-box--sm .#{$prefix}--list-box__menu-item {
@@ -573,8 +573,7 @@ $list-box-menu-width: rem(300px);
573
573
 
574
574
  // V11: Possibly deprecate
575
575
  .#{$prefix}--list-box--light .#{$prefix}--list-box__menu-item:active {
576
- // To Do: What should this variable be?
577
- // background-color: $selected-light-ui;
576
+ background-color: $layer-selected;
578
577
  }
579
578
 
580
579
  .#{$prefix}--list-box--disabled
@@ -727,9 +726,8 @@ $list-box-menu-width: rem(300px);
727
726
 
728
727
  // V11: Possibly deprecate
729
728
  .#{$prefix}--list-box--light .#{$prefix}--list-box__menu-item--active {
730
- // To Do: What should this token be?
731
- // border-bottom-color: $selected-light-ui;
732
- // background-color: $selected-light-ui;
729
+ border-bottom-color: $layer-selected;
730
+ background-color: $layer-selected;
733
731
  }
734
732
 
735
733
  .#{$prefix}--list-box__menu-item--active:hover,