opui-css 3.3.0 → 3.3.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.
Files changed (76) hide show
  1. package/LICENSE +21 -21
  2. package/dist/op.css +52 -52
  3. package/dist/theme-one.css +4404 -4404
  4. package/dist/theme-two.css +4121 -4121
  5. package/package.json +1 -1
  6. package/src/core/normalize.css +196 -196
  7. package/src/core/utils.css +60 -60
  8. package/src/open-props.css +10 -10
  9. package/src/themes/theme-one/components/accordion.css +172 -172
  10. package/src/themes/theme-one/components/alert.css +85 -85
  11. package/src/themes/theme-one/components/avatar.css +68 -68
  12. package/src/themes/theme-one/components/badge.css +101 -101
  13. package/src/themes/theme-one/components/button-group.css +69 -69
  14. package/src/themes/theme-one/components/button.css +281 -281
  15. package/src/themes/theme-one/components/card.css +82 -82
  16. package/src/themes/theme-one/components/checkbox-radio.css +123 -123
  17. package/src/themes/theme-one/components/chip.css +135 -135
  18. package/src/themes/theme-one/components/definition-list.css +68 -68
  19. package/src/themes/theme-one/components/dialog.css +59 -59
  20. package/src/themes/theme-one/components/divider.css +7 -7
  21. package/src/themes/theme-one/components/field-group.css +83 -83
  22. package/src/themes/theme-one/components/field.css +494 -494
  23. package/src/themes/theme-one/components/icon-button.css +40 -40
  24. package/src/themes/theme-one/components/link.css +21 -21
  25. package/src/themes/theme-one/components/list.css +318 -318
  26. package/src/themes/theme-one/components/progress.css +83 -83
  27. package/src/themes/theme-one/components/range.css +121 -121
  28. package/src/themes/theme-one/components/rich-text.css +210 -210
  29. package/src/themes/theme-one/components/select.css +163 -163
  30. package/src/themes/theme-one/components/snackbar.css +148 -148
  31. package/src/themes/theme-one/components/spinner.css +38 -38
  32. package/src/themes/theme-one/components/switch.css +225 -225
  33. package/src/themes/theme-one/components/tab-buttons.css +120 -120
  34. package/src/themes/theme-one/components/table.css +92 -92
  35. package/src/themes/theme-one/components/text-field.css +57 -57
  36. package/src/themes/theme-one/components/textarea.css +25 -25
  37. package/src/themes/theme-one/components/toggle-button-group.css +135 -135
  38. package/src/themes/theme-one/components/tooltip.css +94 -94
  39. package/src/themes/theme-one/components/typography.css +209 -209
  40. package/src/themes/theme-one/components.css +37 -37
  41. package/src/themes/theme-one/imports.css +16 -16
  42. package/src/themes/theme-one/theme.css +163 -163
  43. package/src/themes/theme-two/components/accordion.css +172 -172
  44. package/src/themes/theme-two/components/alert.css +85 -85
  45. package/src/themes/theme-two/components/avatar.css +68 -68
  46. package/src/themes/theme-two/components/badge.css +101 -101
  47. package/src/themes/theme-two/components/button-group.css +50 -50
  48. package/src/themes/theme-two/components/button.css +229 -229
  49. package/src/themes/theme-two/components/card.css +82 -82
  50. package/src/themes/theme-two/components/checkbox-radio.css +123 -123
  51. package/src/themes/theme-two/components/chip.css +135 -135
  52. package/src/themes/theme-two/components/definition-list.css +68 -68
  53. package/src/themes/theme-two/components/dialog.css +59 -59
  54. package/src/themes/theme-two/components/divider.css +7 -7
  55. package/src/themes/theme-two/components/field-group.css +83 -83
  56. package/src/themes/theme-two/components/field.css +281 -281
  57. package/src/themes/theme-two/components/icon-button.css +40 -40
  58. package/src/themes/theme-two/components/link.css +21 -21
  59. package/src/themes/theme-two/components/list.css +318 -318
  60. package/src/themes/theme-two/components/progress.css +83 -83
  61. package/src/themes/theme-two/components/range.css +121 -121
  62. package/src/themes/theme-two/components/rich-text.css +210 -210
  63. package/src/themes/theme-two/components/select.css +162 -162
  64. package/src/themes/theme-two/components/snackbar.css +148 -148
  65. package/src/themes/theme-two/components/spinner.css +38 -38
  66. package/src/themes/theme-two/components/switch.css +225 -225
  67. package/src/themes/theme-two/components/tab-buttons.css +120 -120
  68. package/src/themes/theme-two/components/table.css +99 -99
  69. package/src/themes/theme-two/components/text-field.css +57 -57
  70. package/src/themes/theme-two/components/textarea.css +25 -25
  71. package/src/themes/theme-two/components/toggle-button-group.css +135 -135
  72. package/src/themes/theme-two/components/tooltip.css +94 -94
  73. package/src/themes/theme-two/components/typography.css +209 -209
  74. package/src/themes/theme-two/components.css +37 -37
  75. package/src/themes/theme-two/imports.css +16 -16
  76. package/src/themes/theme-two/theme.css +158 -158
