opui-css 5.0.0 → 5.0.1

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 (114) hide show
  1. package/CHANGELOG.md +282 -276
  2. package/LICENSE +21 -21
  3. package/MIGRATING.md +127 -127
  4. package/README.md +87 -87
  5. package/astro/index.ts +46 -46
  6. package/components/AGENTS.md +248 -248
  7. package/components/Accordion/Accordion.astro +42 -42
  8. package/components/Anchor/Anchor.astro +51 -51
  9. package/components/Avatar/Avatar.astro +38 -38
  10. package/components/Badge/Badge.astro +59 -59
  11. package/components/Button/Button.astro +45 -45
  12. package/components/ButtonGroup/ButtonGroup.astro +29 -29
  13. package/components/Callout/Callout.astro +75 -75
  14. package/components/Card/Card.astro +36 -36
  15. package/components/Checkbox/Checkbox.astro +76 -76
  16. package/components/Checkbox/CheckboxInput.astro +32 -32
  17. package/components/Chip/Chip.astro +37 -37
  18. package/components/ClassicSelect/ClassicSelect.astro +83 -83
  19. package/components/DescriptionList/Description.astro +12 -12
  20. package/components/DescriptionList/DescriptionList.astro +22 -22
  21. package/components/DescriptionList/Item.astro +12 -12
  22. package/components/DescriptionList/Term.astro +12 -12
  23. package/components/DescriptionList/index.ts +12 -12
  24. package/components/Dialog/Dialog.astro +41 -41
  25. package/components/Divider/Divider.astro +17 -17
  26. package/components/Drawer/Drawer.astro +49 -49
  27. package/components/Drawer/DrawerFooter.astro +14 -14
  28. package/components/Drawer/DrawerHeader.astro +31 -31
  29. package/components/FieldDescription/FieldDescription.astro +13 -13
  30. package/components/FieldGroup/FieldGroup.astro +31 -31
  31. package/components/FieldLegend/FieldLegend.astro +15 -15
  32. package/components/FieldSet/FieldSet.astro +15 -15
  33. package/components/Form/Form.astro +15 -15
  34. package/components/IconButton/IconButton.astro +26 -26
  35. package/components/List/List.astro +36 -36
  36. package/components/ListItem/ListItem.astro +118 -118
  37. package/components/Progress/Progress.astro +41 -40
  38. package/components/Radio/Radio.astro +70 -70
  39. package/components/Radio/RadioInput.astro +24 -24
  40. package/components/Range/Range.astro +136 -136
  41. package/components/Select/Select.astro +106 -106
  42. package/components/Switch/Switch.astro +101 -101
  43. package/components/Switch/SwitchInput.astro +25 -25
  44. package/components/Table/Body.astro +13 -13
  45. package/components/Table/Cell.astro +13 -13
  46. package/components/Table/Column.astro +15 -15
  47. package/components/Table/ColumnGroup.astro +13 -13
  48. package/components/Table/Head.astro +13 -13
  49. package/components/Table/HeaderCell.astro +13 -13
  50. package/components/Table/Row.astro +13 -13
  51. package/components/Table/Table.astro +18 -18
  52. package/components/Table/index.ts +20 -20
  53. package/components/Tabs/Tabs.astro +28 -28
  54. package/components/Tabs/TabsItem.astro +47 -47
  55. package/components/Tabs/TabsPanel.astro +21 -21
  56. package/components/Tabs/TabsTab.astro +19 -19
  57. package/components/Tabs/index.ts +14 -14
  58. package/components/TextField/TextField.astro +128 -128
  59. package/components/Textarea/Textarea.astro +106 -106
  60. package/components/Toast/Toast.astro +42 -42
  61. package/components/ToggleButton/ToggleButton.astro +53 -53
  62. package/components/ToggleGroup/ToggleGroup.astro +49 -49
  63. package/components/Tooltip/Tooltip.astro +30 -30
  64. package/core/normalize.css +194 -194
  65. package/core/palette.css +59 -59
  66. package/core/utils.css +71 -71
  67. package/css/components/accordion.css +174 -174
  68. package/css/components/anchor.css +27 -27
  69. package/css/components/avatar.css +65 -65
  70. package/css/components/badge.css +107 -107
  71. package/css/components/button-group.css +179 -179
  72. package/css/components/button.css +215 -215
  73. package/css/components/callout.css +109 -109
  74. package/css/components/card.css +117 -117
  75. package/css/components/checkbox.css +205 -205
  76. package/css/components/chip.css +87 -87
  77. package/css/components/description-list.css +80 -80
  78. package/css/components/dialog.css +68 -68
  79. package/css/components/divider.css +20 -20
  80. package/css/components/drawer.css +171 -171
  81. package/css/components/form.css +146 -146
  82. package/css/components/icon-button.css +139 -139
  83. package/css/components/link.css +21 -21
  84. package/css/components/list.css +345 -345
  85. package/css/components/progress.css +102 -97
  86. package/css/components/radio.css +172 -172
  87. package/css/components/range.css +337 -337
  88. package/css/components/select.css +169 -169
  89. package/css/components/spinner.css +37 -37
  90. package/css/components/switch.css +268 -268
  91. package/css/components/table.css +179 -179
  92. package/css/components/tabs.css +83 -83
  93. package/css/components/text-field.css +450 -450
  94. package/css/components/text-input.css +64 -64
  95. package/css/components/textarea.css +24 -24
  96. package/css/components/toast.css +161 -161
  97. package/css/components/toggle-button.css +87 -87
  98. package/css/components/toggle-group.css +56 -56
  99. package/css/components/tooltip.css +67 -67
  100. package/css/components/typography.css +585 -585
  101. package/css/components.css +41 -41
  102. package/css/imports.css +16 -16
  103. package/css/js/checkbox.js +21 -21
  104. package/css/js/toast.js +94 -94
  105. package/css/theme.css +132 -132
  106. package/dist/op.css +65 -65
  107. package/dist/op.css.map +1 -1
  108. package/dist/opui.components.css +5159 -5154
  109. package/dist/opui.components.css.map +1 -1
  110. package/dist/opui.css +5668 -5663
  111. package/dist/opui.css.map +1 -1
  112. package/env.d.ts +14 -14
  113. package/open-props.css +9 -9
  114. package/package.json +81 -81
