|
1 | | -/* |
2 | | - * This is a sample StyleSheet file used by EnhancedRelation |
3 | | - * |
4 | | - * You can delete this file if you want |
5 | | - */ |
6 | | -.field-checkboxlist .checkboxlist-controls > div:nth-child(even) { |
| 1 | +div[data-control="relation"] .field-checkboxlist .checkboxlist-controls>div:nth-child(even) { |
7 | 2 | margin-left: auto; |
8 | 3 | margin-right: 0; |
9 | 4 | } |
10 | 5 |
|
11 | | -.checkboxlist-item { |
12 | | - --background-padding : 10px; |
13 | | - |
| 6 | +div[data-control="relation"] .checkboxlist-item { |
| 7 | + --background-padding: 10px; |
14 | 8 | display: flex; |
15 | 9 | flex-direction: row; |
16 | 10 | align-items: center; |
17 | 11 | justify-content: start; |
18 | 12 | flex-wrap: wrap; |
19 | 13 | margin-bottom: 10px; |
20 | 14 | margin-top: 15px; |
| 15 | +} |
21 | 16 |
|
22 | | - & ~ & { |
23 | | - margin-top: 0; |
24 | | - } |
25 | | - |
26 | | - a i { |
27 | | - display: block; |
28 | | - transition: transform 0.25s ease-in-out; |
29 | | - } |
30 | | - |
31 | | - &:has(.checkboxlist-item).open { |
32 | | - background: linear-gradient(90deg, rgba(0, 0, 0, 0) calc(var(--background-padding) - 1px), rgba(0, 0, 0, 0.25) var(--background-padding), rgba(0, 0, 0, 0) calc(var(--background-padding) + 1px)); |
33 | | - |
34 | | - > a i { |
35 | | - transform: rotate(90deg); |
36 | | - } |
37 | | - } |
38 | | - |
39 | | - & & { |
40 | | - --background-padding: 20px; |
| 17 | +div[data-control="relation"] .checkboxlist-item .checkboxlist-item-toggle .icon-chevron-right { |
| 18 | + display: block; |
| 19 | + transition: transform 0.15s ease-in-out; |
| 20 | +} |
41 | 21 |
|
42 | | - margin-left: 10px; |
43 | | - padding-left: 10px; |
44 | | - } |
| 22 | +div[data-control="relation"] .checkboxlist-item:has(.checkboxlist-item).open { |
| 23 | + background: linear-gradient(90deg, rgba(0, 0, 0, 0) calc(var(--background-padding) - 1px), rgba(0, 0, 0, 0.25) var(--background-padding), rgba(0, 0, 0, 0) calc(var(--background-padding) + 1px)); |
| 24 | +} |
45 | 25 |
|
| 26 | +div[data-control="relation"] .checkboxlist-item:has(.checkboxlist-item).open>.checkboxlist-item-toggle .icon-chevron-right { |
| 27 | + transform: rotate(90deg); |
| 28 | +} |
46 | 29 |
|
47 | | - & .custom-checkbox { |
48 | | - flex-grow: 1; |
49 | | - margin-top: 0; |
50 | | - margin-bottom: 0; |
51 | | - } |
| 30 | +div[data-control="relation"] .checkboxlist-item .custom-checkbox { |
| 31 | + flex-grow: 1; |
| 32 | + margin-top: 0; |
| 33 | + margin-bottom: 0; |
52 | 34 | } |
53 | 35 |
|
54 | | -.checkboxlist-item-expand-collapse { |
| 36 | +div[data-control="relation"] .checkboxlist-item-toggle { |
55 | 37 | margin: 0 calc(1rem + 15px) 0 1rem; |
56 | 38 | } |
57 | 39 |
|
58 | | -.checkboxlist-children { |
| 40 | +div[data-control="relation"] .checkboxlist-item-toggle .icon-chevron-right { |
| 41 | + pointer-events: none; |
| 42 | +} |
| 43 | + |
| 44 | +div[data-control="relation"] .checkboxlist-children { |
59 | 45 | width: 100%; |
60 | 46 | display: grid; |
61 | 47 | grid-template-rows: 0fr; |
62 | | - transition: grid-template-rows 0.5s ease-in-out; |
| 48 | + transition: grid-template-rows 0.2s ease-in-out; |
| 49 | +} |
| 50 | + |
| 51 | +div[data-control="relation"] .checkboxlist-children.open { |
| 52 | + grid-template-rows: 1fr; |
| 53 | +} |
| 54 | + |
| 55 | +div[data-control="relation"] .checkboxlist-children>div { |
| 56 | + overflow: hidden; |
| 57 | +} |
| 58 | + |
| 59 | +div[data-control="relation"] .checkboxlist-item .checkboxlist-item { |
| 60 | + --background-padding: 20px; |
| 61 | + margin-left: 10px; |
| 62 | + padding-left: 10px; |
| 63 | +} |
63 | 64 |
|
64 | | - &.open { |
65 | | - grid-template-rows: 1fr; |
66 | | - } |
67 | | - & > div { |
68 | | - overflow: hidden; |
69 | | - } |
| 65 | +div[data-control="relation"] .checkboxlist-item~.checkboxlist-item { |
| 66 | + margin-top: 0; |
70 | 67 | } |
0 commit comments