@@ -1,163 +1,163 @@
1
- /*
2
- theme one theme setup
3
- */
4
- @layer theme {
5
- .light {
6
- --color-scheme: light;
7
- }
8
- .dark {
9
- --color-scheme: dark;
10
- }
11
-
12
- :where(html) {
13
- color-scheme: var(--color-scheme, light dark);
14
-
15
- --palette-hue: var(--oklch-teal);
16
- --palette-hue-rotate-by: 5;
17
- --palette-chroma: 0.89;
18
-
19
- /* Primary */
20
- --primary: var(--color-8);
21
- --primary-light: oklch(from var(--primary) calc(l * 1.25) c h);
22
- --primary-dark: oklch(from var(--primary) calc(l * 0.75) c h);
23
- --primary-contrast: var(--gray-1);
24
-
25
- /* Text */
26
- --text-color-1: light-dark(var(--gray-15), var(--gray-1));
27
- --text-color-1-contrast: light-dark(var(--gray-2), var(--gray-15));
28
- --text-color-2: light-dark(var(--gray-13), var(--gray-4));
29
- --text-color-2-contrast: light-dark(var(--gray-4), var(--gray-13));
30
-
31
- /* Surface */
32
- --surface-default: light-dark(var(--gray-1), var(--gray-13));
33
- --surface-filled: light-dark(var(--gray-3), var(--gray-15));
34
- --surface-tonal: light-dark(var(--gray-3), var(--gray-12));
35
- --surface-elevated: light-dark(var(--gray-1), var(--gray-12));
36
-
37
- /* Shadows */
38
- --shadow-color: light-dark(220 3% 15%, 220 40% 2%);
39
- --shadow-strength: light-dark(1%, 10%);
40
- --inner-shadow-highlight: light-dark(
41
- inset 0 -0.5px 0 0 #fff,
42
- inset 0 0.5px 0 0 #0001,
43
- inset 0 -0.5px 0 0 #fff1,
44
- inset 0 0.5px 0 0 #0007
45
- );
46
-
47
- /* Typography */
48
- --font-size-h1: var(--font-size-fluid-3, 3.5rem);
49
- --font-size-h2: var(--font-size-fluid-2, 2rem);
50
- --font-size-h3: var(--font-size-fluid-1, 1.5rem);
51
- --font-size-h4: var(--font-size-3, 1.25rem);
52
- --font-size-h5: var(--font-size-2, 1.1rem);
53
- --font-size-h6: var(--font-size-fluid-0, 1rem);
54
- --font-size-lg: var(--font-size-3, 1.25rem);
55
- --font-size-md: var(--font-size-fluid-0, 1rem);
56
- --font-size-sm: 0.875rem;
57
- --font-size-xs: var(--font-size-0, 0.75rem);
58
-
59
- /* Borders */
60
- --border-color: light-dark(var(--gray-4), var(--gray-12));
61
- --border-radius: var(--size-1);
62
- --border-width: 1px;
63
-
64
- /* Input Field */
65
- --field-border-color: var(--border-color);
66
- --field-border-radius: var(--size-1);
67
- --field-border-width: 1px;
68
- --field-size: 2.3lh;
69
- --field-size-small: 1.9lh;
70
-
71
- /* Button */
72
- --button-border-radius: var(--radius-round);
73
- /* Ripple effect */
74
- @media (prefers-reduced-motion: no-preference) {
75
- --button-ripple-size: 100%;
76
- --button-ripple-duration: 0.5s;
77
- }
78
- }
79
-
80
- /* Highlight colors */
81
- :where(.red, .error, del) {
82
- --palette-hue: var(--oklch-red, 25);
83
- --palette-chroma: 1;
84
- --palette-hue-rotate-by: 1;
85
- }
86
- :where(.blue, .ok, abbr, dfn) {
87
- --palette-hue: var(--oklch-blue, 210);
88
- --palette-chroma: 1;
89
- --palette-hue-rotate-by: 1;
90
- }
91
- :where(.green, .good, ins) {
92
- --palette-hue: var(--oklch-green, 145);
93
- --palette-chroma: 1;
94
- --palette-hue-rotate-by: 1;
95
- }
96
- :where(.orange, .warning) {
97
- --palette-hue: var(--oklch-orange, 75);
98
- --palette-chroma: 1;
99
- --palette-hue-rotate-by: 1;
100
- }
101
-
102
- :where(html) {
103
- --red: oklch(from var(--color-9) l 0.2 25);
104
- --blue: oklch(from var(--color-9) l 0.2 210);
105
- --green: oklch(from var(--color-9) l 0.2 145);
106
- --orange: oklch(from var(--color-7) l 0.2 75);
107
- }
108
-
109
- /* Gray palette */
110
- :where(html) {
111
- --gray-chroma: 0.01;
112
- --gray-lightness: 255;
113
-
114
- --gray-1: oklch(
115
- from var(--color-1) l var(--gray-chroma) var(--gray-lightness)
116
- );
117
- --gray-2: oklch(
118
- from var(--color-2) l var(--gray-chroma) var(--gray-lightness)
119
- );
120
- --gray-3: oklch(
121
- from var(--color-3) l var(--gray-chroma) var(--gray-lightness)
122
- );
123
- --gray-4: oklch(
124
- from var(--color-4) l var(--gray-chroma) var(--gray-lightness)
125
- );
126
- --gray-5: oklch(
127
- from var(--color-5) l var(--gray-chroma) var(--gray-lightness)
128
- );
129
- --gray-6: oklch(
130
- from var(--color-6) l var(--gray-chroma) var(--gray-lightness)
131
- );
132
- --gray-7: oklch(
133
- from var(--color-7) l var(--gray-chroma) var(--gray-lightness)
134
- );
135
- --gray-8: oklch(
136
- from var(--color-8) l var(--gray-chroma) var(--gray-lightness)
137
- );
138
- --gray-9: oklch(
139
- from var(--color-9) l var(--gray-chroma) var(--gray-lightness)
140
- );
141
- --gray-10: oklch(
142
- from var(--color-10) l var(--gray-chroma) var(--gray-lightness)
143
- );
144
- --gray-11: oklch(
145
- from var(--color-11) l var(--gray-chroma) var(--gray-lightness)
146
- );
147
- --gray-12: oklch(
148
- from var(--color-12) l var(--gray-chroma) var(--gray-lightness)
149
- );
150
- --gray-13: oklch(
151
- from var(--color-13) l var(--gray-chroma) var(--gray-lightness)
152
- );
153
- --gray-14: oklch(
154
- from var(--color-14) l var(--gray-chroma) var(--gray-lightness)
155
- );
156
- --gray-15: oklch(
157
- from var(--color-15) l var(--gray-chroma) var(--gray-lightness)
158
- );
159
- --gray-16: oklch(
160
- from var(--color-16) l var(--gray-chroma) var(--gray-lightness)
161
- );
162
- }
163
- }
1
+ /*
2
+ theme one theme setup
3
+ */
4
+ @layer theme {
5
+ .light {
6
+ --color-scheme: light;
7
+ }
8
+ .dark {
9
+ --color-scheme: dark;
10
+ }
11
+
12
+ :where(html) {
13
+ color-scheme: var(--color-scheme, light dark);
14
+
15
+ --palette-hue: var(--oklch-teal);
16
+ --palette-hue-rotate-by: 5;
17
+ --palette-chroma: 0.89;
18
+
19
+ /* Primary */
20
+ --primary: var(--color-8);
21
+ --primary-light: oklch(from var(--primary) calc(l * 1.25) c h);
22
+ --primary-dark: oklch(from var(--primary) calc(l * 0.75) c h);
23
+ --primary-contrast: var(--gray-1);
24
+
25
+ /* Text */
26
+ --text-color-1: light-dark(var(--gray-15), var(--gray-1));
27
+ --text-color-1-contrast: light-dark(var(--gray-2), var(--gray-15));
28
+ --text-color-2: light-dark(var(--gray-13), var(--gray-4));
29
+ --text-color-2-contrast: light-dark(var(--gray-4), var(--gray-13));
30
+
31
+ /* Surface */
32
+ --surface-default: light-dark(var(--gray-1), var(--gray-13));
33
+ --surface-filled: light-dark(var(--gray-3), var(--gray-15));
34
+ --surface-tonal: light-dark(var(--gray-3), var(--gray-12));
35
+ --surface-elevated: light-dark(var(--gray-1), var(--gray-12));
36
+
37
+ /* Shadows */
38
+ --shadow-color: light-dark(220 3% 15%, 220 40% 2%);
39
+ --shadow-strength: light-dark(1%, 10%);
40
+ --inner-shadow-highlight: light-dark(
41
+ inset 0 -0.5px 0 0 #fff,
42
+ inset 0 0.5px 0 0 #0001,
43
+ inset 0 -0.5px 0 0 #fff1,
44
+ inset 0 0.5px 0 0 #0007
45
+ );
46
+
47
+ /* Typography */
48
+ --font-size-h1: var(--font-size-fluid-3, 3.5rem);
49
+ --font-size-h2: var(--font-size-fluid-2, 2rem);
50
+ --font-size-h3: var(--font-size-fluid-1, 1.5rem);
51
+ --font-size-h4: var(--font-size-3, 1.25rem);
52
+ --font-size-h5: var(--font-size-2, 1.1rem);
53
+ --font-size-h6: var(--font-size-fluid-0, 1rem);
54
+ --font-size-lg: var(--font-size-3, 1.25rem);
55
+ --font-size-md: var(--font-size-fluid-0, 1rem);
56
+ --font-size-sm: 0.875rem;
57
+ --font-size-xs: var(--font-size-0, 0.75rem);
58
+
59
+ /* Borders */
60
+ --border-color: light-dark(var(--gray-4), var(--gray-12));
61
+ --border-radius: var(--size-1);
62
+ --border-width: 1px;
63
+
64
+ /* Input Field */
65
+ --field-border-color: var(--border-color);
66
+ --field-border-radius: var(--size-1);
67
+ --field-border-width: 1px;
68
+ --field-size: 2.3lh;
69
+ --field-size-small: 1.9lh;
70
+
71
+ /* Button */
72
+ --button-border-radius: var(--radius-round);
73
+ /* Ripple effect */
74
+ @media (prefers-reduced-motion: no-preference) {
75
+ --button-ripple-size: 100%;
76
+ --button-ripple-duration: 0.5s;
77
+ }
78
+ }
79
+
80
+ /* Highlight colors */
81
+ :where(.red, .error, del) {
82
+ --palette-hue: var(--oklch-red, 25);
83
+ --palette-chroma: 1;
84
+ --palette-hue-rotate-by: 1;
85
+ }
86
+ :where(.blue, .ok, abbr, dfn) {
87
+ --palette-hue: var(--oklch-blue, 210);
88
+ --palette-chroma: 1;
89
+ --palette-hue-rotate-by: 1;
90
+ }
91
+ :where(.green, .good, ins) {
92
+ --palette-hue: var(--oklch-green, 145);
93
+ --palette-chroma: 1;
94
+ --palette-hue-rotate-by: 1;
95
+ }
96
+ :where(.orange, .warning) {
97
+ --palette-hue: var(--oklch-orange, 75);
98
+ --palette-chroma: 1;
99
+ --palette-hue-rotate-by: 1;
100
+ }
101
+
102
+ :where(html) {
103
+ --red: oklch(from var(--color-9) l 0.2 25);
104
+ --blue: oklch(from var(--color-9) l 0.2 210);
105
+ --green: oklch(from var(--color-9) l 0.2 145);
106
+ --orange: oklch(from var(--color-7) l 0.2 75);
107
+ }
108
+
109
+ /* Gray palette */
110
+ :where(html) {
111
+ --gray-chroma: 0.01;
112
+ --gray-lightness: 255;
113
+
114
+ --gray-1: oklch(
115
+ from var(--color-1) l var(--gray-chroma) var(--gray-lightness)
116
+ );
117
+ --gray-2: oklch(
118
+ from var(--color-2) l var(--gray-chroma) var(--gray-lightness)
119
+ );
120
+ --gray-3: oklch(
121
+ from var(--color-3) l var(--gray-chroma) var(--gray-lightness)
122
+ );
123
+ --gray-4: oklch(
124
+ from var(--color-4) l var(--gray-chroma) var(--gray-lightness)
125
+ );
126
+ --gray-5: oklch(
127
+ from var(--color-5) l var(--gray-chroma) var(--gray-lightness)
128
+ );
129
+ --gray-6: oklch(
130
+ from var(--color-6) l var(--gray-chroma) var(--gray-lightness)
131
+ );
132
+ --gray-7: oklch(
133
+ from var(--color-7) l var(--gray-chroma) var(--gray-lightness)
134
+ );
135
+ --gray-8: oklch(
136
+ from var(--color-8) l var(--gray-chroma) var(--gray-lightness)
137
+ );
138
+ --gray-9: oklch(
139
+ from var(--color-9) l var(--gray-chroma) var(--gray-lightness)
140
+ );
141
+ --gray-10: oklch(
142
+ from var(--color-10) l var(--gray-chroma) var(--gray-lightness)
143
+ );
144
+ --gray-11: oklch(
145
+ from var(--color-11) l var(--gray-chroma) var(--gray-lightness)
146
+ );
147
+ --gray-12: oklch(
148
+ from var(--color-12) l var(--gray-chroma) var(--gray-lightness)
149
+ );
150
+ --gray-13: oklch(
151
+ from var(--color-13) l var(--gray-chroma) var(--gray-lightness)
152
+ );
153
+ --gray-14: oklch(
154
+ from var(--color-14) l var(--gray-chroma) var(--gray-lightness)
155
+ );
156
+ --gray-15: oklch(
157
+ from var(--color-15) l var(--gray-chroma) var(--gray-lightness)
158
+ );
159
+ --gray-16: oklch(
160
+ from var(--color-16) l var(--gray-chroma) var(--gray-lightness)
161
+ );
162
+ }
163
+ }
@@ -1,172 +1,172 @@
1
- @layer components.extended {
2
- :where(details) {
3
- --_accordion-transition-time: 0.2s;
4
- --_bg-color: transparent;
5
- --_margin-inline: var(--size-1);
6
- --_shadow: none;
7
-
8
- background-color: var(--_bg-color);
9
- box-shadow: var(--_shadow);
10
- border-radius: var(--border-radius, 4px);
11
- display: block;
12
- margin-inline: var(--_margin-inline);
13
- transition: all var(--_accordion-transition-time) ease-out;
14
-
15
- /* Accordion animation */
16
- /* https://nerdy.dev/open-and-close-transitions-for-the-details-element */
17
- @media (prefers-reduced-motion: no-preference) {
18
- interpolate-size: allow-keywords;
19
- }
20
-
21
- &::details-content {
22
- block-size: 0;
23
- opacity: 0;
24
- overflow-y: clip;
25
- transition: content-visibility var(--_accordion-transition-time)
26
- allow-discrete,
27
- opacity var(--_accordion-transition-time),
28
- block-size var(--_accordion-transition-time);
29
- }
30
-
31
- &[open]::details-content {
32
- block-size: auto;
33
- opacity: 1;
34
- }
35
- /***/
36
-
37
- & > summary {
38
- background-color: inherit;
39
- cursor: pointer;
40
- font-weight: 700;
41
- padding-block: var(--size-3);
42
- user-select: none;
43
- }
44
-
45
- /* Custom arrow */
46
- /* summary {
47
- align-items: center;
48
- background-color: inherit;
49
- cursor: pointer;
50
- display: flex;
51
- justify-content: space-between;
52
- list-style: none;
53
- padding-block: var(--size-3);
54
- user-select: none;
55
-
56
- &::marker,
57
- &::-webkit-details-marker {
58
- display: none;
59
- }
60
-
61
- svg {
62
- transition: rotate 0.2s ease-out;
63
- }
64
- }
65
-
66
- &[open] > summary svg {
67
- rotate: 180deg;
68
- } */
69
-
70
- & > .content {
71
- margin-block-start: 0;
72
- padding-block: var(--size-2) var(--size-3);
73
- }
74
-
75
- & > .actions {
76
- display: flex;
77
- gap: var(--size-1);
78
- justify-content: end;
79
- margin-block-start: var(--size-3);
80
- padding-block-end: var(--size-1);
81
- padding-inline: var(--size-3) var(--size-1);
82
- }
83
-
84
- /* Variants */
85
- &.card,
86
- &.text {
87
- --_bg-color: transparent;
88
- --_margin-inline: var(--size-1);
89
- }
90
-
91
- &.elevated {
92
- --_bg-color: var(--surface-elevated);
93
- --_margin-inline: 0;
94
- --_shadow: var(--shadow-2);
95
- }
96
-
97
- &.outlined {
98
- --_bg-color: var(--surface-default);
99
- --_margin-inline: 0;
100
- border: 1px solid var(--border-color);
101
- }
102
-
103
- &.tonal {
104
- --_bg-color: var(--surface-tonal);
105
- --_margin-inline: 0;
106
- }
107
-
108
- &:where(.elevated, .outlined, .tonal) > * {
109
- padding-inline: var(--size-3);
110
- }
111
- }
112
-
113
- /* Accordion group */
114
- :where(.card:has(details)) {
115
- --_gutter-color: var(--border-color);
116
-
117
- display: block;
118
-
119
- & > .content {
120
- margin-block: 0;
121
- padding: 0;
122
- }
123
-
124
- &.card,
125
- &.text {
126
- &:not(.tonal, .outlined, .elevated) {
127
- summary {
128
- padding-inline: 0;
129
- }
130
- }
131
- }
132
-
133
- details {
134
- --_margin-inline: 0;
135
-
136
- border: 0;
137
- box-shadow: none;
138
-
139
- & > * {
140
- padding-inline: var(--size-3);
141
- }
142
-
143
- /* Border between accordion items */
144
- & + & {
145
- summary {
146
- border-radius: 0;
147
- border-block-start: 1px solid var(--_gutter-color);
148
- }
149
- }
150
-
151
- /* First item */
152
- &:first-of-type {
153
- border-start-start-radius: var(--border-radius, 0.25rem);
154
- border-start-end-radius: var(--border-radius, 0.25rem);
155
- summary {
156
- border-start-start-radius: var(--border-radius, 0.25rem);
157
- border-start-end-radius: var(--border-radius, 0.25rem);
158
- }
159
- }
160
-
161
- /* Last item */
162
- &:last-of-type {
163
- border-end-start-radius: var(--border-radius, 0.25rem);
164
- border-end-end-radius: var(--border-radius, 0.25rem);
165
- summary {
166
- border-end-start-radius: var(--border-radius, 0.25rem);
167
- border-end-end-radius: var(--border-radius, 0.25rem);
168
- }
169
- }
170
- }
171
- }
172
- }
1
+ @layer components.extended {
2
+ :where(details) {
3
+ --_accordion-transition-time: 0.2s;
4
+ --_bg-color: transparent;
5
+ --_margin-inline: var(--size-1);
6
+ --_shadow: none;
7
+
8
+ background-color: var(--_bg-color);
9
+ box-shadow: var(--_shadow);
10
+ border-radius: var(--border-radius, 4px);
11
+ display: block;
12
+ margin-inline: var(--_margin-inline);
13
+ transition: all var(--_accordion-transition-time) ease-out;
14
+
15
+ /* Accordion animation */
16
+ /* https://nerdy.dev/open-and-close-transitions-for-the-details-element */
17
+ @media (prefers-reduced-motion: no-preference) {
18
+ interpolate-size: allow-keywords;
19
+ }
20
+
21
+ &::details-content {
22
+ block-size: 0;
23
+ opacity: 0;
24
+ overflow-y: clip;
25
+ transition:
26
+ content-visibility var(--_accordion-transition-time) allow-discrete,
27
+ opacity var(--_accordion-transition-time),
28
+ block-size var(--_accordion-transition-time);
29
+ }
30
+
31
+ &[open]::details-content {
32
+ block-size: auto;
33
+ opacity: 1;
34
+ }
35
+ /***/
36
+
37
+ & > summary {
38
+ background-color: inherit;
39
+ cursor: pointer;
40
+ font-weight: 700;
41
+ padding-block: var(--size-3);
42
+ user-select: none;
43
+ }
44
+
45
+ /* Custom arrow */
46
+ /* summary {
47
+ align-items: center;
48
+ background-color: inherit;
49
+ cursor: pointer;
50
+ display: flex;
51
+ justify-content: space-between;
52
+ list-style: none;
53
+ padding-block: var(--size-3);
54
+ user-select: none;
55
+
56
+ &::marker,
57
+ &::-webkit-details-marker {
58
+ display: none;
59
+ }
60
+
61
+ svg {
62
+ transition: rotate 0.2s ease-out;
63
+ }
64
+ }
65
+
66
+ &[open] > summary svg {
67
+ rotate: 180deg;
68
+ } */
69
+
70
+ & > .content {
71
+ margin-block-start: 0;
72
+ padding-block: var(--size-2) var(--size-3);
73
+ }
74
+
75
+ & > .actions {
76
+ display: flex;
77
+ gap: var(--size-1);
78
+ justify-content: end;
79
+ margin-block-start: var(--size-3);
80
+ padding-block-end: var(--size-1);
81
+ padding-inline: var(--size-3) var(--size-1);
82
+ }
83
+
84
+ /* Variants */
85
+ &.card,
86
+ &.text {
87
+ --_bg-color: transparent;
88
+ --_margin-inline: var(--size-1);
89
+ }
90
+
91
+ &.elevated {
92
+ --_bg-color: var(--surface-elevated);
93
+ --_margin-inline: 0;
94
+ --_shadow: var(--shadow-2);
95
+ }
96
+
97
+ &.outlined {
98
+ --_bg-color: var(--surface-default);
99
+ --_margin-inline: 0;
100
+ border: 1px solid var(--border-color);
101
+ }
102
+
103
+ &.tonal {
104
+ --_bg-color: var(--surface-tonal);
105
+ --_margin-inline: 0;
106
+ }
107
+
108
+ &:where(.elevated, .outlined, .tonal) > * {
109
+ padding-inline: var(--size-3);
110
+ }
111
+ }
112
+
113
+ /* Accordion group */
114
+ :where(.card:has(details)) {
115
+ --_gutter-color: var(--border-color);
116
+
117
+ display: block;
118
+
119
+ & > .content {
120
+ margin-block: 0;
121
+ padding: 0;
122
+ }
123
+
124
+ &.card,
125
+ &.text {
126
+ &:not(.tonal, .outlined, .elevated) {
127
+ summary {
128
+ padding-inline: 0;
129
+ }
130
+ }
131
+ }
132
+
133
+ & > details {
134
+ --_margin-inline: 0;
135
+
136
+ border: 0;
137
+ box-shadow: none;
138
+
139
+ & > * {
140
+ padding-inline: var(--size-3);
141
+ }
142
+
143
+ /* Border between accordion items */
144
+ & + & {
145
+ summary {
146
+ border-radius: 0;
147
+ border-block-start: 1px solid var(--_gutter-color);
148
+ }
149
+ }
150
+
151
+ /* First item */
152
+ &:first-of-type {
153
+ border-start-start-radius: var(--border-radius, 0.25rem);
154
+ border-start-end-radius: var(--border-radius, 0.25rem);
155
+ summary {
156
+ border-start-start-radius: var(--border-radius, 0.25rem);
157
+ border-start-end-radius: var(--border-radius, 0.25rem);
158
+ }
159
+ }
160
+
161
+ /* Last item */
162
+ &:last-of-type {
163
+ border-end-start-radius: var(--border-radius, 0.25rem);
164
+ border-end-end-radius: var(--border-radius, 0.25rem);
165
+ summary {
166
+ border-end-start-radius: var(--border-radius, 0.25rem);
167
+ border-end-end-radius: var(--border-radius, 0.25rem);
168
+ }
169
+ }
170
+ }
171
+ }
172
+ }