Skip to content

Commit 0c1df16

Browse files
committed
Updated schema editor styling
1 parent 9a8ff05 commit 0c1df16

File tree

2 files changed

+44
-26
lines changed

2 files changed

+44
-26
lines changed

Source/Extension/Schema/Open.ts

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,15 @@ export async function openSchema ( context : ExtensionContext , filePath : strin
113113

114114
function option ({ title , description , link , content , id }){
115115
return [
116+
'<div>' ,
116117
`<label for = '${ id }'>` ,
117118
`<a href = '${ link }'>${ title }</a>` ,
118119
'<br>' ,
119120
`<small>${ description }</small>` ,
120121
`</label>` ,
121122
'<br>' ,
122-
content
123+
content ,
124+
'</div>'
123125
].join('')
124126
}
125127

@@ -159,12 +161,13 @@ export async function openSchema ( context : ExtensionContext , filePath : strin
159161
<link rel = stylesheet type = 'text/css' href = '${ asset('Style.css') }'>
160162
</head>
161163
<body>
162-
<div id = Settings >
163164
164-
<h1> Schema Editor </h1>
165+
<h1> Schema Editor </h1>
165166
166167
<br>
167168
169+
<div id = Settings >
170+
168171
${
169172
text({
170173
description : 'seen in the customizer.' ,
@@ -174,9 +177,6 @@ export async function openSchema ( context : ExtensionContext , filePath : strin
174177
})
175178
}
176179
177-
<br>
178-
<br>
179-
180180
${
181181
option({
182182
description : 'used for the section body.' ,
@@ -196,9 +196,6 @@ export async function openSchema ( context : ExtensionContext , filePath : strin
196196
})
197197
}
198198
199-
<br>
200-
<br>
201-
202199
${
203200
text({
204201
description : 'the section body gets assigned.' ,
@@ -208,9 +205,6 @@ export async function openSchema ( context : ExtensionContext , filePath : strin
208205
})
209206
}
210207
211-
<br>
212-
<br>
213-
214208
${
215209
option({
216210
description : 'of how many times a template can use it.' ,
@@ -228,9 +222,6 @@ export async function openSchema ( context : ExtensionContext , filePath : strin
228222
})
229223
}
230224
231-
<br>
232-
<br>
233-
234225
${
235226
text({
236227
description : 'that can be added to this section.' ,
@@ -239,9 +230,8 @@ export async function openSchema ( context : ExtensionContext , filePath : strin
239230
id : 'max_blocks'
240231
})
241232
}
242-
243-
<br>
244-
<br>
233+
</div>
234+
<div id = settingsblock>
245235
246236
${
247237
option({
@@ -259,10 +249,9 @@ export async function openSchema ( context : ExtensionContext , filePath : strin
259249
})
260250
}
261251
262-
<br>
263-
<br>
264-
265252
</div>
253+
<br>
254+
<br>
266255
</body>
267256
</html>
268257
`

Source/Schema/Style.css

Lines changed: 34 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,22 @@
22

33
#Settings {
44

5-
min-width : 420px ;
6-
width : fit-content ;
5+
margin-bottom : 5rem ;
6+
margin-top : 2rem ;
77

88
padding : 1rem ;
9+
gap : 4rem ;
10+
11+
grid-template-columns : repeat( auto-fit , 22rem ) ;
12+
justify-content : center ;
13+
display : grid ;
14+
}
15+
16+
#Settings > div {
917

1018
flex-direction : column ;
19+
align-items : stretch ;
1120
display : flex ;
12-
gap : 0.5rem ;
1321
}
1422

1523
:is( input , select ) {
@@ -29,6 +37,7 @@
2937

3038
label {
3139
user-select : none ;
40+
text-align : center ;
3241
}
3342

3443
:is( a , input[ type = 'checkbox' ]):focus {
@@ -41,19 +50,36 @@ label > a {
4150
font-weight : bold ;
4251
}
4352

53+
h1 {
54+
text-align : center ;
55+
}
56+
4457
h2 {
4558
margin-top : 0 ;
4659
}
4760

4861

49-
#settings {
62+
#settingsblock > div {
5063

5164
flex-direction : column ;
52-
align-items : stretch ;
65+
align-items : center ;
5366
display : flex ;
67+
}
68+
69+
#settings {
70+
71+
width : 100% ;
72+
73+
grid-template-columns : repeat(auto-fit,26rem) ;
74+
justify-content : center ;
75+
display : grid ;
5476
gap : 1.5rem ;
5577
}
5678

79+
#settings * {
80+
text-align : left ;
81+
}
82+
5783
#settings > div {
5884

5985
border-radius : 0.4rem ;
@@ -96,11 +122,14 @@ h2 {
96122

97123
#settings_addition {
98124

125+
max-width : 30rem ;
126+
99127
grid-template-columns : repeat( auto-fit , 2rem ) ;
100128
justify-content : center ;
101129
display : grid ;
102130
gap : 0.3rem ;
103131

132+
margin-bottom : 2rem ;
104133
padding : 0.5rem ;
105134
}
106135

0 commit comments

Comments
 (0)