@@ -1,171 +1,171 @@
1
- @layer components.root {
2
- :where(dialog.ui-drawer) {
3
- --_backdrop-bg-color: transparent;
4
- --_backdrop-blur: blur(2px);
5
- --_bg-color: var(--surface-default);
6
- --_block-size: min(80vb, 650px);
7
- --_border-color: var(--border-color);
8
- --_border-width: var(--border-width);
9
- --_color: var(--text-primary);
10
- --_content-padding: var(--size-4);
11
- --_footer-gap: var(--size-3);
12
- --_footer-padding: var(--size-3);
13
- --_header-font-size: var(--font-size-3);
14
- --_header-padding: var(--size-3);
15
- --_inline-size: min(375px, 100vi);
16
- --_shadow: var(--shadow-2);
17
- --_transition-duration: 0.2s;
18
- --_transition-timing: var(--ease-out-3);
19
-
20
- background-color: var(--_bg-color);
21
- border: none;
22
- box-shadow: var(--_shadow);
23
- color: var(--_color);
24
- display: flex;
25
- flex-direction: column;
26
- margin: 0;
27
- max-inline-size: 100%;
28
- padding: 0;
29
- position: fixed;
30
- transition:
31
- display var(--_transition-duration) allow-discrete,
32
- overlay var(--_transition-duration) allow-discrete,
33
- translate var(--_transition-duration) var(--_transition-timing);
34
- z-index: 1000;
35
-
36
- &::backdrop {
37
- backdrop-filter: var(--_backdrop-blur);
38
- background-color: var(--_backdrop-bg-color);
39
- opacity: 0;
40
- transition:
41
- display var(--_transition-duration) allow-discrete,
42
- overlay var(--_transition-duration) allow-discrete,
43
- opacity var(--_transition-duration) var(--_transition-timing);
44
- }
45
-
46
- &.ui-backdrop-transparent {
47
- --_backdrop-blur: none;
48
- }
49
-
50
- .ui-header {
51
- align-items: center;
52
- border-block-end: var(--_border-width) solid var(--_border-color);
53
- display: flex;
54
- padding: var(--_header-padding);
55
-
56
- :where(h1, h2, h3, h4, h5, h6) {
57
- font-size: var(--_header-font-size);
58
- margin: 0;
59
- }
60
-
61
- :where(.ui-icon-button) {
62
- margin-inline-start: auto;
63
- }
64
- }
65
-
66
- .ui-content {
67
- flex: 1;
68
- overflow-y: auto;
69
- padding: var(--_content-padding);
70
- }
71
-
72
- .ui-footer {
73
- border-block-start: var(--_border-width) solid var(--_border-color);
74
- display: flex;
75
- gap: var(--_footer-gap);
76
- justify-content: end;
77
- padding: var(--_footer-padding);
78
- }
79
-
80
- &.ui-inline-start,
81
- &.ui-inline-end {
82
- block-size: 100dvb;
83
- inline-size: var(--_inline-size);
84
- inset-block: 0;
85
- max-block-size: 100%;
86
- }
87
-
88
- &.ui-inline-start {
89
- border-inline-end: var(--_border-width) solid var(--_border-color);
90
- inset-inline-end: auto;
91
- inset-inline-start: 0;
92
- translate: -100% 0;
93
- }
94
-
95
- &.ui-inline-end {
96
- border-inline-start: var(--_border-width) solid var(--_border-color);
97
- inset-inline-end: 0;
98
- inset-inline-start: auto;
99
- translate: 100% 0;
100
-
101
- .ui-footer {
102
- justify-content: start;
103
- }
104
- }
105
-
106
- &.ui-block-start,
107
- &.ui-block-end {
108
- block-size: var(--_block-size);
109
- inline-size: 100dvi;
110
- inset-inline: 0;
111
- max-block-size: 80dvb;
112
- }
113
-
114
- &.ui-block-start {
115
- border-block-end: var(--_border-width) solid var(--_border-color);
116
- inset-block-end: auto;
117
- inset-block-start: 0;
118
- translate: 0 -100%;
119
- }
120
-
121
- &.ui-block-end {
122
- border-block-start: var(--_border-width) solid var(--_border-color);
123
- inset-block-end: 0;
124
- inset-block-start: auto;
125
- translate: 0 100%;
126
- }
127
-
128
- &[open] {
129
- translate: 0 0;
130
-
131
- &::backdrop {
132
- opacity: 1;
133
- }
134
-
135
- @starting-style {
136
- &::backdrop {
137
- opacity: 0;
138
- }
139
-
140
- &.ui-inline-start {
141
- translate: -100% 0;
142
- }
143
-
144
- &.ui-inline-end {
145
- translate: 100% 0;
146
- }
147
-
148
- &.ui-block-start {
149
- translate: 0 -100%;
150
- }
151
-
152
- &.ui-block-end {
153
- translate: 0 100%;
154
- }
155
- }
156
- }
157
- }
158
-
159
- /* Scroll-lock is provided by the shared `.ui-scroll-lock` utility in core/utils.css.
160
- This carve-out re-enables page scrolling when a transparent-backdrop drawer is
161
- open on wide viewports (where the drawer doesn't visually cover the page). */
162
- html:has(dialog.ui-drawer.ui-scroll-lock[open].ui-backdrop-transparent) {
163
- overflow: unset;
164
- overscroll-behavior: auto;
165
-
166
- @media (width < 500px) {
167
- overflow: clip;
168
- overscroll-behavior: contain;
169
- }
170
- }
171
- }
1
+ @layer components.root {
2
+ :where(dialog.ui-drawer) {
3
+ --_backdrop-bg-color: transparent;
4
+ --_backdrop-blur: blur(2px);
5
+ --_bg-color: var(--surface-default);
6
+ --_block-size: min(80vb, 650px);
7
+ --_border-color: var(--border-color);
8
+ --_border-width: var(--border-width);
9
+ --_color: var(--text-primary);
10
+ --_content-padding: var(--size-4);
11
+ --_footer-gap: var(--size-3);
12
+ --_footer-padding: var(--size-3);
13
+ --_header-font-size: var(--font-size-3);
14
+ --_header-padding: var(--size-3);
15
+ --_inline-size: min(375px, 100vi);
16
+ --_shadow: var(--shadow-2);
17
+ --_transition-duration: 0.2s;
18
+ --_transition-timing: var(--ease-out-3);
19
+
20
+ background-color: var(--_bg-color);
21
+ border: none;
22
+ box-shadow: var(--_shadow);
23
+ color: var(--_color);
24
+ display: flex;
25
+ flex-direction: column;
26
+ margin: 0;
27
+ max-inline-size: 100%;
28
+ padding: 0;
29
+ position: fixed;
30
+ transition:
31
+ display var(--_transition-duration) allow-discrete,
32
+ overlay var(--_transition-duration) allow-discrete,
33
+ translate var(--_transition-duration) var(--_transition-timing);
34
+ z-index: 1000;
35
+
36
+ &::backdrop {
37
+ backdrop-filter: var(--_backdrop-blur);
38
+ background-color: var(--_backdrop-bg-color);
39
+ opacity: 0;
40
+ transition:
41
+ display var(--_transition-duration) allow-discrete,
42
+ overlay var(--_transition-duration) allow-discrete,
43
+ opacity var(--_transition-duration) var(--_transition-timing);
44
+ }
45
+
46
+ &.ui-backdrop-transparent {
47
+ --_backdrop-blur: none;
48
+ }
49
+
50
+ .ui-header {
51
+ align-items: center;
52
+ border-block-end: var(--_border-width) solid var(--_border-color);
53
+ display: flex;
54
+ padding: var(--_header-padding);
55
+
56
+ :where(h1, h2, h3, h4, h5, h6) {
57
+ font-size: var(--_header-font-size);
58
+ margin: 0;
59
+ }
60
+
61
+ :where(.ui-icon-button) {
62
+ margin-inline-start: auto;
63
+ }
64
+ }
65
+
66
+ .ui-content {
67
+ flex: 1;
68
+ overflow-y: auto;
69
+ padding: var(--_content-padding);
70
+ }
71
+
72
+ .ui-footer {
73
+ border-block-start: var(--_border-width) solid var(--_border-color);
74
+ display: flex;
75
+ gap: var(--_footer-gap);
76
+ justify-content: end;
77
+ padding: var(--_footer-padding);
78
+ }
79
+
80
+ &.ui-inline-start,
81
+ &.ui-inline-end {
82
+ block-size: 100dvb;
83
+ inline-size: var(--_inline-size);
84
+ inset-block: 0;
85
+ max-block-size: 100%;
86
+ }
87
+
88
+ &.ui-inline-start {
89
+ border-inline-end: var(--_border-width) solid var(--_border-color);
90
+ inset-inline-end: auto;
91
+ inset-inline-start: 0;
92
+ translate: -100% 0;
93
+ }
94
+
95
+ &.ui-inline-end {
96
+ border-inline-start: var(--_border-width) solid var(--_border-color);
97
+ inset-inline-end: 0;
98
+ inset-inline-start: auto;
99
+ translate: 100% 0;
100
+
101
+ .ui-footer {
102
+ justify-content: start;
103
+ }
104
+ }
105
+
106
+ &.ui-block-start,
107
+ &.ui-block-end {
108
+ block-size: var(--_block-size);
109
+ inline-size: 100dvi;
110
+ inset-inline: 0;
111
+ max-block-size: 80dvb;
112
+ }
113
+
114
+ &.ui-block-start {
115
+ border-block-end: var(--_border-width) solid var(--_border-color);
116
+ inset-block-end: auto;
117
+ inset-block-start: 0;
118
+ translate: 0 -100%;
119
+ }
120
+
121
+ &.ui-block-end {
122
+ border-block-start: var(--_border-width) solid var(--_border-color);
123
+ inset-block-end: 0;
124
+ inset-block-start: auto;
125
+ translate: 0 100%;
126
+ }
127
+
128
+ &[open] {
129
+ translate: 0 0;
130
+
131
+ &::backdrop {
132
+ opacity: 1;
133
+ }
134
+
135
+ @starting-style {
136
+ &::backdrop {
137
+ opacity: 0;
138
+ }
139
+
140
+ &.ui-inline-start {
141
+ translate: -100% 0;
142
+ }
143
+
144
+ &.ui-inline-end {
145
+ translate: 100% 0;
146
+ }
147
+
148
+ &.ui-block-start {
149
+ translate: 0 -100%;
150
+ }
151
+
152
+ &.ui-block-end {
153
+ translate: 0 100%;
154
+ }
155
+ }
156
+ }
157
+ }
158
+
159
+ /* Scroll-lock is provided by the shared `.ui-scroll-lock` utility in core/utils.css.
160
+ This carve-out re-enables page scrolling when a transparent-backdrop drawer is
161
+ open on wide viewports (where the drawer doesn't visually cover the page). */
162
+ html:has(dialog.ui-drawer.ui-scroll-lock[open].ui-backdrop-transparent) {
163
+ overflow: unset;
164
+ overscroll-behavior: auto;
165
+
166
+ @media (width < 500px) {
167
+ overflow: clip;
168
+ overscroll-behavior: contain;
169
+ }
170
+ }
171
+ }
@@ -1,146 +1,146 @@
1
- @layer components.extended {
2
-
3
- /* Form */
4
- :where(.ui-form) {
5
- display: grid;
6
- gap: var(--size-8);
7
-
8
- hr {
9
- margin-block: 0;
10
- }
11
- }
12
-
13
- /* Fieldset */
14
- :where(.ui-fieldset) {
15
- all: unset;
16
- border: 0;
17
- border-radius: 0;
18
- display: grid;
19
- gap: var(--size-1);
20
- margin: 0;
21
- min-inline-size: 0;
22
- padding: 0;
23
-
24
- /* Legend */
25
- :where(legend, .ui-legend) {
26
- all: unset;
27
- color: var(--text-primary);
28
- font-weight: 600;
29
- margin-block-end: var(--size-3);
30
- padding: 0;
31
-
32
- &:has(+ :where(.ui-field-description)) {
33
- margin-block-end: 0;
34
- }
35
- }
36
-
37
- /* Field description / supporting text */
38
- :where(.ui-field-description) {
39
- color: var(--text-muted);
40
- font-size: var(--font-size-05);
41
- line-height: var(--font-lineheight-3);
42
-
43
- &:has(+ *) {
44
- margin-block-end: var(--size-3);
45
- }
46
- }
47
-
48
- /* End text */
49
- :where(.ui-end-text) {
50
- color: var(--text-muted);
51
- font-size: var(--font-size-0);
52
- line-height: var(--font-lineheight-3);
53
- }
54
-
55
- &:has(.ui-text-field.ui-row) {
56
- row-gap: var(--size-7);
57
- }
58
-
59
- /* Disabled */
60
- &[disabled] {
61
- opacity: 0.64;
62
- user-select: none;
63
-
64
- input,
65
- label,
66
- .ui-label {
67
- cursor: not-allowed;
68
- }
69
- }
70
-
71
- /* Error / validation */
72
- &[data-invalid] {
73
- :where(.ui-end-text) {
74
- color: var(--primary);
75
- }
76
-
77
- :where(.ui-checkbox, .ui-radio, .ui-switch) {
78
- --palette-source: oklch(0.58 0.21 var(--hue-red));
79
-
80
- :where(.ui-end-text) {
81
- color: var(--primary);
82
- }
83
- }
84
-
85
- :where(.ui-switch) {
86
- input {
87
- border-radius: var(--radius-round);
88
- outline: 2px solid var(--primary);
89
- }
90
- }
91
- }
92
-
93
- /* Required */
94
- &:has(:invalid) {
95
- :where(legend, .ui-legend) {
96
- padding-inline-end: 1ex;
97
- position: relative;
98
-
99
- &::after {
100
- color: var(--red);
101
- content: "*";
102
- inset: 0 -0.25ex auto auto;
103
- position: absolute;
104
- }
105
- }
106
- }
107
- }
108
-
109
- /* Field group */
110
- :where(.ui-field-group) {
111
- display: flex;
112
- flex-direction: column;
113
- gap: var(--size-4);
114
-
115
- /* If it only has checkboxes, radios, or switches */
116
- &:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)):not(:has(> :not(.ui-checkbox, .ui-radio, .ui-switch))) {
117
- gap: var(--size-2);
118
- }
119
-
120
- /* If it only has buttons */
121
- &:has(.ui-button):not(:has(*:not(.ui-button))) {
122
- align-items: center;
123
- flex-direction: row;
124
- gap: var(--size-2);
125
-
126
- /* If it's not preceeded by an hr */
127
- &:not(hr + &) {
128
- margin-block-start: var(--size-4);
129
- }
130
- }
131
-
132
- &+& {
133
- margin-block-start: var(--size-5);
134
- }
135
-
136
- /* Directions */
137
- &.ui-row {
138
- flex-direction: row;
139
- flex-wrap: wrap;
140
-
141
- &:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)) {
142
- gap: var(--size-4);
143
- }
144
- }
145
- }
146
- }
1
+ @layer components.extended {
2
+
3
+ /* Form */
4
+ :where(.ui-form) {
5
+ display: grid;
6
+ gap: var(--size-8);
7
+
8
+ hr {
9
+ margin-block: 0;
10
+ }
11
+ }
12
+
13
+ /* Fieldset */
14
+ :where(.ui-fieldset) {
15
+ all: unset;
16
+ border: 0;
17
+ border-radius: 0;
18
+ display: grid;
19
+ gap: var(--size-1);
20
+ margin: 0;
21
+ min-inline-size: 0;
22
+ padding: 0;
23
+
24
+ /* Legend */
25
+ :where(legend, .ui-legend) {
26
+ all: unset;
27
+ color: var(--text-primary);
28
+ font-weight: 600;
29
+ margin-block-end: var(--size-3);
30
+ padding: 0;
31
+
32
+ &:has(+ :where(.ui-field-description)) {
33
+ margin-block-end: 0;
34
+ }
35
+ }
36
+
37
+ /* Field description / supporting text */
38
+ :where(.ui-field-description) {
39
+ color: var(--text-muted);
40
+ font-size: var(--font-size-05);
41
+ line-height: var(--font-lineheight-3);
42
+
43
+ &:has(+ *) {
44
+ margin-block-end: var(--size-3);
45
+ }
46
+ }
47
+
48
+ /* End text */
49
+ :where(.ui-end-text) {
50
+ color: var(--text-muted);
51
+ font-size: var(--font-size-0);
52
+ line-height: var(--font-lineheight-3);
53
+ }
54
+
55
+ &:has(.ui-text-field.ui-row) {
56
+ row-gap: var(--size-7);
57
+ }
58
+
59
+ /* Disabled */
60
+ &[disabled] {
61
+ opacity: 0.64;
62
+ user-select: none;
63
+
64
+ input,
65
+ label,
66
+ .ui-label {
67
+ cursor: not-allowed;
68
+ }
69
+ }
70
+
71
+ /* Error / validation */
72
+ &[data-invalid] {
73
+ :where(.ui-end-text) {
74
+ color: var(--primary);
75
+ }
76
+
77
+ :where(.ui-checkbox, .ui-radio, .ui-switch) {
78
+ --palette-source: oklch(0.58 0.21 var(--hue-red));
79
+
80
+ :where(.ui-end-text) {
81
+ color: var(--primary);
82
+ }
83
+ }
84
+
85
+ :where(.ui-switch) {
86
+ input {
87
+ border-radius: var(--radius-round);
88
+ outline: 2px solid var(--primary);
89
+ }
90
+ }
91
+ }
92
+
93
+ /* Required */
94
+ &:has(:invalid) {
95
+ :where(legend, .ui-legend) {
96
+ padding-inline-end: 1ex;
97
+ position: relative;
98
+
99
+ &::after {
100
+ color: var(--red);
101
+ content: "*";
102
+ inset: 0 -0.25ex auto auto;
103
+ position: absolute;
104
+ }
105
+ }
106
+ }
107
+ }
108
+
109
+ /* Field group */
110
+ :where(.ui-field-group) {
111
+ display: flex;
112
+ flex-direction: column;
113
+ gap: var(--size-4);
114
+
115
+ /* If it only has checkboxes, radios, or switches */
116
+ &:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)):not(:has(> :not(.ui-checkbox, .ui-radio, .ui-switch))) {
117
+ gap: var(--size-2);
118
+ }
119
+
120
+ /* If it only has buttons */
121
+ &:has(.ui-button):not(:has(*:not(.ui-button))) {
122
+ align-items: center;
123
+ flex-direction: row;
124
+ gap: var(--size-2);
125
+
126
+ /* If it's not preceeded by an hr */
127
+ &:not(hr + &) {
128
+ margin-block-start: var(--size-4);
129
+ }
130
+ }
131
+
132
+ &+& {
133
+ margin-block-start: var(--size-5);
134
+ }
135
+
136
+ /* Directions */
137
+ &.ui-row {
138
+ flex-direction: row;
139
+ flex-wrap: wrap;
140
+
141
+ &:has(> :where(.ui-checkbox, .ui-radio, .ui-switch)) {
142
+ gap: var(--size-4);
143
+ }
144
+ }
145
+ }
146
+ }