@navikt/ds-css 7.5.2 → 7.6.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 (44) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/darkside/action-menu.darkside.css +1 -6
  3. package/darkside/button.darkside.css +128 -141
  4. package/darkside/chips.darkside.css +6 -0
  5. package/darkside/expansioncard.darkside.css +2 -9
  6. package/darkside/form/combobox.darkside.css +255 -217
  7. package/darkside/form/file-upload.darkside.css +9 -9
  8. package/darkside/form/form-summary.darkside.css +1 -0
  9. package/darkside/form/index.css +14 -16
  10. package/darkside/form/select.darkside.css +74 -68
  11. package/darkside/form/switch.darkside.css +125 -132
  12. package/darkside/form/text-field.darkside.css +1 -1
  13. package/darkside/form/textarea.darkside.css +36 -78
  14. package/darkside/help-text.darkside.css +0 -6
  15. package/darkside/index.css +24 -12
  16. package/darkside/internalheader.darkside.css +45 -49
  17. package/darkside/modal.darkside.css +1 -4
  18. package/darkside/popover.darkside.css +1 -4
  19. package/darkside/primitives/index.css +30 -34
  20. package/darkside/read-more.darkside.css +68 -57
  21. package/darkside/skeleton.darkside.css +21 -24
  22. package/darkside/stepper.darkside.css +181 -221
  23. package/darkside/tabs.darkside.css +67 -74
  24. package/dist/component/form.css +22 -18
  25. package/dist/component/form.min.css +2 -2
  26. package/dist/component/index.css +40 -22
  27. package/dist/component/index.min.css +3 -3
  28. package/dist/component/modal.css +8 -0
  29. package/dist/component/modal.min.css +1 -1
  30. package/dist/component/readmore.css +4 -0
  31. package/dist/component/readmore.min.css +1 -1
  32. package/dist/components.css +40 -22
  33. package/dist/components.min.css +3 -3
  34. package/dist/global/tokens.css +1 -1
  35. package/dist/global/tokens.min.css +1 -1
  36. package/dist/index.css +40 -22
  37. package/dist/index.min.css +3 -3
  38. package/form/combobox.css +9 -2
  39. package/form/file-upload.css +7 -9
  40. package/form/select.css +2 -9
  41. package/form/switch.css +8 -0
  42. package/modal.css +8 -0
  43. package/package.json +2 -2
  44. package/read-more.css +4 -0
@@ -1,73 +1,54 @@
1
- [data-theme="dark"] {
2
- --__ac-textarea-text: var(--a-text-on-inverted);
3
- --__ac-textarea-bg: var(--a-transparent);
4
- --__ac-textarea-border: var(--a-border-on-inverted);
5
- --__ac-textarea-hover-border: var(--a-blue-200);
6
- --__ac-textarea-placeholder: var(--a-gray-500);
7
- --__ac-textarea-error-border: var(--a-red-300);
8
- --__ac-textarea-counter-text: var(--a-gray-300);
9
- --__ac-textarea-counter-error-text: var(--a-red-300);
10
- }
11
-
12
- [data-theme="light"] {
13
- --__ac-textarea-text: initial;
14
- --__ac-textarea-bg: initial;
15
- --__ac-textarea-border: initial;
16
- --__ac-textarea-hover-border: initial;
17
- --__ac-textarea-placeholder: initial;
18
- --__ac-textarea-error-border: initial;
19
- --__ac-textarea-counter-text: initial;
20
- --__ac-textarea-counter-error-text: initial;
21
- }
22
-
23
1
  .navds-textarea__input {
24
2
  /* stylelint-disable-next-line csstools/value-no-unknown-custom-properties */
25
- height: var(--__ac-textarea-height);
3
+ height: var(--__axc-textarea-height);
26
4
  appearance: none;
27
- padding: var(--a-spacing-2);
28
- background-color: var(--ac-textarea-bg, var(--__ac-textarea-bg, var(--a-surface-default)));
29
- border-radius: var(--a-border-radius-medium);
30
- border: 1px solid var(--ac-textarea-border, var(--__ac-textarea-border, var(--a-border-default)));
5
+ padding: var(--ax-spacing-2);
6
+ background-color: var(--ax-bg-input);
7
+ border-radius: var(--ax-border-radius-medium);
8
+ border: 1px solid var(--ax-border-default);
31
9
  resize: none;
32
10
  width: 100%;
33
11
  display: block;
34
- color: var(--ac-textarea-text, var(--__ac-textarea-text, var(--a-text-default)));
35
- }
36
-
37
- .navds-textarea__input::placeholder {
38
- color: var(--ac-textarea-placeholder, var(--__ac-textarea-placeholder, var(--a-text-subtle)));
39
- }
12
+ color: var(--ax-text-default);
40
13
 
