@carbon/element-styles 0.3.15 → 0.3.16-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.
Files changed (79) hide show
  1. package/README.md +21 -0
  2. package/css/prebuilt/editorial.css +1 -1
  3. package/css/prebuilt/expressive.css +1 -1
  4. package/css/prebuilt/productive.css +1 -1
  5. package/package.json +2 -2
  6. package/scss/_config.scss +9 -0
  7. package/scss/elements/_heading/index.scss +7 -4
  8. package/scss/elements/_input/index.scss +50 -47
  9. package/scss/elements/_labelled-input/index.scss +44 -41
  10. package/scss/elements/_layer/index.scss +17 -14
  11. package/scss/elements/abbreviation/index.scss +7 -4
  12. package/scss/elements/address/index.scss +7 -4
  13. package/scss/elements/anchor/index.scss +33 -30
  14. package/scss/elements/block-quotation/index.scss +30 -27
  15. package/scss/elements/body/index.scss +7 -4
  16. package/scss/elements/bold-text/index.scss +5 -2
  17. package/scss/elements/button/index.scss +183 -180
  18. package/scss/elements/checkbox/index.scss +40 -37
  19. package/scss/elements/code/index.scss +9 -6
  20. package/scss/elements/color-input/index.scss +70 -67
  21. package/scss/elements/combo-box/index.scss +35 -32
  22. package/scss/elements/date-input/index.scss +24 -21
  23. package/scss/elements/date-time-input/index.scss +24 -21
  24. package/scss/elements/deleted-text/index.scss +8 -5
  25. package/scss/elements/description-list/index.scss +17 -14
  26. package/scss/elements/details/index.scss +53 -48
  27. package/scss/elements/dialog/index.scss +173 -170
  28. package/scss/elements/email-input/index.scss +16 -13
  29. package/scss/elements/fieldset/index.scss +15 -12
  30. package/scss/elements/file-input/index.scss +53 -50
  31. package/scss/elements/footer/index.scss +9 -6
  32. package/scss/elements/header-navigation/index.scss +101 -98
  33. package/scss/elements/heading-level-1/index.scss +6 -3
  34. package/scss/elements/heading-level-2/index.scss +6 -3
  35. package/scss/elements/heading-level-3/index.scss +6 -3
  36. package/scss/elements/heading-level-4/index.scss +6 -3
  37. package/scss/elements/heading-level-5/index.scss +6 -3
  38. package/scss/elements/heading-level-6/index.scss +6 -3
  39. package/scss/elements/horizontal-rule/index.scss +12 -9
  40. package/scss/elements/image/index.scss +6 -2
  41. package/scss/elements/inline-loading/index.scss +34 -31
  42. package/scss/elements/inline-quotation/index.scss +6 -3
  43. package/scss/elements/inserted-text/index.scss +9 -6
  44. package/scss/elements/italic-text/index.scss +5 -2
  45. package/scss/elements/keyboard-input/index.scss +9 -6
  46. package/scss/elements/label/index.scss +22 -19
  47. package/scss/elements/main/index.scss +7 -4
  48. package/scss/elements/marked-text/index.scss +7 -4
  49. package/scss/elements/menu/index.scss +71 -64
  50. package/scss/elements/meter/index.scss +45 -42
  51. package/scss/elements/number-input/index.scss +16 -12
  52. package/scss/elements/ordered-list/index.scss +25 -22
  53. package/scss/elements/paragraph/index.scss +8 -5
  54. package/scss/elements/password-input/index.scss +17 -13
  55. package/scss/elements/popover/index.scss +75 -72
  56. package/scss/elements/preformatted/index.scss +18 -15
  57. package/scss/elements/progress-bar/index.scss +71 -68
  58. package/scss/elements/radio-button/index.scss +35 -32
  59. package/scss/elements/range-input/index.scss +42 -39
  60. package/scss/elements/search-input/index.scss +21 -18
  61. package/scss/elements/select/index.scss +36 -33
  62. package/scss/elements/side-navigation/index.scss +141 -137
  63. package/scss/elements/small-text/index.scss +7 -4
  64. package/scss/elements/table/index.scss +93 -90
  65. package/scss/elements/tabs/index.scss +155 -152
  66. package/scss/elements/telephone-number-input/index.scss +16 -13
  67. package/scss/elements/text-area/index.scss +21 -18
  68. package/scss/elements/text-input/index.scss +16 -13
  69. package/scss/elements/tile/index.scss +49 -45
  70. package/scss/elements/time-input/index.scss +24 -21
  71. package/scss/elements/toggle/index.scss +71 -68
  72. package/scss/elements/tooltip/index.scss +16 -13
  73. package/scss/elements/tree-view/index.scss +86 -82
  74. package/scss/elements/unordered-list/index.scss +21 -18
  75. package/scss/elements/url-input/index.scss +16 -13
  76. package/scss/prebuilt/editorial/_elements.scss +37 -33
  77. package/scss/prebuilt/expressive/_elements.scss +75 -71
  78. package/scss/prebuilt/productive/_elements.scss +71 -67
  79. package/scss/utilities/_cascade-layer.scss +33 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@carbon/element-styles",
