@carbon/styles 1.31.0 → 1.31.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/css/styles.css +20 -4
- package/css/styles.min.css +1 -1
- package/package.json +2 -2
- package/scss/_layout.scss +22 -3
- package/scss/components/button/_mixins.scss +10 -2
- package/scss/components/contained-list/_contained-list.scss +18 -2
- package/scss/components/notification/_actionable-notification.scss +2 -1
- package/scss/utilities/_layout.scss +3 -23
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": "1.31.
|
|
4
|
+
"version": "1.31.2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"scss/**/*.css",
|
|
60
60
|
"css/**/*.css"
|
|
61
61
|
],
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "d08d95d74d074985456f6e452d3247789733e199"
|
|
63
63
|
}
|
package/scss/_layout.scss
CHANGED
|
@@ -11,10 +11,29 @@
|
|
|
11
11
|
@use './config' as *;
|
|
12
12
|
@use './utilities/custom-property';
|
|
13
13
|
@use './utilities/convert' as *;
|
|
14
|
-
@use './
|
|
14
|
+
@use './spacing' as *;
|
|
15
|
+
|
|
16
|
+
$layout-tokens: (
|
|
17
|
+
size: (
|
|
18
|
+
height: (
|
|
19
|
+
xs: rem(24px),
|
|
20
|
+
sm: rem(32px),
|
|
21
|
+
md: rem(40px),
|
|
22
|
+
lg: rem(48px),
|
|
23
|
+
xl: rem(64px),
|
|
24
|
+
2xl: rem(80px),
|
|
25
|
+
),
|
|
26
|
+
),
|
|
27
|
+
density: (
|
|
28
|
+
padding-inline: (
|
|
29
|
+
condensed: $spacing-03,
|
|
30
|
+
normal: $spacing-05,
|
|
31
|
+
),
|
|
32
|
+
),
|
|
33
|
+
);
|
|
15
34
|
|
|
16
35
|
:root {
|
|
17
|
-
@each $group, $properties in $tokens {
|
|
36
|
+
@each $group, $properties in $layout-tokens {
|
|
18
37
|
@each $property, $steps in $properties {
|
|
19
38
|
@each $step, $value in $steps {
|
|
20
39
|
@include custom-property.declaration(
|
|
@@ -39,7 +58,7 @@
|
|
|
39
58
|
}
|
|
40
59
|
}
|
|
41
60
|
|
|
42
|
-
@each $group, $properties in $tokens {
|
|
61
|
+
@each $group, $properties in $layout-tokens {
|
|
43
62
|
@each $property, $steps in $properties {
|
|
44
63
|
@each $step, $value in $steps {
|
|
45
64
|
.#{$prefix}--layout--#{$group}-#{$step} {
|
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
+
@use 'sass:map';
|
|
9
|
+
|
|
8
10
|
@use 'vars' as *;
|
|
9
11
|
@use '../../config' as *;
|
|
10
12
|
@use '../../motion' as *;
|
|
@@ -21,10 +23,16 @@ $button-focus-color: custom-property.get-var('button-focus-color', $focus);
|
|
|
21
23
|
|
|
22
24
|
@mixin button-base {
|
|
23
25
|
// https://caniuse.com/mdn-css_types_length_lh
|
|
24
|
-
--temp-1lh: (
|
|
26
|
+
--temp-1lh: (
|
|
27
|
+
#{custom-property.get-var(
|
|
28
|
+
'body-compact-01-line-height',
|
|
29
|
+
map.get($body-compact-01, line-height)
|
|
30
|
+
)} * 1em
|
|
31
|
+
);
|
|
25
32
|
// -1px to compensate for border width
|
|
26
33
|
--temp-padding-block-max: calc(
|
|
27
|
-
(var(
|
|
34
|
+
(#{custom-property.get-var('layout-size-height-lg')} - var(--temp-1lh)) / 2 -
|
|
35
|
+
#{rem(1px)}
|
|
28
36
|
);
|
|
29
37
|
|
|
30
38
|
@include component-reset.reset;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// LICENSE file in the root directory of this source tree.
|
|
6
6
|
//
|
|
7
7
|
|
|
8
|
-
@use 'sass:
|
|
8
|
+
@use 'sass:map';
|
|
9
9
|
|
|
10
10
|
@use '../../config' as *;
|
|
11
11
|
@use '../../motion' as *;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
@use '../../utilities/button-reset';
|
|
16
16
|
@use '../../utilities/convert' as *;
|
|
17
17
|
@use '../../utilities/focus-outline' as *;
|
|
18
|
+
@use '../../utilities/custom-property';
|
|
18
19
|
@use '../../utilities/layout';
|
|
19
20
|
|
|
20
21
|
/// Contained List styles
|
|
@@ -26,6 +27,11 @@
|
|
|
26
27
|
@include layout.use('density', $default: 'normal');
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
.#{$prefix}--contained-list > ul {
|
|
31
|
+
padding: 0;
|
|
32
|
+
margin: 0;
|
|
33
|
+
}
|
|
34
|
+
|
|
29
35
|
.#{$prefix}--contained-list__header {
|
|
30
36
|
position: sticky;
|
|
31
37
|
z-index: 1;
|
|
@@ -126,12 +132,17 @@
|
|
|
126
132
|
|
|
127
133
|
.#{$prefix}--contained-list-item {
|
|
128
134
|
position: relative;
|
|
135
|
+
list-style: none;
|
|
129
136
|
}
|
|
130
137
|
|
|
131
138
|
.#{$prefix}--contained-list-item:not(:first-of-type) {
|
|
132
139
|
margin-top: -1px;
|
|
133
140
|
}
|
|
134
141
|
|
|
142
|
+
.#{$prefix}--contained-list-item__content {
|
|
143
|
+
box-sizing: border-box;
|
|
144
|
+
}
|
|
145
|
+
|
|
135
146
|
.#{$prefix}--contained-list-item--clickable
|
|
136
147
|
.#{$prefix}--contained-list-item__content {
|
|
137
148
|
@include button-reset.reset;
|
|
@@ -145,7 +156,12 @@
|
|
|
145
156
|
.#{$prefix}--contained-list-item--clickable
|
|
146
157
|
.#{$prefix}--contained-list-item__content {
|
|
147
158
|
// https://caniuse.com/mdn-css_types_length_lh
|
|
148
|
-
--temp-1lh: (
|
|
159
|
+
--temp-1lh: (
|
|
160
|
+
#{custom-property.get-var(
|
|
161
|
+
'body-01-line-height',
|
|
162
|
+
map.get($body-01, line-height)
|
|
163
|
+
)} * 1em
|
|
164
|
+
);
|
|
149
165
|
|
|
150
166
|
@include type-style('body-01');
|
|
151
167
|
|
|
@@ -315,7 +315,8 @@
|
|
|
315
315
|
|
|
316
316
|
/* Tertiary action button when not inline (toast) */
|
|
317
317
|
.#{$prefix}--actionable-notification__action-button.#{$prefix}--btn--tertiary {
|
|
318
|
-
padding:
|
|
318
|
+
padding-right: $spacing-05;
|
|
319
|
+
padding-left: $spacing-05;
|
|
319
320
|
margin-bottom: $spacing-05;
|
|
320
321
|
|
|
321
322
|
// Button should be left aligned with text.
|
|
@@ -8,28 +8,8 @@
|
|
|
8
8
|
@use 'sass:map';
|
|
9
9
|
|
|
10
10
|
@use '../config';
|
|
11
|
-
@use '../
|
|
11
|
+
@use '../layout' as *;
|
|
12
12
|
@use './custom-property';
|
|
13
|
-
@use './convert' as *;
|
|
14
|
-
|
|
15
|
-
$tokens: (
|
|
16
|
-
size: (
|
|
17
|
-
height: (
|
|
18
|
-
xs: rem(24px),
|
|
19
|
-
sm: rem(32px),
|
|
20
|
-
md: rem(40px),
|
|
21
|
-
lg: rem(48px),
|
|
22
|
-
xl: rem(64px),
|
|
23
|
-
2xl: rem(80px),
|
|
24
|
-
),
|
|
25
|
-
),
|
|
26
|
-
density: (
|
|
27
|
-
padding-inline: (
|
|
28
|
-
condensed: $spacing-03,
|
|
29
|
-
normal: $spacing-05,
|
|
30
|
-
),
|
|
31
|
-
),
|
|
32
|
-
);
|
|
33
13
|
|
|
34
14
|
/// Enables the use of contextual layout tokens within a component. This mixin should be
|
|
35
15
|
/// included on the outermost selector of the component.
|
|
@@ -41,7 +21,7 @@ $tokens: (
|
|
|
41
21
|
/// @group utilities
|
|
42
22
|
/// @access public
|
|
43
23
|
@mixin use($group, $default, $min: null, $max: null) {
|
|
44
|
-
$properties: map.get($tokens, $group);
|
|
24
|
+
$properties: map.get($layout-tokens, $group);
|
|
45
25
|
|
|
46
26
|
@each $property, $steps in $properties {
|
|
47
27
|
$minValue: custom-property.get-var('layout-#{$group}-#{$property}-min');
|
|
@@ -106,7 +86,7 @@ $tokens: (
|
|
|
106
86
|
}
|
|
107
87
|
|
|
108
88
|
/// Internal base function for retrieving a property from a layout group.
|
|
109
|
-
/// @param {String} $group - The group name as defined in the $tokens
|
|
89
|
+
/// @param {String} $group - The group name as defined in the $layout-tokens
|
|
110
90
|
/// @param {String} $property - The property name
|
|
111
91
|
/// @example @include -group('size', $property)
|
|
112
92
|
/// @group utilities
|