opui-css 2.2.2 → 2.3.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 (80) hide show
  1. package/README.md +23 -7
  2. package/dist/{op+ui.css → theme-one+op.css} +293 -145
  3. package/dist/{ui.css → theme-one.css} +171 -14
  4. package/dist/theme-two+op.css +4021 -0
  5. package/dist/theme-two.css +3975 -0
  6. package/package.json +6 -5
  7. package/src/core/normalize.css +3 -2
  8. package/src/themes/theme-one/components/table.css +100 -0
  9. package/src/{components → themes/theme-one/components}/toggle-button-group.css +1 -5
  10. package/src/themes/theme-one/components.css +37 -0
  11. package/src/{theme.css → themes/theme-one/setup.css} +1 -1
  12. package/src/themes/theme-one/theme+op.css +5 -0
  13. package/src/themes/theme-one/theme.css +13 -0
  14. package/src/themes/theme-two/components/accordion.css +172 -0
  15. package/src/themes/theme-two/components/alert.css +85 -0
  16. package/src/themes/theme-two/components/avatar.css +68 -0
  17. package/src/themes/theme-two/components/badge.css +101 -0
  18. package/src/themes/theme-two/components/button-group.css +50 -0
  19. package/src/themes/theme-two/components/button.css +217 -0
  20. package/src/themes/theme-two/components/card.css +82 -0
  21. package/src/themes/theme-two/components/checkbox-radio.css +123 -0
  22. package/src/themes/theme-two/components/chip.css +135 -0
  23. package/src/themes/theme-two/components/definition-list.css +65 -0
  24. package/src/themes/theme-two/components/dialog.css +59 -0
  25. package/src/themes/theme-two/components/divider.css +7 -0
  26. package/src/themes/theme-two/components/field-group.css +83 -0
  27. package/src/themes/theme-two/components/field.css +281 -0
  28. package/src/themes/theme-two/components/icon-button.css +40 -0
  29. package/src/themes/theme-two/components/link.css +21 -0
  30. package/src/themes/theme-two/components/list.css +317 -0
  31. package/src/themes/theme-two/components/progress.css +83 -0
  32. package/src/themes/theme-two/components/range.css +121 -0
  33. package/src/themes/theme-two/components/rich-text.css +210 -0
  34. package/src/themes/theme-two/components/select.css +162 -0
  35. package/src/themes/theme-two/components/snackbar.css +148 -0
  36. package/src/themes/theme-two/components/spinner.css +38 -0
  37. package/src/themes/theme-two/components/switch.css +189 -0
  38. package/src/themes/theme-two/components/tab-buttons.css +120 -0
  39. package/src/themes/theme-two/components/text-field.css +57 -0
  40. package/src/themes/theme-two/components/textarea.css +25 -0
  41. package/src/themes/theme-two/components/toggle-button-group.css +135 -0
  42. package/src/themes/theme-two/components/tooltip.css +94 -0
  43. package/src/themes/theme-two/components/typography.css +209 -0
  44. package/src/themes/theme-two/components.css +37 -0
  45. package/src/themes/theme-two/setup.css +158 -0
  46. package/src/themes/theme-two/theme+op.css +5 -0
  47. package/src/themes/theme-two/theme.css +13 -0
  48. package/src/core/components.css +0 -37
  49. package/src/main.css +0 -13
  50. package/src/opui.css +0 -10
  51. /package/src/{components → themes/theme-one/components}/accordion.css +0 -0
  52. /package/src/{components → themes/theme-one/components}/alert.css +0 -0
  53. /package/src/{components → themes/theme-one/components}/avatar.css +0 -0
  54. /package/src/{components → themes/theme-one/components}/badge.css +0 -0
  55. /package/src/{components → themes/theme-one/components}/button-group.css +0 -0
  56. /package/src/{components → themes/theme-one/components}/button.css +0 -0
  57. /package/src/{components → themes/theme-one/components}/card.css +0 -0
  58. /package/src/{components → themes/theme-one/components}/checkbox-radio.css +0 -0
  59. /package/src/{components → themes/theme-one/components}/chip.css +0 -0
  60. /package/src/{components → themes/theme-one/components}/definition-list.css +0 -0
  61. /package/src/{components → themes/theme-one/components}/dialog.css +0 -0
  62. /package/src/{components → themes/theme-one/components}/divider.css +0 -0
  63. /package/src/{components → themes/theme-one/components}/field-group.css +0 -0
  64. /package/src/{components → themes/theme-one/components}/field.css +0 -0
  65. /package/src/{components → themes/theme-one/components}/icon-button.css +0 -0
  66. /package/src/{components → themes/theme-one/components}/link.css +0 -0
  67. /package/src/{components → themes/theme-one/components}/list.css +0 -0
  68. /package/src/{components → themes/theme-one/components}/progress.css +0 -0
  69. /package/src/{components → themes/theme-one/components}/range.css +0 -0
  70. /package/src/{components → themes/theme-one/components}/rich-text.css +0 -0
  71. /package/src/{components → themes/theme-one/components}/select.css +0 -0
  72. /package/src/{components → themes/theme-one/components}/snackbar.css +0 -0
  73. /package/src/{components → themes/theme-one/components}/spinner.css +0 -0
  74. /package/src/{components → themes/theme-one/components}/switch.css +0 -0
  75. /package/src/{components → themes/theme-one/components}/tab-buttons.css +0 -0
  76. /package/src/{components → themes/theme-one/components}/text-field.css +0 -0
  77. /package/src/{components → themes/theme-one/components}/textarea.css +0 -0
  78. /package/src/{components → themes/theme-one/components}/tooltip.css +0 -0
  79. /package/src/{components → themes/theme-one/components}/typography.css +0 -0
  80. /package/src/{components → themes/theme-two/components}/table.css +0 -0