41
- .navds-textarea__input:hover {
42
- border-color: var(--ac-textarea-hover-border, var(--__ac-textarea-hover-border, var(--a-border-action-hover)));
43
- }
14
+ &::placeholder {
15
+ color: var(--ax-text-subtle);
16
+ }
44
17
 
45
- .navds-textarea__input:focus-visible {
46
- outline: 2px solid transparent;
47
- outline-offset: 2px;
48
- box-shadow: var(--a-shadow-focus);
49
- border-color: var(--ac-textarea-active-border, var(--a-border-action-selected));
50
- }
18
+ &:hover {
19
+ border-color: var(--ax-border-accent-strong);
20
+ }
51
21
 
52
- @supports not selector(:focus-visible) {
53
- .navds-textarea__input:focus {
54
- outline: 2px solid transparent;
22
+ &:focus-visible {
23
+ outline: 2px solid var(--ax-border-focus);
55
24
  outline-offset: 2px;
56
- box-shadow: var(--a-shadow-focus);
25
+ border-color: var(--ax-border-accent-strong);
57
26
  }
58
- }
59
27
 
60
- .navds-form-field--small .navds-textarea__input {
61
- padding: var(--a-spacing-1-alt);
28
+ &:disabled {
29
+ background-color: var(--ax-bg-input);
30
+ border-color: var(--ax-border-default);
31
+ cursor: not-allowed;
32
+ }
33
+
34
+ .navds-form-field--small & {
35
+ padding: var(--ax-spacing-1-alt);
36
+ }
37
+
38
+ .navds-textarea--readonly & {
39
+ background-color: var(--ax-bg-neutral-moderate);
40
+ border-color: var(--ax-border-neutral-subtleA);
41
+ cursor: default;
42
+ }
62
43
  }
63
44
 
64
45
  .navds-textarea__counter {
65
- margin-top: -0.375rem;
66
- color: var(--ac-textarea-counter-text, var(--__ac-textarea-counter-text, var(--a-text-subtle)));
46
+ margin-top: -0.25rem;
47
+ color: var(--ax-text-subtle);
67
48
  }
68
49
 
69
50
  .navds-textarea__counter--error {
70
- color: var(--ac-textarea-counter-error-text, var(--__ac-textarea-counter-error-text, var(--a-text-danger)));
51
+ color: var(--ax-text-danger);
71
52
  }
72
53
 
73
54
  .navds-textarea__sr-counter {
@@ -108,32 +89,9 @@
108
89
  scrollbar-gutter: stable; /* Needed to prevent scrollbar from appearing too early */
109
90
  }
110
91
 
111
- /**
112
- Error handling
113
- */
114
- .navds-textarea--error .navds-textarea__input:not(:hover, :focus-visible, :disabled) {
115
- box-shadow: 0 0 0 1px var(--ac-textarea-error-border, var(--__ac-textarea-error-border, var(--a-border-danger)));
116
- border-color: var(--ac-textarea-error-border, var(--__ac-textarea-error-border, var(--a-border-danger)));
117
- }
118
-
119
- @supports not selector(:focus-visible) {
120
- .navds-textarea--error .navds-textarea__input:not(:hover, :focus, :disabled) {
121
- box-shadow: 0 0 0 1px var(--ac-textarea-error-border, var(--__ac-textarea-error-border, var(--a-border-danger)));
122
- border-color: var(--ac-textarea-error-border, var(--__ac-textarea-error-border, var(--a-border-danger)));
123
- }
124
- }
125
-
126
- .navds-textarea__input:disabled {
127
- background-color: var(--ac-textarea-bg, var(--__ac-textarea-bg, var(--a-surface-default)));
128
- border-color: var(--ac-textarea-border, var(--__ac-textarea-border, var(--a-border-default)));
129
- box-shadow: none;
130
- cursor: not-allowed;
131
- }
132
-
133
- .navds-textarea--readonly .navds-textarea__input {
134
- background-color: var(--a-surface-subtle);
135
- border-color: var(--a-border-subtle);
136
- cursor: default;
92
+ .navds-textarea--error .navds-textarea__input:not(:disabled) {
93
+ box-shadow: 0 0 0 1px var(--ax-border-danger);
94
+ border-color: var(--ax-border-danger);
137
95
  }
138
96
 
139
97
  @media (forced-colors: active) {
@@ -21,12 +21,6 @@
21
21
  max-width: min(65ch, calc(100vw - var(--ax-spacing-6)));
22
22
  border-radius: var(--ax-border-radius-large);
23
23
  border: 1px solid var(--ax-border-info);
24
- box-shadow:
25
- 0 0 1px 0 rgba(7 9 13/ 0.15),
26
- 0 1px 3px 0 rgba(7 9 13/ 0.1),
27
- 0 5px 12px 0 rgba(7 9 13/ 0.13),
28
- 0 0.5px 0 0 rgba(255 255 255/ 0) inset,
29
- 0 0 1px 0 rgba(255 255 255/ 0) inset;
30
24
  }
31
25
 
32
26
  .navds-help-text__icon--filled {
@@ -1,29 +1,35 @@
1
1
  @charset "UTF-8";
2
2
 
3
- @layer aksel.reset, aksel.typography, aksel.theme, aksel.components, aksel.forms, aksel.layout, aksel.utilities;
3
+ /* CSS is ordered by specificity, so that browsers without layers fall backs to good defaults */
4
+ @layer aksel.reset, aksel.typography, aksel.theme, aksel.components, aksel.layout, aksel.utilities;
4
5
 
5
- /* CSS foundations */
6
+ /* ----------------------------- CSS foundations ---------------------------- */
6
7
  @import "./baseline/reset.darkside.css" layer(aksel.reset);
7
8
  @import "./baseline/print.darkside.css" layer(aksel.reset);
8
9
  @import "./baseline/fonts.darkside.css" layer(aksel.typography);
9
- @import "./baseline/theme.darkside.css" layer(aksel.theme);
10
10
  @import "./typography.darkside.css" layer(aksel.typography);
11
- @import "./baseline/utilities.darkside.css" layer(aksel.utilities);
12
11
 
13
- /* Test: Handles layers itself */
14
- @import "./form/index.css";
15
- @import "./primitives/index.css";
16
-
17
- /* Theming */
12
+ /* --------------------------------- Theming -------------------------------- */
18
13
  @import "@navikt/ds-tokens/dist/darkside/tokens.css" layer(aksel.theme);
14
+ @import "./baseline/theme.darkside.css" layer(aksel.theme);
19
15
 
20
- /* Components */
16
+ /* TODO: Remove this reference after stack is updated with darkside support */
21
17
  @import "../primitives/stack.css" layer(aksel.components);
22
- @import "./accordion.darkside.css" layer(aksel.components);
18
+
19
+ /* ------------------------------- Components ------------------------------- */
23
20
  @import "./button.darkside.css" layer(aksel.components);
21
+ @import "./chips.darkside.css" layer(aksel.components);
22
+
23
+ /**
24
+ * `./form/index.css` edits the following components:
25
+ * - Button
26
+ * - Chips
27
+ * To avoid specificity conflicts, we import those components before form.
28
+ */
29
+ @import "./form/index.css" layer(aksel.components);
30
+ @import "./accordion.darkside.css" layer(aksel.components);
24
31
  @import "./alert.darkside.css" layer(aksel.components);
25
32
  @import "./chat.darkside.css" layer(aksel.components);
26
- @import "./chips.darkside.css" layer(aksel.components);
27
33
  @import "./copybutton.darkside.css" layer(aksel.components);
28
34
  @import "./dropdown.darkside.css" layer(aksel.components);
29
35
  @import "./action-menu.darkside.css" layer(aksel.components);
@@ -50,3 +56,9 @@
50
56
  @import "./table.darkside.css" layer(aksel.components);
51
57
  @import "./tabs.darkside.css" layer(aksel.components);
52
58
  @import "./list.darkside.css" layer(aksel.components);
59
+
60
+ /* --------------------------------- Layout --------------------------------- */
61
+ @import "./primitives/index.css" layer(aksel.layout);
62
+
63
+ /* --------------------------------- Utility -------------------------------- */
64
+ @import "./baseline/utilities.darkside.css" layer(aksel.utilities);
@@ -1,10 +1,9 @@
1
1
  .navds-internalheader {
2
2
  display: flex;
3
3
  align-self: stretch;
4
- background: var(--ac-internalheader-bg, var(--a-surface-inverted));
4
+ background: var(--ax-bg-raised);
5
5
  min-height: 3rem;
6
-
7
- --navds-internalheader-focus: inset 0 0 0 2px var(--a-border-focus-on-inverted);
6
+ border-bottom: 1px solid var(--ax-border-subtleA);
8
7
  }
9
8
 
10
9
  @media (forced-colors: active) {
@@ -13,18 +12,6 @@
13
12
  border: solid 1px ButtonText;
14
13
  color: ButtonText;
15
14
  }
16
-
17
- .navds-internalheader a:focus-visible {
18
- box-shadow: none;
19
- outline: 2px solid highlight;
20
- outline-offset: 2px;
21
- }
22
-
23
- .navds-internalheader .navds-internalheader__button:focus-visible {
24
- box-shadow: none;
25
- outline: 2px solid highlight;
26
- outline-offset: 2px;
27
- }
28
15
  }
29
16
 
30
17
  .navds-internalheader__title {
@@ -32,25 +19,34 @@
32
19
  overflow: visible;
33
20
  background: transparent;
34
21
  font: inherit;
35
- font-weight: var(--a-font-weight-bold);
22
+ font-weight: var(--ax-font-weight-bold);
36
23
  line-height: normal;
37
24
  text-align: left;
38
- padding: 0 var(--a-spacing-5) 0 var(--a-spacing-6);
39
- border-right: 1px solid var(--ac-internalheader-divider, var(--a-gray-600));
25
+ padding-block: 0;
26
+ padding-inline: var(--ax-spacing-6) var(--ax-spacing-5);
27
+ border-right: 1px solid var(--ax-border-subtleA);
40
28
  display: flex;
41
29
  align-items: center;
42
30
  text-decoration: none;
43
31
  margin: 0;
44
- color: var(--ac-internalheader-text, var(--a-text-on-inverted));
45
- }
32
+ color: var(--ax-text-default);
46
33
 
47
- button.navds-internalheader__title {
48
- cursor: pointer;
34
+ &:is(button) {
35
+ cursor: pointer;
36
+ }
37
+
38
+ &:hover {
39
+ background: var(--ax-bg-neutral-moderate-hover);
40
+ }
41
+
42
+ &:is(:hover, :active):not(button, a) {
43
+ background: initial;
44
+ }
49
45
  }
50
46
 
51
47
  .navds-internalheader__user {
52
- padding: 0 var(--a-spacing-5);
53
- border-left: 1px solid var(--ac-internalheader-divider, var(--a-gray-600));
48
+ padding: 0 var(--ax-spacing-5);
49
+ border-left: 1px solid var(--ax-border-subtleA);
54
50
  display: flex;
55
51
  align-items: center;
56
52
  }
@@ -58,7 +54,7 @@ button.navds-internalheader__title {
58
54
  .navds-internalheader__button {
59
55
  border: none;
60
56
  margin: 0;
61
- padding: 0 var(--a-spacing-3);
57
+ padding: 0 var(--ax-spacing-3);
62
58
  overflow: visible;
63
59
  background: transparent;
64
60
  font: inherit;
@@ -68,38 +64,38 @@ button.navds-internalheader__title {
68
64
  display: flex;
69
65
  align-items: center;
70
66
  justify-self: center;
71
- gap: var(--a-spacing-2);
72
- border-left: 1px solid var(--ac-internalheader-divider, var(--a-gray-600));
73
- color: var(--ac-internalheader-text, var(--a-text-on-inverted));
74
- }
67
+ gap: var(--ax-spacing-2);
68
+ border-left: 1px solid var(--ax-border-subtleA);
69
+ color: var(--ax-text-default);
75
70
 
76
- a.navds-internalheader__title:hover,
77
- button.navds-internalheader__title:hover,
78
- .navds-internalheader__button:hover {
79
- background-color: var(--ac-internalheader-hover-bg, var(--a-surface-inverted-hover));
71
+ &:hover {
72
+ background: var(--ax-bg-neutral-moderate-hover);
73
+ }
80
74
  }
81
75
 
82
- .navds-internalheader__title:focus-visible,
83
- .navds-internalheader__button:focus-visible {
84
- box-shadow: var(--navds-internalheader-focus);
85
- outline: none;
76
+ @media (forced-colors: active) {
77
+ .navds-internalheader__button:hover {
78
+ background-color: highlighttext;
79
+ border-color: highlight;
80
+ color: highlight;
81
+ outline: 1px solid highlight;
82
+ isolation: isolate;
83
+ }
86
84
  }
87
85
 
88
- @supports not selector(:focus-visible) {
89
- .navds-internalheader__title:focus,
90
- .navds-internalheader__button:focus {
91
- box-shadow: var(--navds-internalheader-focus);
92
- outline: none;
86
+ .navds-internalheader__title,
87
+ .navds-internalheader__button {
88
+ &:focus-visible {
89
+ outline: 3px solid var(--ax-border-focus);
90
+ outline-offset: -3px;
93
91
  }
94
- }
95
92
 
96
- a.navds-internalheader__title:active,
97
- button.navds-internalheader__title:active,
98
- .navds-internalheader__button:active {
99
- background-color: var(--ac-internalheader-active-bg, var(--a-surface-inverted-active));
93
+ &:active {
94
+ background: var(--ax-bg-neutral-moderate-pressed);
95
+ }
100
96
  }
101
97
 
102
98
  .navds-internalheader__user-button {
103
- padding-left: var(--a-spacing-5);
104
- gap: var(--a-spacing-4);
99
+ padding-left: var(--ax-spacing-5);
100
+ gap: var(--ax-spacing-4);
105
101
  }
@@ -8,10 +8,7 @@
8
8
  background-color: var(--__axc-modal-bg);
9
9
  border: 1px solid var(--ax-border-subtleA);
10
10
  border-radius: var(--ax-border-radius-xlarge);
11
- box-shadow:
12
- 0 0 1px 0 rgb(0 0 0/ 0.08),
13
- 0 2px 5px 0 rgb(0 0 0/ 0.15),
14
- 0 10px 24px 0 rgb(0 0 0/ 0.18);
11
+ box-shadow: var(--ax-shadow-dialog);
15
12
  padding: 0;
16
13
  position: fixed;
17
14
  max-height: 100%;
@@ -1,10 +1,7 @@
1
1
  .navds-popover {
2
2
  z-index: 1000;
3
3
  background: var(--ax-bg-raised);
4
- box-shadow:
5
- 0 0 1px 0 rgba(7 9 13/ 0.02),
6
- 0 2px 5px 0 rgba(7 9 13/ 0.1),
7
- 0 5px 12px 0 rgba(7 9 13/ 0.12);
4
+ box-shadow: var(--ax-shadow-dialog);
8
5
  border: 1px solid var(--ax-border-subtleA);
9
6
  border-radius: var(--ax-border-radius-xlarge);
10
7
 
@@ -1,36 +1,32 @@
1
- @layer aksel.layout.component, aksel.layout.base;
1
+ @import "./base.darkside.css";
2
+ @import "./box.darkside.css";
3
+ @import "./bleed.darkside.css";
4
+ @import "./page.darkside.css";
5
+ @import "./hgrid.darkside.css";
6
+ @import "./stack.darkside.css";
7
+ @import "./responsive.darkside.css";
2
8
 
3
- @import "./base.darkside.css" layer(aksel.layout.base);
4
- @import "./box.darkside.css" layer(aksel.layout.component);
5
- @import "./bleed.darkside.css" layer(aksel.layout.component);
6
- @import "./page.darkside.css" layer(aksel.layout.component);
7
- @import "./hgrid.darkside.css" layer(aksel.layout.component);
8
- @import "./stack.darkside.css" layer(aksel.layout.component);
9
- @import "./responsive.darkside.css" layer(aksel.layout.component);
10
-
11
- /* Custom override to avoid having to edit react-syntax in Primtives */
12
- @layer aksel.layout {
13
- :root {
14
- --a-spacing-1-alt: var(--ax-spacing-1-alt);
15
- --a-spacing-05: var(--ax-spacing-05);
16
- --a-spacing-32: var(--ax-spacing-32);
17
- --a-spacing-24: var(--ax-spacing-24);
18
- --a-spacing-20: var(--ax-spacing-20);
19
- --a-spacing-18: var(--ax-spacing-18);
20
- --a-spacing-16: var(--ax-spacing-16);
21
- --a-spacing-14: var(--ax-spacing-14);
22
- --a-spacing-12: var(--ax-spacing-12);
23
- --a-spacing-11: var(--ax-spacing-11);
24
- --a-spacing-10: var(--ax-spacing-10);
25
- --a-spacing-9: var(--ax-spacing-9);
26
- --a-spacing-8: var(--ax-spacing-8);
27
- --a-spacing-7: var(--ax-spacing-7);
28
- --a-spacing-6: var(--ax-spacing-6);
29
- --a-spacing-5: var(--ax-spacing-5);
30
- --a-spacing-4: var(--ax-spacing-4);
31
- --a-spacing-3: var(--ax-spacing-3);
32
- --a-spacing-2: var(--ax-spacing-2);
33
- --a-spacing-1: var(--ax-spacing-1);
34
- --a-spacing-0: var(--ax-spacing-0);
35
- }
9
+ /* TODO: Custom override to avoid having to edit react-syntax in Primtives. Remove after fix */
10
+ :root {
11
+ --a-spacing-1-alt: var(--ax-spacing-1-alt);
12
+ --a-spacing-05: var(--ax-spacing-05);
13
+ --a-spacing-32: var(--ax-spacing-32);
14
+ --a-spacing-24: var(--ax-spacing-24);
15
+ --a-spacing-20: var(--ax-spacing-20);
16
+ --a-spacing-18: var(--ax-spacing-18);
17
+ --a-spacing-16: var(--ax-spacing-16);
18
+ --a-spacing-14: var(--ax-spacing-14);
19
+ --a-spacing-12: var(--ax-spacing-12);
20
+ --a-spacing-11: var(--ax-spacing-11);
21
+ --a-spacing-10: var(--ax-spacing-10);
22
+ --a-spacing-9: var(--ax-spacing-9);
23
+ --a-spacing-8: var(--ax-spacing-8);
24
+ --a-spacing-7: var(--ax-spacing-7);
25
+ --a-spacing-6: var(--ax-spacing-6);
26
+ --a-spacing-5: var(--ax-spacing-5);
27
+ --a-spacing-4: var(--ax-spacing-4);
28
+ --a-spacing-3: var(--ax-spacing-3);
29
+ --a-spacing-2: var(--ax-spacing-2);
30
+ --a-spacing-1: var(--ax-spacing-1);
31
+ --a-spacing-0: var(--ax-spacing-0);
36
32
  }
@@ -1,3 +1,11 @@
1
+ .navds-read-more {
2
+ --__axc-read-more-icon-size: 1.5rem;
3
+ --__axc-read-more-pi-start: 0px;
4
+ --__axc-read-more-pi-end: var(--ax-spacing-1);
5
+ --__axc-read-more-pb: var(--ax-spacing-1);
6
+ }
7
+
8
+ /* ----------------------------- ReadMore Button ---------------------------- */
1
9
  .navds-read-more__button {
2
10
  cursor: pointer;
3
11
  margin: 0;
@@ -5,87 +13,90 @@
5
13
  background: none;
6
14
  display: flex;
7
15
  align-items: flex-start;
8
- gap: var(--a-spacing-05);
9
- color: var(--ac-read-more-text, var(--a-text-action));
10
- border-radius: var(--a-border-radius-small);
11
- padding: var(--a-spacing-1) var(--a-spacing-2) var(--a-spacing-1) var(--a-spacing-05);
16
+ gap: var(--ax-spacing-1);
17
+ color: var(--ax-text-accent);
18
+ padding-inline: var(--__axc-read-more-pi-start) var(--__axc-read-more-pi-end);
19
+ padding-block: var(--__axc-read-more-pb);
12
20
  text-align: start;
13
- }
14
-
15
- .navds-read-more--small .navds-read-more__button {
16
- padding: var(--a-spacing-05) var(--a-spacing-1-alt) var(--a-spacing-05) var(--a-spacing-05);
17
- }
18
21
 
19
- @media (forced-colors: active) {
20
- .navds-read-more__button {
21
- background-color: ButtonFace;
22
- border: solid 1px ButtonText;
23
- color: ButtonText;
22
+ &:focus-visible {
23
+ outline: 2px solid var(--ax-border-focus);
24
+ outline-offset: 2px;
24
25
  }
25
26
 
26
- .navds-read-more__button.navds-read-more__button:focus-visible {
27
- box-shadow: none;
28
- outline: 2px solid highlight;
29
- outline-offset: 2px;
27
+ &[data-state="open"] .navds-read-more__expand-icon {
28
+ transform: rotateX(-180deg);
30
29
  }
31
30
  }
32
31
 
33
- .navds-read-more__button:hover {
34
- background-color: var(--ac-read-more-hover-bg, var(--a-surface-hover));
35
- color: var(--ac-read-more-hover-text, var(--a-text-action-hover));
36
- }
32
+ .navds-read-more:is([data-volume="low"], :not([data-volume])) {
33
+ & .navds-read-more__button {
34
+ border-radius: var(--ax-border-radius-medium);
37
35
 
38
- .navds-read-more__button:active {
39
- background-color: var(--ac-read-more-active-bg, var(--a-surface-active));
36
+ &:hover {
37
+ background-color: var(--ax-bg-neutral-hoverA);
38
+ color: var(--ax-text-accent-strong);
39
+ }
40
+ }
40
41
  }
41
42
 
42
- .navds-read-more__button:focus-visible {
43
- outline: none;
44
- box-shadow: var(--a-shadow-focus);
45
- }
43
+ .navds-read-more[data-volume="high"] {
44
+ & .navds-read-more__button {
45
+ background-color: var(--ax-bg-accent-moderate);
46
+ border-radius: var(--ax-border-radius-full);
46
47
 
47
- @supports not selector(:focus-visible) {
48
- .navds-read-more__button:focus {
49
- outline: none;
50
- box-shadow: var(--a-shadow-focus);
48
+ &:hover {
49
+ background-color: var(--ax-bg-accent-moderate-hoverA);
50
+ color: var(--ax-text-accent-strong);
51
+ }
51
52
  }
52
- }
53
53
 
54
- .navds-read-more__content {
55
- margin-top: var(--a-spacing-1);
56
- border-left: 2px solid var(--ac-read-more-line, var(--a-border-divider));
57
- margin-left: 0.8125rem;
58
- padding-left: 0.8125rem;
59
- color: var(--a-text-default);
60
- }
54
+ &.navds-read-more--large {
55
+ --__axc-read-more-pi-start: var(--ax-spacing-3);
56
+ --__axc-read-more-pi-end: var(--ax-spacing-6);
57
+ }
61
58
 
62
- .navds-read-more--small .navds-read-more__content {
63
- margin-left: 0.6875rem;
64
- padding-left: 0.6875rem;
59
+ &.navds-read-more--small,
60
+ &.navds-read-more--medium {
61
+ --__axc-read-more-pi-start: var(--ax-spacing-2);
62
+ --__axc-read-more-pi-end: var(--ax-spacing-4);
63
+ }
65
64
  }
66
65
 
67
- .navds-read-more__content--closed {
68
- display: none;
66
+ /* ---------------------------- ReadMore Content ---------------------------- */
67
+ .navds-read-more__content {
68
+ margin-top: var(--ax-spacing-2);
69
+ border-left: 2px solid var(--ax-border-neutral-subtleA);
70
+ color: var(--ax-text-default);
71
+ margin-left: calc(var(--__axc-read-more-pi-start) + var(--__axc-read-more-icon-size) / 2 - 1px);
72
+ padding-left: calc(var(--__axc-read-more-icon-size) / 2 - 1px + var(--ax-spacing-1));
73
+
74
+ &[data-state="closed"] {
75
+ display: none;
76
+ }
69
77
  }
70
78
 
71
79
  .navds-read-more__expand-icon {
72
- font-size: 1.5rem;
80
+ font-size: var(--__axc-read-more-icon-size);
73
81
  flex-shrink: 0;
82
+ transition: transform 100ms cubic-bezier(0.2, 0, 0, 1);
74
83
  }
75
84
 
76
- .navds-read-more--small .navds-read-more__expand-icon {
77
- font-size: 1.25rem;
85
+ /* ----------------------------- ReadMore Sizes ----------------------------- */
86
+ .navds-read-more--large {
87
+ --__axc-read-more-pb: var(--ax-spacing-3);
78
88
  }
79
89
 
80
- .navds-read-more__button:hover > .navds-read-more__expand-icon {
81
- position: relative;
82
- top: 1px;
90
+ .navds-read-more--small {
91
+ --__axc-read-more-icon-size: 1.25rem;
92
+ --__axc-read-more-pb: var(--ax-spacing-05);
83
93
  }
84
94
 
85
- .navds-read-more--open > .navds-read-more__button > .navds-read-more__expand-icon {
86
- transform: rotate(-180deg);
87
- }
88
-
89
- .navds-read-more--open > .navds-read-more__button:hover > .navds-read-more__expand-icon {
90
- top: -1px;
95
+ /* ------------------------- ReadMore high-contrast ------------------------- */
96
+ @media (forced-colors: active) {
97
+ .navds-read-more__button {
98
+ background-color: ButtonFace;
99
+ border: solid 1px ButtonText;
100
+ color: ButtonText;
101
+ }
91
102
  }