3
- "version": "0.3.15",
3
+ "version": "0.3.16-rc.0",
4
4
  "description": "An experimental styling system for native HTML elements, relying on semantic, attribute-focused selectors instead of class names.",
5
5
  "keywords": [
6
6
  "carbon",
@@ -54,7 +54,7 @@
54
54
  "lightningcss": "^1.33.0",
55
55
  "marked": "^18.0.6",
56
56
  "marked-highlight": "^2.2.4",
57
- "oxfmt": "^0.66.0",
57
+ "oxfmt": "^0.71.0",
58
58
  "oxlint": "^1.76.0",
59
59
  "sass": "^1.101.0",
60
60
  "typescript": "^7.0.2",
package/scss/_config.scss CHANGED
@@ -5,4 +5,13 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ /// The prefix used for all css custom properties and `@keyframes`
9
+ /// names defined by @carbon/element-styles.
10
+ /// **NOTE:** The @carbon/styles prefix will always precede this.
11
+ /// @group config
8
12
  $prefix: "es" !default;
13
+
14
+ /// The name used for the CSS `@layer` declaration wrapping
15
+ /// all emitted styles.
16
+ /// @group config
17
+ $cascade-layer-name: "carbon-element-styles" !default;
@@ -10,6 +10,7 @@
10
10
  @use "@carbon/styles/scss/spacing";
11
11
 
12
12
  @use "../../layout";
13
+ @use "../../utilities/cascade-layer";
13
14
 
14
15
  $config: () !default;
15
16
 
@@ -20,8 +21,10 @@ $-default-config: ();
20
21
  @mixin styles($config: $config) {
21
22
  $props: map.deep-merge($-default-config, $config);
22
23
 
23
- margin-block-end: layout.$mode--margin-block;
24
- margin-block-start: calc(layout.$mode--margin-block + 0.75lh);
25
- max-inline-size: min(layout.$mode--max-inline-size, 75%);
26
- text-wrap: balance;
24
+ @include cascade-layer.wrap {
25
+ margin-block-end: layout.$mode--margin-block;
26
+ margin-block-start: calc(layout.$mode--margin-block + 0.75lh);
27
+ max-inline-size: min(layout.$mode--max-inline-size, 75%);
28
+ text-wrap: balance;
29
+ }
27
30
  }
@@ -11,6 +11,7 @@
11
11
  @use "@carbon/styles/scss/utilities/focus-outline";
12
12
 
13
13
  @use "../../layout";
14
+ @use "../../utilities/cascade-layer";
14
15
 
15
16
  $config: () !default;
16
17
 
@@ -30,64 +31,66 @@ $-default-config: (
30
31
  @mixin styles($config: $config) {
31
32
  $props: map.deep-merge($-default-config, $config);
32
33
 
33
- @include layout.mode--body-compact;
34
- position: relative;
35
- appearance: none;
36
- box-shadow: none;
37
- border: none;
38
- border-radius: 0;
39
- block-size: layout.$size--block-size;
40
- padding-block-start: layout.$size--padding-block-start;
41
- padding-block-end: layout.$size--padding-block-end;
42
- padding-inline: layout.$density--padding;
43
- background-color: theme.$field;
44
- color: theme.$text-primary;
45
- border-block-end: 0.0625rem solid theme.$border-strong;
46
- box-sizing: border-box;
47
- transition-property: color, background-color;
48
- transition-duration: layout.$mode--transition-duration;
49
- transition-timing-function: layout.$mode--transition-timing-function;
34
+ @include cascade-layer.wrap {
35
+ @include layout.mode--body-compact;
36
+ position: relative;
37
+ appearance: none;
38
+ box-shadow: none;
39
+ border: none;
40
+ border-radius: 0;
41
+ block-size: layout.$size--block-size;
42
+ padding-block-start: layout.$size--padding-block-start;
43
+ padding-block-end: layout.$size--padding-block-end;
44
+ padding-inline: layout.$density--padding;
45
+ background-color: theme.$field;
46
+ color: theme.$text-primary;
47
+ border-block-end: 0.0625rem solid theme.$border-strong;
48
+ box-sizing: border-box;
49
+ transition-property: color, background-color;
50
+ transition-duration: layout.$mode--transition-duration;
51
+ transition-timing-function: layout.$mode--transition-timing-function;
50
52
 
51
- &::placeholder {
52
- font: inherit;
53
- color: theme.$text-placeholder;
54
- }
55
-
56
- @if map.get($props, "emit-readonly") {
57
- &:read-only {
58
- background-color: transparent;
59
- border-block-end-color: theme.$border-subtle;
53
+ &::placeholder {
54
+ font: inherit;
55
+ color: theme.$text-placeholder;
60
56
  }
61
- }
62
57
 
63
- @if map.get($props, "emit-disabled") {
64
- &:disabled {
65
- color: theme.$text-disabled;
66
- background-color: theme.$layer;
67
- border-block-end-color: transparent;
68
- cursor: not-allowed;
58
+ @if map.get($props, "emit-readonly") {
59
+ &:read-only {
60
+ background-color: transparent;
61
+ border-block-end-color: theme.$border-subtle;
62
+ }
69
63
  }
70
- }
71
64
 
72
- @if map.get($props, "emit-invalid") {
73
- &:invalid,
74
- &[aria-invalid="true"] {
75
- outline-offset: -0.125rem;
76
- outline: 0.125rem solid theme.$support-error;
77
- border-block-end-color: transparent;
65
+ @if map.get($props, "emit-disabled") {
66
+ &:disabled {
67
+ color: theme.$text-disabled;
68
+ background-color: theme.$layer;
69
+ border-block-end-color: transparent;
70
+ cursor: not-allowed;
71
+ }
78
72
  }
79
- }
80
73
 
81
- @if map.get($props, "emit-focus") {
82
- &:focus {
83
- @include focus-outline.focus-outline("outline");
74
+ @if map.get($props, "emit-invalid") {
75
+ &:invalid,
76
+ &[aria-invalid="true"] {
77
+ outline-offset: -0.125rem;
78
+ outline: 0.125rem solid theme.$support-error;
79
+ border-block-end-color: transparent;
80
+ }
84
81
  }
85
82
 
86
- @if map.get($props, "emit-invalid") {
87
- &:focus:invalid,
88
- &:focus[aria-invalid="true"] {
83
+ @if map.get($props, "emit-focus") {
84
+ &:focus {
89
85
  @include focus-outline.focus-outline("outline");
90
86
  }
87
+
88
+ @if map.get($props, "emit-invalid") {
89
+ &:focus:invalid,
90
+ &:focus[aria-invalid="true"] {
91
+ @include focus-outline.focus-outline("outline");
92
+ }
93
+ }
91
94
  }
92
95
  }
93
96
  }
@@ -14,6 +14,7 @@
14
14
  @use "../_input";
15
15
 
16
16
  @use "../../layout";
17
+ @use "../../utilities/cascade-layer";
17
18
  @use "../../utilities/icons";
18
19
 
19
20
  $config: () !default;
@@ -52,57 +53,59 @@ $-default-config: (
52
53
  @mixin styles($config: $config) {
53
54
  $props: map.deep-merge($-default-config, $config);
54
55
 
55
- #{map.get($props, "label", "selector")} {
56
- @include label.styles(
57
- (
58
- selector: "&",
59
- axis: map.get($props, "label", "axis"),
60
- )
61
- );
62
-
63
- position: relative;
64
-
65
- #{map.get($props, "input", "selector")} {
66
- @include input.styles(
56
+ @include cascade-layer.wrap {
57
+ #{map.get($props, "label", "selector")} {
58
+ @include label.styles(
67
59
  (
68
60
  selector: "&",
69
- emit-readonly: map.get($props, "input", "emit-readonly"),
70
- emit-disabled: map.get($props, "input", "emit-disabled"),
71
- emit-invalid: map.get($props, "input", "emit-invalid"),
72
- emit-focus: map.get($props, "input", "emit-focus"),
61
+ axis: map.get($props, "label", "axis"),
73
62
  )
74
63
  );
75
64
 
76
- padding-inline-start: -get-slot-space(map.get($props, "fixed-input-leading-slots"));
77
- padding-inline-end: -get-slot-space(map.get($props, "fixed-input-trailing-slots"));
78
- }
65
+ position: relative;
66
+
67
+ #{map.get($props, "input", "selector")} {
68
+ @include input.styles(
69
+ (
70
+ selector: "&",
71
+ emit-readonly: map.get($props, "input", "emit-readonly"),
72
+ emit-disabled: map.get($props, "input", "emit-disabled"),
73
+ emit-invalid: map.get($props, "input", "emit-invalid"),
74
+ emit-focus: map.get($props, "input", "emit-focus"),
75
+ )
76
+ );
77
+
78
+ padding-inline-start: -get-slot-space(map.get($props, "fixed-input-leading-slots"));
79
+ padding-inline-end: -get-slot-space(map.get($props, "fixed-input-trailing-slots"));
80
+ }
79
81
 
80
- &::before,
81
- &::after {
82
- z-index: 9999;
83
- position: absolute;
84
- pointer-events: none;
85
- inset-block-start: calc(layout.$size--padding-block-start - ((1rem - 1lh) * 0.5));
86
-
87
- @if map.get($props, "label", "axis") == "block" {
88
- grid-row: 2;
89
- } @else {
90
- grid-column: 2;
82
+ &::before,
83
+ &::after {
84
+ z-index: 9999;
85
+ position: absolute;
86
+ pointer-events: none;
87
+ inset-block-start: calc(layout.$size--padding-block-start - ((1rem - 1lh) * 0.5));
88
+
89
+ @if map.get($props, "label", "axis") == "block" {
90
+ grid-row: 2;
91
+ } @else {
92
+ grid-column: 2;
93
+ }
91
94
  }
92
- }
93
95
 
94
- @if map.get($props, "input-invalid-slot") and map.get($props, "input", "emit-invalid") {
95
- &:has(#{map.get($props, "input", "selector")}:invalid),
96
- &:has(#{map.get($props, "input", "selector")}[aria-invalid="true"]) {
97
- &::#{map.get($props, 'input-invalid-slot')} {
98
- @include input-trailing-slot(map.get($props, "fixed-input-trailing-slots") + 1) {
99
- @include icons.warning--filled;
100
- color: theme.$support-error;
96
+ @if map.get($props, "input-invalid-slot") and map.get($props, "input", "emit-invalid") {
97
+ &:has(#{map.get($props, "input", "selector")}:invalid),
98
+ &:has(#{map.get($props, "input", "selector")}[aria-invalid="true"]) {
99
+ &::#{map.get($props, 'input-invalid-slot')} {
100
+ @include input-trailing-slot(map.get($props, "fixed-input-trailing-slots") + 1) {
101
+ @include icons.warning--filled;
102
+ color: theme.$support-error;
103
+ }
101
104
  }
102
- }
103
105
 
104
- #{map.get($props, "input", "selector")} {
105
- padding-inline-end: -get-slot-space(map.get($props, "fixed-input-trailing-slots") + 1);
106
+ #{map.get($props, "input", "selector")} {
107
+ padding-inline-end: -get-slot-space(map.get($props, "fixed-input-trailing-slots") + 1);
108
+ }
106
109
  }
107
110
  }
108
111
  }
@@ -12,6 +12,7 @@
12
12
  @use "@carbon/styles/scss/utilities/custom-property";
13
13
 
14
14
  @use "../../layout";
15
+ @use "../../utilities/cascade-layer";
15
16
  @use "../../utilities/tokens";
16
17
 
17
18
  $config: () !default;
@@ -39,23 +40,25 @@ $-default-config: ();
39
40
  @mixin styles($config: $config) {
40
41
  $props: map.deep-merge($-default-config, $config);
41
42
 
42
- // fallback for browers without container style query support
43
- background-color: theme.$layer;
43
+ @include cascade-layer.wrap {
44
+ // fallback for browers without container style query support
45
+ background-color: theme.$layer;
44
46
 
45
- @include -on-layer("01", true) {
46
- background-color: theme.$layer-background;
47
- @include tokens.set("layer-level", "02");
48
- @include layer-tokens.emit-layer-tokens(2);
49
- }
47
+ @include -on-layer("01", true) {
48
+ background-color: theme.$layer-background;
49
+ @include tokens.set("layer-level", "02");
50
+ @include layer-tokens.emit-layer-tokens(2);
51
+ }
50
52
 
51
- @include -on-layer("02") {
52
- background-color: theme.$layer-background;
53
- @include tokens.set("layer-level", "03");
54
- @include layer-tokens.emit-layer-tokens(3);
55
- }
53
+ @include -on-layer("02") {
54
+ background-color: theme.$layer-background;
55
+ @include tokens.set("layer-level", "03");
56
+ @include layer-tokens.emit-layer-tokens(3);
57
+ }
56
58
 
57
- @include -on-layer("03") {
58
- background-color: theme.$layer;
59
+ @include -on-layer("03") {
60
+ background-color: theme.$layer;
61
+ }
59
62
  }
60
63
  }
61
64
 
@@ -10,6 +10,7 @@
10
10
  @use "@carbon/styles/scss/theme";
11
11
 
12
12
  @use "../../layout";
13
+ @use "../../utilities/cascade-layer";
13
14
 
14
15
  $config: () !default;
15
16
 
@@ -23,9 +24,11 @@ $-default-config: (
23
24
  @mixin styles($config: $config) {
24
25
  $props: map.deep-merge($-default-config, $config);
25
26
 
26
- #{map.get($props, "selector")} {
27
- text-decoration: none;
28
- cursor: help;
29
- border-block-end: 0.0625rem dotted theme.$border-strong;
27
+ @include cascade-layer.wrap {
28
+ #{map.get($props, "selector")} {
29
+ text-decoration: none;
30
+ cursor: help;
31
+ border-block-end: 0.0625rem dotted theme.$border-strong;
32
+ }
30
33
  }
31
34
  }
@@ -10,6 +10,7 @@
10
10
  @use "@carbon/styles/scss/theme";
11
11
 
12
12
  @use "../../layout";
13
+ @use "../../utilities/cascade-layer";
13
14
 
14
15
  $config: () !default;
15
16
 
@@ -23,9 +24,11 @@ $-default-config: (
23
24
  @mixin styles($config: $config) {
24
25
  $props: map.deep-merge($-default-config, $config);
25
26
 
26
- #{map.get($props, "selector")} {
27
- @include layout.mode--helper-text;
28
- color: theme.$text-secondary;
29
- font-style: normal;
27
+ @include cascade-layer.wrap {
28
+ #{map.get($props, "selector")} {
29
+ @include layout.mode--helper-text;
30
+ color: theme.$text-secondary;
31
+ font-style: normal;
32
+ }
30
33
  }
31
34
  }
@@ -12,6 +12,7 @@
12
12
  @use "@carbon/styles/scss/utilities/focus-outline";
13
13
 
14
14
  @use "../../layout";
15
+ @use "../../utilities/cascade-layer";
15
16
  @use "../../utilities/guards";
16
17
 
17
18
  $config: () !default;
@@ -29,44 +30,46 @@ $-default-config: (
29
30
  $props: map.deep-merge($-default-config, $config);
30
31
  $emit-visited: map.get($props, "emit-visited") == true;
31
32
 
32
- #{map.get($props, "selector")} {
33
- display: inline-flex;
34
- align-items: center;
35
- column-gap: spacing.$spacing-03;
36
- color: theme.$link-primary;
37
- text-decoration: underline;
38
- transition: color layout.$mode--transition-duration layout.$mode--transition-timing-function;
33
+ @include cascade-layer.wrap {
34
+ #{map.get($props, "selector")} {
35
+ display: inline-flex;
36
+ align-items: center;
37
+ column-gap: spacing.$spacing-03;
38
+ color: theme.$link-primary;
39
+ text-decoration: underline;
40
+ transition: color layout.$mode--transition-duration layout.$mode--transition-timing-function;
39
41
 
40
- // TODO: remove when fixed firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=868975
41
- @if $emit-visited {
42
- @supports (-moz-appearance: none) {
43
- transition: none;
42
+ // TODO: remove when fixed firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=868975
43
+ @if $emit-visited {
44
+ @supports (-moz-appearance: none) {
45
+ transition: none;
46
+ }
44
47
  }
45
- }
46
48
 
47
- @include guards.hover {
48
- &:hover {
49
- color: theme.$link-primary-hover;
49
+ @include guards.hover {
50
+ &:hover {
51
+ color: theme.$link-primary-hover;
52
+ }
50
53
  }
51
- }
52
54
 
53
- @if $emit-visited {
54
- &:visited {
55
- color: theme.$link-visited;
55
+ @if $emit-visited {
56
+ &:visited {
57
+ color: theme.$link-visited;
58
+ }
59
+ &:visited svg {
60
+ fill: theme.$link-visited;
61
+ }
56
62
  }
57
- &:visited svg {
58
- fill: theme.$link-visited;
59
- }
60
- }
61
63
 
62
- &:focus {
63
- @include focus-outline.focus-outline("outline");
64
- }
64
+ &:focus {
65
+ @include focus-outline.focus-outline("outline");
66
+ }
65
67
 
66
- & svg {
67
- fill: currentColor;
68
- block-size: 1rem;
69
- inline-size: 1rem;
68
+ & svg {
69
+ fill: currentColor;
70
+ block-size: 1rem;
71
+ inline-size: 1rem;
72
+ }
70
73
  }
71
74
  }
72
75
  }
@@ -11,6 +11,7 @@
11
11
  @use "@carbon/styles/scss/spacing";
12
12
 
13
13
  @use "../../layout";
14
+ @use "../../utilities/cascade-layer";
14
15
 
15
16
  $config: () !default;
16
17
 
@@ -24,40 +25,42 @@ $-default-config: (
24
25
  @mixin styles($config: $config) {
25
26
  $props: map.deep-merge($-default-config, $config);
26
27
 
27
- #{map.get($props, "selector")} {
28
- margin-block: layout.$mode--margin-block;
29
- margin-inline: spacing.$spacing-08;
30
- max-inline-size: 50ch;
28
+ @include cascade-layer.wrap {
29
+ #{map.get($props, "selector")} {
30
+ margin-block: layout.$mode--margin-block;
31
+ margin-inline: spacing.$spacing-08;
32
+ max-inline-size: 50ch;
31
33
 
32
- @include layout.mode--quotation;
33
-
34
- & p {
35
34
  @include layout.mode--quotation;
36
- quotes: auto;
37
- }
38
35
 
39
- & p::before {
40
- content: open-quote;
41
- margin-inline-start: -1.1ch;
42
- }
36
+ & p {
37
+ @include layout.mode--quotation;
38
+ quotes: auto;
39
+ }
43
40
 
44
- & p::after {
45
- content: close-quote;
46
- }
41
+ & p::before {
42
+ content: open-quote;
43
+ margin-inline-start: -1.1ch;
44
+ }
47
45
 
48
- & p {
49
- margin-block: 0;
50
- }
46
+ & p::after {
47
+ content: close-quote;
48
+ }
51
49
 
52
- & + cite {
53
- @include layout.mode--body-compact;
54
- margin-inline-start: spacing.$spacing-08;
55
- font-style: italic;
56
- }
50
+ & p {
51
+ margin-block: 0;
52
+ }
53
+
54
+ & + cite {
55
+ @include layout.mode--body-compact;
56
+ margin-inline-start: spacing.$spacing-08;
57
+ font-style: italic;
58
+ }
57
59
 
58
- & + cite::before {
59
- content: "—";
60
- margin-inline-end: spacing.$spacing-02;
60
+ & + cite::before {
61
+ content: "—";
62
+ margin-inline-end: spacing.$spacing-02;
63
+ }
61
64
  }
62
65
  }
63
66
  }
@@ -11,6 +11,7 @@
11
11
  @use "@carbon/styles/scss/spacing";
12
12
 
13
13
  @use "../../layout";
14
+ @use "../../utilities/cascade-layer";
14
15
 
15
16
  $config: () !default;
16
17
 
@@ -24,9 +25,11 @@ $-default-config: (
24
25
  @mixin styles($config: $config) {
25
26
  $props: map.deep-merge($-default-config, $config);
26
27
 
27
- #{map.get($props, "selector")} {
28
- @include layout.mode--body;
29
- background-color: theme.$background;
30
- margin: 0;
28
+ @include cascade-layer.wrap {
29
+ #{map.get($props, "selector")} {
30
+ @include layout.mode--body;
31
+ background-color: theme.$background;
32
+ margin: 0;
33
+ }
31
34
  }
32
35
  }
@@ -8,6 +8,7 @@
8
8
  @use "sass:map";
9
9
 
10
10
  @use "../../layout";
11
+ @use "../../utilities/cascade-layer";
11
12
 
12
13
  $config: () !default;
13
14
 
@@ -21,7 +22,9 @@ $-default-config: (
21
22
  @mixin styles($config: $config) {
22
23
  $props: map.deep-merge($-default-config, $config);
23
24
 
24
- #{map.get($props, "selector")} {
25
- font-weight: 600;
25
+ @include cascade-layer.wrap {
26
+ #{map.get($props, "selector")} {
27
+ font-weight: 600;
28
+ }
26
29
  }
27
30
  }