@@ -0,0 +1,217 @@
1
+ @layer components.root {
2
+ :where(.button) {
3
+ --_bg-color: transparent;
4
+ --_border-color: transparent;
5
+ --_border-radius: var(--button-border-radius);
6
+ --_font-size: initial;
7
+ --_min-height: 2.375rem;
8
+ --_text-color: var(--primary);
9
+
10
+ -webkit-tap-highlight-color: transparent;
11
+ -webkit-touch-callout: none;
12
+ align-items: center;
13
+ background: var(--_bg-color) var(--ripple, none);
14
+ border-radius: var(--_border-radius);
15
+ border: var(--border-size-1) solid var(--_border-color);
16
+ color: var(--_text-color);
17
+ display: inline-flex;
18
+ font-size: var(--_font-size);
19
+ font-weight: 700;
20
+ gap: var(--size-2);
21
+ justify-content: center;
22
+ min-block-size: var(--_min-height);
23
+ padding-block: 0.5ex;
24
+ padding-inline: 1.5ex;
25
+ text-align: center;
26
+ text-decoration: none;
27
+
28
+ user-select: none;
29
+
30
+ &:where([disabled]) {
31
+ cursor: not-allowed;
32
+ opacity: 0.64;
33
+ }
34
+
35
+ @media (prefers-reduced-motion: no-preference) {
36
+ transition: background-color 0.2s var(--ease-out-3),
37
+ box-shadow 0.2s var(--ease-out-3), border-color 0.2s var(--ease-out-3),
38
+ color 0.2s var(--ease-out-3), outline-offset 0.05s var(--ease-1);
39
+
40
+ /* Ripple effect */
41
+ background-position: center;
42
+
43
+ &:where(:not([disabled])) {
44
+ &:where(:not(:active):hover) {
45
+ --ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
46
+ center/15000%;
47
+
48
+ transition: background var(--button-ripple-duration);
49
+ }
50
+
51
+ &:where(:hover:active) {
52
+ background-size: var(--button-ripple-size);
53
+ transition: background 0s;
54
+ }
55
+ }
56
+ }
57
+
58
+ /* Element states */
59
+ &:where(:not([disabled])) {
60
+ &:where(:not(:active):hover) {
61
+ --_bg-color: light-dark(
62
+ oklch(from var(--primary) l 0.01 h / 20%),
63
+ oklch(from var(--primary) l 0.01 h / 40%)
64
+ );
65
+ }
66
+
67
+ &:where(:hover:active) {
68
+ --_bg-color: light-dark(
69
+ oklch(from var(--primary) l 0.06 h / 30%),
70
+ oklch(from var(--primary) l 0.06 h / 40%)
71
+ );
72
+ }
73
+ }
74
+
75
+ /* Disabled */
76
+ &:where([disabled]) {
77
+ --_text-color: color-mix(
78
+ in oklch,
79
+ var(--text-color-2) 50%,
80
+ var(--surface-default)
81
+ );
82
+ }
83
+
84
+ /* Icon */
85
+ &:where(:has(svg), &.icon-only) {
86
+ gap: 1ex;
87
+
88
+ svg {
89
+ max-block-size: 0.7lh;
90
+ color: currentColor;
91
+ }
92
+ }
93
+
94
+ /* Sizes */
95
+ &.small {
96
+ --_min-height: 1.875rem;
97
+ padding-block: 0;
98
+ padding-inline: 1ex;
99
+ }
100
+
101
+ &.large {
102
+ --_min-height: 2.875rem;
103
+ padding-inline: 4ex;
104
+ }
105
+
106
+ /* Variants */
107
+ &.outlined {
108
+ --_bg-color: var(--surface-default);
109
+ --_border-color: var(--color-8);
110
+ --_text-color: var(--color-8);
111
+
112
+ &:where(:not([disabled])) {
113
+ &:where(:not(:active):hover) {
114
+ --_bg-color: var(--color-10);
115
+ --_border-color: var(--color-10);
116
+ --_text-color: var(--color-1);
117
+ }
118
+
119
+ &:where(:active) {
120
+ --_bg-color: var(--color-9);
121
+ --_border-color: var(--color-9);
122
+ --_text-color: var(--color-1);
123
+ }
124
+ }
125
+
126
+ &:where([disabled]) {
127
+ --_bg-color: var(--surface-default);
128
+ --_border-color: color-mix(
129
+ in oklch,
130
+ var(--text-color-2) 20%,
131
+ var(--surface-default)
132
+ );
133
+ --_text-color: color-mix(
134
+ in oklch,
135
+ var(--text-color-2) 40%,
136
+ var(--surface-default)
137
+ );
138
+ }
139
+ }
140
+ &.tonal {
141
+ --_bg-color: var(--color-6);
142
+ --_text-color: var(--color-16);
143
+
144
+ &:where(:not([disabled])) {
145
+ &:where(:not(:active):hover) {
146
+ --_bg-color: var(--color-9);
147
+ --_border-color: var(--color-9);
148
+ }
149
+
150
+ &:where(:active) {
151
+ --_bg-color: var(--color-7);
152
+ --_border-color: var(--color-7);
153
+ }
154
+ }
155
+
156
+ &:where([disabled]) {
157
+ --_bg-color: color-mix(
158
+ in oklch,
159
+ var(--text-color-2) 8%,
160
+ var(--surface-default)
161
+ );
162
+ --_text-color: color-mix(
163
+ in oklch,
164
+ var(--text-color-2) 70%,
165
+ var(--surface-default)
166
+ );
167
+ }
168
+ }
169
+ &.filled {
170
+ --_bg-color: var(--color-8);
171
+ --_text-color: var(--color-1);
172
+
173
+ &:where(:not([disabled])) {
174
+ &:where(:not(:active):hover) {
175
+ --_bg-color: var(--color-10);
176
+ --_border-color: var(--color-10);
177
+ }
178
+
179
+ &:where(:active) {
180
+ --_bg-color: var(--color-9);
181
+ --_border-color: var(--color-9);
182
+ }
183
+ }
184
+
185
+ &:where([disabled]) {
186
+ --_bg-color: color-mix(
187
+ in oklch,
188
+ var(--text-color-2) 20%,
189
+ var(--surface-default)
190
+ );
191
+ --_text-color: color-mix(
192
+ in oklch,
193
+ var(--text-color-2) 70%,
194
+ var(--surface-default)
195
+ );
196
+ }
197
+ }
198
+ }
199
+
200
+ /* file input */
201
+ :where(input[type="file"]) {
202
+ align-self: flex-start;
203
+ border-radius: var(--radius-2);
204
+ border: var(--border-size-1) solid var(--surface-filled);
205
+ box-shadow: var(--inner-shadow-4);
206
+ color: var(--text-color-2-contrast);
207
+ cursor: initial;
208
+ max-inline-size: 100%;
209
+ padding: 0;
210
+ }
211
+
212
+ :where(input[type="file"])::-webkit-file-upload-button,
213
+ :where(input[type="file"])::file-selector-button {
214
+ cursor: pointer;
215
+ margin-inline-end: var(--size-relative-6);
216
+ }
217
+ }
@@ -0,0 +1,82 @@
1
+ @layer components.root {
2
+ :where(.card) {
3
+ --_bg-color: transparent;
4
+ --_border-color: transparent;
5
+ --_border-width: 0;
6
+ --_shadow: none;
7
+
8
+ background-color: var(--_bg-color);
9
+ border-color: var(--_border-color);
10
+ border-radius: var(--border-radius, 0.25rem);
11
+ border-style: solid;
12
+ border-width: var(--_border-width);
13
+ box-shadow: var(--_shadow);
14
+ display: flex;
15
+ flex-direction: column;
16
+ gap: var(--size-3);
17
+ overflow: hidden;
18
+ padding-inline: 0;
19
+
20
+ /* Variants */
21
+ &.text {
22
+ --_bg-color: transparent;
23
+ --_border-color: transparent;
24
+ --_border-width: 0;
25
+ --_shadow: none;
26
+ padding-inline: 0;
27
+ }
28
+
29
+ &.tonal {
30
+ --_bg-color: var(--surface-tonal);
31
+ --_border-width: 1px;
32
+ }
33
+
34
+ &.elevated {
35
+ --_bg-color: var(--surface-elevated);
36
+ --_border-color: transparent;
37
+ --_border-width: 0;
38
+ --_shadow: var(--shadow-3);
39
+
40
+ /* Adjust shadow in dark mode */
41
+ @container style(--color-scheme: dark) {
42
+ --_shadow: var(--shadow-4);
43
+ }
44
+ }
45
+
46
+ &.outlined {
47
+ --_bg-color: var(--surface-default);
48
+ --_border-color: var(--border-color);
49
+ --_border-width: 1px;
50
+ }
51
+
52
+ & > :where(hgroup, .content) {
53
+ padding-inline: var(--size-3);
54
+ }
55
+
56
+ & > hgroup {
57
+ padding-block: var(--size-3) 0;
58
+
59
+ /* Top paragraph */
60
+ & > p:first-of-type:first-child {
61
+ line-height: 1.3;
62
+ }
63
+
64
+ /* Bottom paragraph */
65
+ & > p:last-of-type:last-child:not(:first-child) {
66
+ font-size: var(--font-size-1, 1rem);
67
+ }
68
+ }
69
+
70
+ & > .content:where(:only-child, :first-child) {
71
+ padding-block: var(--size-3) var(--size-4);
72
+ }
73
+
74
+ & > .actions {
75
+ display: flex;
76
+ gap: var(--size-1);
77
+ margin-block: var(--size-2) 0;
78
+ padding-block-end: var(--size-1);
79
+ padding-inline: var(--size-1) var(--size-3);
80
+ }
81
+ }
82
+ }
@@ -0,0 +1,123 @@
1
+ @layer components.root {
2
+ label:where(.checkbox, .radio) {
3
+ align-items: center;
4
+ color: var(--text-color-1);
5
+ cursor: pointer;
6
+ display: inline-grid;
7
+ gap: 0 var(--size-2);
8
+ grid-auto-columns: auto;
9
+ grid-auto-flow: column;
10
+ inline-size: fit-content;
11
+ line-height: 1.5;
12
+ transform: translateZ(0);
13
+ user-select: none;
14
+
15
+ /* Disabled */
16
+ &:has([disabled]) {
17
+ cursor: not-allowed;
18
+ opacity: 0.64;
19
+ user-select: none;
20
+
21
+ input {
22
+ cursor: not-allowed;
23
+ }
24
+ }
25
+
26
+ /* Required dot */
27
+ &:has([required]:not([type="checkbox"]:checked)) {
28
+ .label:after {
29
+ color: var(--red);
30
+ content: "*";
31
+ inset: 0 -0.25ex auto auto;
32
+ position: absolute;
33
+ }
34
+ }
35
+
36
+ /* Label */
37
+ .label {
38
+ grid-column: 2;
39
+ grid-row: 1;
40
+ position: relative;
41
+ padding-inline: 0 1ex;
42
+ }
43
+
44
+ /* Supporting text */
45
+ .supporting-text {
46
+ color: var(--text-color-2);
47
+ font-size: var(--font-size-xs);
48
+ grid-column: 2;
49
+ grid-row: 2;
50
+ line-height: 1.5;
51
+ z-index: 1;
52
+ }
53
+
54
+ /* Stacked layout */
55
+ &.stack {
56
+ justify-items: center;
57
+ grid-auto-columns: unset;
58
+
59
+ .label {
60
+ grid-column: 1/-1;
61
+ grid-row: 2;
62
+ margin-block-start: var(--size-1);
63
+ padding-inline: 1ex;
64
+
65
+ /* Required dot */
66
+ &::after {
67
+ inset: 0 -0.25ex auto auto;
68
+ }
69
+ }
70
+
71
+ .supporting-text {
72
+ grid-column: 1/-1;
73
+ grid-row: 3;
74
+ }
75
+ }
76
+
77
+ /* Input */
78
+ input {
79
+ aspect-ratio: 1;
80
+ block-size: 1.125rem;
81
+ cursor: pointer;
82
+ inline-size: 1.125rem;
83
+
84
+ &::before {
85
+ --highlight-size: 175%;
86
+ }
87
+ }
88
+
89
+ /* Sizes */
90
+ &.small {
91
+ input {
92
+ block-size: var(--size-3);
93
+ inline-size: var(--size-3);
94
+ }
95
+ }
96
+
97
+ &.large {
98
+ input {
99
+ block-size: var(--size-4);
100
+ inline-size: var(--size-4);
101
+ }
102
+ }
103
+
104
+ /* Validation */
105
+ &.error {
106
+ input[type="checkbox"] {
107
+ accent-color: var(--color-9);
108
+
109
+ & ~ :where(.label, .supporting-text) {
110
+ color: var(--color-9);
111
+ }
112
+ }
113
+ }
114
+
115
+ /* Touch devices */
116
+ @media (pointer: coarse) {
117
+ input {
118
+ block-size: var(--size-4);
119
+ inline-size: var(--size-4);
120
+ }
121
+ }
122
+ }
123
+ }
@@ -0,0 +1,135 @@
1
+ @layer components.root {
2
+ :where(.chip) {
3
+ --_bg-color: var(--surface-tonal);
4
+ --_border-color: var(--border-color);
5
+ --_color: var(--text-color-1);
6
+
7
+ align-items: center;
8
+ background: var(--_bg-color) var(--ripple, none);
9
+ border: 1px solid var(--_border-color);
10
+ border-radius: var(--radius-2, 0.5rem);
11
+ color: var(--_color);
12
+ display: inline-flex;
13
+ font-size: var(--font-size-0, 0.75rem);
14
+ gap: var(--size-1);
15
+ block-size: var(--size-7, 2rem);
16
+ padding-inline: var(--size-2);
17
+ text-decoration: none;
18
+
19
+ /* Variants */
20
+ &.tonal {
21
+ --_bg-color: var(--surface-tonal);
22
+ --_color: var(--text-color-1);
23
+ }
24
+
25
+ &.outlined {
26
+ --_bg-color: var(--surface-default);
27
+ --_color: var(--text-color-1);
28
+ }
29
+
30
+ /* TODO: should this be out of the box? */
31
+ /* Colors */
32
+ /* &:hover {
33
+ --_bg-color: var(--color-11);
34
+ --_border-color: var(--color-11);
35
+ --_color: var(--text-color-1);
36
+ } */
37
+ /* &.red,
38
+ &.blue,
39
+ &.green,
40
+ &.orange,
41
+ &.primary {
42
+ --_bg-color: var(--color-5);
43
+ --_border-color: var(--color-7);
44
+ --_color: var(--text-color-1-contrast);
45
+
46
+ &:hover {
47
+ --_bg-color: var(--color-7);
48
+ --_border-color: var(--color-7);
49
+ --_color: var(--text-color-1-contrast);
50
+
51
+ &:active {
52
+ --_bg-color: var(--color-8);
53
+ --_border-color: var(--color-8);
54
+ }
55
+ }
56
+
57
+ &.outlined {
58
+ --_bg-color: var(--surface-tonal);
59
+ --_color: var(--text-color-1);
60
+ --_border-color: var(--color-9);
61
+
62
+ &:hover {
63
+ --_bg-color: var(--color-9);
64
+ --_border-color: var(--color-9);
65
+ --_color: var(--text-color-1);
66
+
67
+ &:active {
68
+ --_bg-color: var(--color-11);
69
+ --_border-color: var(--color-11);
70
+ }
71
+ }
72
+ }
73
+ } */
74
+
75
+ &:where(button, a):where(:not([disabled])) {
76
+ &:where(:not(:active)):hover {
77
+ --_bg-color: light-dark(
78
+ oklch(from var(--surface-tonal) calc(l * 0.98) c h),
79
+ oklch(from var(--surface-tonal) calc(l * 1.1) c h)
80
+ );
81
+ }
82
+ }
83
+
84
+ /* Icon */
85
+ &:has(svg:first-child) {
86
+ padding-inline: var(--size-1) var(--size-2);
87
+ }
88
+ &:has(svg:last-child) {
89
+ padding-inline: var(--size-2) var(--size-1);
90
+ }
91
+
92
+ &:has(svg) {
93
+ svg {
94
+ flex-shrink: 0;
95
+ inline-size: var(--size-3);
96
+ }
97
+ }
98
+
99
+ /* Sizes */
100
+ &.small {
101
+ block-size: var(--size-5);
102
+ }
103
+ &.multiline {
104
+ block-size: auto;
105
+ }
106
+
107
+ /* Ripple effect */
108
+ background-position: center;
109
+
110
+ &:where(:not([disabled])) {
111
+ &:where(:not(:active):hover) {
112
+ --ripple: radial-gradient(circle, transparent 1%, var(--_bg-color) 1%)
113
+ center/15000%;
114
+
115
+ transition: background var(--button-ripple-duration);
116
+ }
117
+
118
+ &:where(:hover:active) {
119
+ background-size: var(--button-ripple-size);
120
+ transition: background 0s;
121
+ }
122
+ }
123
+
124
+ /* Disabled */
125
+ &:where([disabled]) {
126
+ opacity: 0.64;
127
+ --_text-color: color-mix(
128
+ in oklch,
129
+ var(--text-color-2) 50%,
130
+ var(--surface-default)
131
+ );
132
+ cursor: not-allowed;
133
+ }
134
+ }
135
+ }
@@ -0,0 +1,65 @@
1
+ @layer components.root {
2
+ :where(.definition-list) {
3
+ --_border-style: solid;
4
+ --_border-width: 1px;
5
+
6
+ display: grid;
7
+ gap: var(--size-3);
8
+ padding: 0;
9
+
10
+ &.dotted {
11
+ --_border-style: dotted;
12
+ --_border-width: 2px;
13
+ }
14
+
15
+ li {
16
+ display: grid;
17
+ margin: 0;
18
+ padding: 0;
19
+
20
+ .term {
21
+ display: block;
22
+ font-weight: 700;
23
+ overflow: hidden;
24
+ position: relative;
25
+ }
26
+
27
+ hr {
28
+ display: none;
29
+ margin: 0;
30
+ }
31
+ }
32
+
33
+ @container (width > 45ch) {
34
+ gap: var(--size-1);
35
+
36
+ li {
37
+ align-items: baseline;
38
+ display: grid;
39
+ gap: var(--size-1);
40
+ grid-template-columns: 1fr auto;
41
+
42
+ &:has(hr) {
43
+ grid-template-columns: auto 1fr auto;
44
+ }
45
+
46
+ hr {
47
+ background-color: transparent;
48
+ border-block-end: var(--_border-width) var(--_border-style)
49
+ var(--border-color);
50
+ block-size: 2px;
51
+ display: block;
52
+ }
53
+
54
+ .term {
55
+ &::after {
56
+ display: inline-block;
57
+ }
58
+ }
59
+ .description {
60
+ color: var(--text-color-2);
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
@@ -0,0 +1,59 @@
1
+ @layer components.extended {
2
+ :where(dialog) {
3
+ margin-block-start: 15%; /* vertical alignment */
4
+ padding-block: 0;
5
+ pointer-events: none;
6
+
7
+ &::backdrop {
8
+ background-color: rgba(0, 0, 0, 0.5);
9
+ backdrop-filter: blur(5px);
10
+
11
+ @media (prefers-reduced-motion: reduce) {
12
+ backdrop-filter: none;
13
+ }
14
+ }
15
+
16
+ &:not([open]) {
17
+ display: none;
18
+ }
19
+
20
+ &[open] {
21
+ pointer-events: all;
22
+ }
23
+
24
+ .actions {
25
+ justify-content: end;
26
+ padding-inline: var(--size-3) var(--size-1);
27
+ }
28
+
29
+ /* Animation */
30
+ /* There's no close animation, intentionally */
31
+ opacity: 0;
32
+
33
+ &[open] {
34
+ opacity: 1;
35
+ transition: display 0.2s allow-discrete,
36
+ margin-block-start 0.3s var(--ease-1), overlay 0.2s allow-discrete,
37
+ opacity 0.2s var(--ease-out-1);
38
+
39
+ @starting-style {
40
+ opacity: 0;
41
+ }
42
+ }
43
+
44
+ @media (prefers-reduced-motion: no-preference) {
45
+ margin-block-start: 17%;
46
+ &[open] {
47
+ margin-block-start: 15%;
48
+
49
+ @starting-style {
50
+ margin-block-start: 17%;
51
+ }
52
+ }
53
+ }
54
+ }
55
+
56
+ :where(html:has(dialog[open])) {
57
+ overflow: hidden;
58
+ }
59
+ }
@@ -0,0 +1,7 @@
1
+ @layer components.root {
2
+ :where(hr) {
3
+ background-color: var(--border-color);
4
+ block-size: var(--border-size-1);
5
+ margin-block: var(--size-fluid-3);
6
+ }
7
+ }