File tree Expand file tree Collapse file tree 1 file changed +43
-9
lines changed
packages/next/src/views/API/RenderJSON Expand file tree Collapse file tree 1 file changed +43
-9
lines changed Original file line number Diff line number Diff line change 1
1
@import ' ~@payloadcms/ui/scss' ;
2
2
3
- $tab-width : 16 px ;
3
+ $tab-width : 24 px ;
4
4
5
5
@layer payload-default {
6
6
.query-inspector {
7
+ --tab-width : 24px ;
8
+
7
9
& __json-children {
8
10
position : relative ;
9
11
10
12
& --nested {
11
13
& li {
12
- padding-left : $tab-width ;
14
+ padding-left : 8 px ;
13
15
}
14
16
}
15
17
@@ -23,6 +25,14 @@ $tab-width: 16px;
23
25
}
24
26
}
25
27
28
+ & __row-line {
29
+ & --nested {
30
+ .query-inspector__json-children {
31
+ padding-left : var (--tab-width );
32
+ }
33
+ }
34
+ }
35
+
26
36
& __list-wrap {
27
37
position : relative ;
28
38
}
@@ -37,10 +47,16 @@ $tab-width: 16px;
37
47
border-bottom-right-radius : 0 ;
38
48
position : relative ;
39
49
display : flex ;
40
- gap : 10px ;
50
+ column-gap : 14px ;
51
+ row-gap : 10px ;
41
52
align-items : center ;
42
- left : -3 px ;
53
+ left : 0 ;
43
54
width : calc (100% + 3px );
55
+ background-color : var (--theme-elevation-50 );
56
+
57
+ & :not (.query-inspector__list-toggle--empty ) {
58
+ margin-left : calc (var (--tab-width ) * -1 - 10px );
59
+ }
44
60
45
61
svg .stroke {
46
62
stroke : var (--theme-elevation-400 );
@@ -82,14 +98,32 @@ $tab-width: 16px;
82
98
& __bracket {
83
99
position : relative ;
84
100
85
- & --nested {
86
- margin-left : $tab-width ;
87
- }
88
-
89
101
& --position-end {
90
- left : 1 px ;
102
+ left : 2 px ;
91
103
width : calc (100% - 5px );
92
104
}
93
105
}
106
+
107
+ // Some specific rules targetting the very top of the nested JSON structure or very first items since they need slightly different styling
108
+ & __results {
109
+ & > .query-inspector__row-line--nested {
110
+ & > .query-inspector__list-toggle {
111
+ margin-left : 0 ;
112
+ column-gap : 6px ;
113
+
114
+ .query-inspector__toggle-row-icon {
115
+ margin-left : -4px ;
116
+ }
117
+ }
118
+
119
+ & > .query-inspector__json-children {
120
+ padding-left : calc (var (--base ) * 1 );
121
+ }
122
+
123
+ & > .query-inspector__bracket--nested > .query-inspector__bracket--position-end {
124
+ padding-left : 16px ;
125
+ }
126
+ }
127
+ }
94
128
}
95
129
}
You can’t perform that action at this time.
0 commit comments