|
40 | 40 | } |
41 | 41 |
|
42 | 42 | .nested-sections-table-row { |
43 | | - display: table; |
| 43 | + display: table-row; |
44 | 44 | min-width: 100%; |
| 45 | + border-collapse: collapse; |
45 | 46 |
|
46 | | - --cell-inline-padding-start: calc(var(--base) * 0.6); |
47 | | - --cell-inline-padding-end: calc(var(--base) * 0.6); |
48 | | - |
49 | | - &__header { |
50 | | - display: table-header-group; |
51 | | - } |
52 | | - |
53 | | - &__header-cell { |
54 | | - display: table-cell; |
55 | | - color: var(--theme-elevation-400); |
56 | | - vertical-align: top; |
57 | | - padding-block: calc(var(--base) * 0.6); |
58 | | - padding-inline-start: var(--cell-inline-padding-start); |
59 | | - padding-inline-end: var(--cell-inline-padding-end); |
60 | | - position: relative; |
61 | | - z-index: 1; |
62 | | - |
63 | | - [dir='rtl'] & { |
64 | | - text-align: right; |
65 | | - } |
66 | | - &:first-child { |
67 | | - --cell-inline-padding-start: calc(var(--base) * (0.8)); |
68 | | - } |
69 | | - &:last-child { |
70 | | - --cell-inline-padding-end: calc(var(--base) * (0.8)); |
71 | | - } |
| 47 | + &__drag-handler { |
| 48 | + cursor: grab; |
72 | 49 | } |
73 | 50 |
|
74 | | - &__row, |
75 | | - &__placeholder-row { |
76 | | - display: table-row; |
77 | | - } |
78 | | - |
79 | | - &__row-actions { |
| 51 | + &__actions { |
80 | 52 | display: flex; |
81 | 53 | align-items: center; |
82 | 54 | gap: calc(var(--base) * 0.4); |
|
162 | 134 | &__section--selected + &__section--selected-descendant &__cell, |
163 | 135 | &__section--selected-descendant + &__section--selected &__cell, |
164 | 136 | &__section--selected-descendant + &__section--selected-descendant &__cell { |
165 | | - border-top: none; |
| 137 | + border-top-color: transparent; |
166 | 138 |
|
167 | 139 | &:first-child { |
168 | 140 | border-top-left-radius: 0; |
|
172 | 144 | } |
173 | 145 | } |
174 | 146 |
|
175 | | - // Selected section followed by another selected section - remove bottom radius and add inner border |
| 147 | + // Selected section followed by another selected section - remove bottom radius |
176 | 148 | &__section--selected:has(+ &__section--selected) { |
177 | 149 | .nested-sections-table-row__cell { |
178 | | - &::after { |
179 | | - content: ''; |
180 | | - position: absolute; |
181 | | - bottom: -1px; |
182 | | - left: 0; |
183 | | - height: 1px; |
184 | | - right: 0; |
185 | | - background-color: var(--cell-inner-border-color); |
186 | | - z-index: 1; |
187 | | - } |
188 | | - |
189 | 150 | &:first-child { |
190 | 151 | border-bottom-left-radius: 0; |
191 | 152 | } |
|
199 | 160 | &__section--selected-descendant:has(+ &__section--selected), |
200 | 161 | &__section--selected-descendant:has(+ &__section--selected-descendant) { |
201 | 162 | .nested-sections-table-row__cell { |
202 | | - &::after { |
203 | | - content: ''; |
204 | | - position: absolute; |
205 | | - bottom: -1px; |
206 | | - left: 0; |
207 | | - height: 1px; |
208 | | - right: 0; |
209 | | - background-color: var(--cell-inner-border-color); |
210 | | - z-index: 1; |
211 | | - } |
212 | | - |
213 | 163 | &:first-child { |
214 | 164 | border-bottom-left-radius: 0; |
215 | 165 | } |
|
224 | 174 | display: table-row-group; |
225 | 175 | outline: 1px solid transparent; |
226 | 176 | --cell-bg-color: var(--theme-elevation-50); |
227 | | - --cell-border-color: var(--theme-elevation-50); |
| 177 | + --cell-border-color: transparent; |
228 | 178 | } |
229 | 179 |
|
230 | 180 | &__section--odd { |
231 | 181 | --cell-bg-color: var(--theme-elevation-0); |
232 | | - --cell-border-color: var(--theme-elevation-0); |
| 182 | + --cell-border-color: transparent; |
233 | 183 | } |
234 | 184 |
|
235 | 185 | &__section--target { |
|
247 | 197 | } |
248 | 198 |
|
249 | 199 | &__section--selected { |
250 | | - --cell-bg-color: var(--theme-success-50); |
251 | | - --cell-border-color: var(--theme-success-500); |
252 | | - --cell-inner-border-color: var(--theme-success-200); |
| 200 | + --cell-bg-color: var(--theme-success-100); |
| 201 | + --cell-border-color: var(--theme-success-200); |
253 | 202 | } |
254 | 203 |
|
255 | 204 | &__section--selected-descendant { |
256 | 205 | --cell-bg-color: color-mix(in srgb, var(--theme-success-50) 40%, transparent); |
257 | | - --cell-border-color: var(--theme-success-500); |
258 | | - --cell-inner-border-color: var(--theme-success-200); |
| 206 | + --cell-border-color: var(--theme-success-200); |
259 | 207 | } |
260 | 208 |
|
261 | 209 | &__section--selected-descendant.nested-sections-table-row__section--odd { |
262 | 210 | --cell-bg-color: color-mix(in srgb, var(--theme-success-50) 40%, transparent); |
263 | 211 | } |
264 | 212 |
|
| 213 | + &__section--focused { |
| 214 | + // --cell-border-color: var(--theme-elevation-400); |
| 215 | + --cell-bg-color: var(--theme-elevation-200); |
| 216 | + } |
| 217 | + |
| 218 | + &__section--focused.nested-sections-table-row__section--odd { |
| 219 | + --cell-bg-color: var(--theme-elevation-200); |
| 220 | + } |
| 221 | + |
265 | 222 | &__section--selected.nested-sections-table-row__section--dragging { |
266 | 223 | opacity: 0.4; |
267 | 224 | } |
|
0 commit comments