Skip to content

Commit 790fcc6

Browse files
Align summary element marker
1 parent 06fe541 commit 790fcc6

File tree

10 files changed

+34
-57
lines changed

10 files changed

+34
-57
lines changed

src/lib/output/themes/default/partials/index.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ export function index(context: DefaultThemeRenderContext, props: ContainerReflec
5656
<section class="tsd-panel tsd-index-panel">
5757
<details class="tsd-index-content tsd-accordion" open={true}>
5858
<summary class="tsd-accordion-summary tsd-index-summary">
59-
<h5 class="tsd-index-heading uppercase" role="button" aria-expanded="false" tabIndex={0}>
60-
{context.icons.chevronSmall()} {i18n.theme_index()}
59+
{context.icons.chevronSmall()}
60+
<h5 class="tsd-index-heading uppercase">
61+
{i18n.theme_index()}
6162
</h5>
6263
</summary>
6364
<div class="tsd-accordion-details">{content}</div>

src/lib/output/themes/default/partials/members.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@ export function members(context: DefaultThemeRenderContext, props: ContainerRefl
1414
return (
1515
<details class="tsd-panel-group tsd-member-group tsd-accordion" open>
1616
<summary class="tsd-accordion-summary" data-key={"section-" + title}>
17+
{context.icons.chevronDown()}
1718
<h2>
18-
{context.icons.chevronDown()} {title}
19+
{title}
1920
</h2>
2021
</summary>
2122
<section>{children.map((item) => context.member(item))}</section>

src/lib/output/themes/default/partials/moduleReflection.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ export function moduleReflection(context: DefaultThemeRenderContext, mod: Declar
3535
return (
3636
<details class="tsd-panel-group tsd-member-group tsd-accordion" open>
3737
<summary class="tsd-accordion-summary" data-key={"section-" + title}>
38+
{context.icons.chevronDown()}
3839
<h2>
39-
{context.icons.chevronDown()} {title}
40+
{title}
4041
</h2>
4142
</summary>
4243
{description && (

src/lib/output/themes/default/partials/navigation.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ export function settings(context: DefaultThemeRenderContext) {
9191
<div class="tsd-navigation settings">
9292
<details class="tsd-accordion" open={false}>
9393
<summary class="tsd-accordion-summary">
94+
{context.icons.chevronDown()}
9495
<h3>
95-
{context.icons.chevronDown()}
9696
{i18n.theme_settings()}
9797
</h3>
9898
</summary>
@@ -221,8 +221,8 @@ export function pageNavigation(context: DefaultThemeRenderContext, props: PageEv
221221
return (
222222
<details open={true} class="tsd-accordion tsd-page-navigation">
223223
<summary class="tsd-accordion-summary">
224+
{context.icons.chevronDown()}
224225
<h3>
225-
{context.icons.chevronDown()}
226226
{i18n.theme_on_this_page()}
227227
</h3>
228228
</summary>

src/test/renderer/specs/classes/GenericClass.json

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,7 @@
8383
"children": [
8484
{
8585
"summary.tsd-accordion-summary.tsd-index-summary": {
86-
"tag": "h5.tsd-index-heading.uppercase",
87-
"props": {
88-
"role": "button",
89-
"aria-expanded": "false",
90-
"tabIndex": "0"
91-
},
92-
"children": " Index"
86+
"h5.tsd-index-heading.uppercase": "Index"
9387
}
9488
},
9589
{
@@ -160,7 +154,7 @@
160154
"data-key": "section-Constructors"
161155
},
162156
"children": {
163-
"h2": " Constructors"
157+
"h2": "Constructors"
164158
}
165159
},
166160
{
@@ -356,7 +350,7 @@
356350
"data-key": "section-Methods"
357351
},
358352
"children": {
359-
"h2": " Methods"
353+
"h2": "Methods"
360354
}
361355
},
362356
{

src/test/renderer/specs/classes/RenderClass.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,7 @@
8585
"children": [
8686
{
8787
"summary.tsd-accordion-summary.tsd-index-summary": {
88-
"tag": "h5.tsd-index-heading.uppercase",
89-
"props": {
90-
"role": "button",
91-
"aria-expanded": "false",
92-
"tabIndex": "0"
93-
},
94-
"children": " Index"
88+
"h5.tsd-index-heading.uppercase": "Index"
9589
}
9690
},
9791
{
@@ -187,7 +181,7 @@
187181
"data-key": "section-Constructors"
188182
},
189183
"children": {
190-
"h2": " Constructors"
184+
"h2": "Constructors"
191185
}
192186
},
193187
{
@@ -327,7 +321,7 @@
327321
"data-key": "section-Properties"
328322
},
329323
"children": {
330-
"h2": " Properties"
324+
"h2": "Properties"
331325
}
332326
},
333327
{
@@ -391,7 +385,7 @@
391385
"data-key": "section-Methods"
392386
},
393387
"children": {
394-
"h2": " Methods"
388+
"h2": "Methods"
395389
}
396390
},
397391
{

src/test/renderer/specs/enums/Enumeration.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,13 +65,7 @@
6565
"children": [
6666
{
6767
"summary.tsd-accordion-summary.tsd-index-summary": {
68-
"tag": "h5.tsd-index-heading.uppercase",
69-
"props": {
70-
"role": "button",
71-
"aria-expanded": "false",
72-
"tabIndex": "0"
73-
},
74-
"children": " Index"
68+
"h5.tsd-index-heading.uppercase": "Index"
7569
}
7670
},
7771
{
@@ -123,7 +117,7 @@
123117
"data-key": "section-Enumeration Members"
124118
},
125119
"children": {
126-
"h2": " Enumeration Members"
120+
"h2": "Enumeration Members"
127121
}
128122
},
129123
{

src/test/renderer/specs/modules.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"data-key": "section-Documents"
3838
},
3939
"children": {
40-
"h2": " Documents"
40+
"h2": "Documents"
4141
}
4242
},
4343
{
@@ -85,7 +85,7 @@
8585
"data-key": "section-Enumerations"
8686
},
8787
"children": {
88-
"h2": " Enumerations"
88+
"h2": "Enumerations"
8989
}
9090
},
9191
{
@@ -133,7 +133,7 @@
133133
"data-key": "section-Classes"
134134
},
135135
"children": {
136-
"h2": " Classes"
136+
"h2": "Classes"
137137
}
138138
},
139139
{
@@ -208,7 +208,7 @@
208208
"data-key": "section-Type Aliases"
209209
},
210210
"children": {
211-
"h2": " Type Aliases"
211+
"h2": "Type Aliases"
212212
}
213213
},
214214
{
@@ -283,7 +283,7 @@
283283
"data-key": "section-Functions"
284284
},
285285
"children": {
286-
"h2": " Functions"
286+
"h2": "Functions"
287287
}
288288
},
289289
{

src/test/renderer/specs/types/Nested.json

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -181,13 +181,7 @@
181181
"children": [
182182
{
183183
"summary.tsd-accordion-summary.tsd-index-summary": {
184-
"tag": "h5.tsd-index-heading.uppercase",
185-
"props": {
186-
"role": "button",
187-
"aria-expanded": "false",
188-
"tabIndex": "0"
189-
},
190-
"children": " Index"
184+
"h5.tsd-index-heading.uppercase": "Index"
191185
}
192186
},
193187
{
@@ -229,7 +223,7 @@
229223
"data-key": "section-Properties"
230224
},
231225
"children": {
232-
"h2": " Properties"
226+
"h2": "Properties"
233227
}
234228
},
235229
{

static/style.css

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,6 +1037,10 @@
10371037
.tsd-accordion-summary {
10381038
list-style-type: none; /* hide marker on non-safari */
10391039
outline: none; /* broken on safari, so just hide it */
1040+
display: flex;
1041+
align-items: center;
1042+
gap: 0.25rem;
1043+
box-sizing: border-box;
10401044
}
10411045
.tsd-accordion-summary::-webkit-details-marker {
10421046
display: none; /* hide marker on safari */
@@ -1059,29 +1063,23 @@
10591063
padding-top: 0;
10601064
padding-bottom: 0;
10611065
}
1062-
.tsd-accordion .tsd-accordion-summary > svg {
1063-
margin-left: 0.25rem;
1064-
vertical-align: text-top;
1065-
}
10661066
/*
10671067
* We need to be careful to target the arrow indicating whether the accordion
10681068
* is open, but not any other SVGs included in the details element.
10691069
*/
1070-
.tsd-accordion:not([open]) > .tsd-accordion-summary > svg:first-child,
1071-
.tsd-accordion:not([open]) > .tsd-accordion-summary > h1 > svg:first-child,
1072-
.tsd-accordion:not([open]) > .tsd-accordion-summary > h2 > svg:first-child,
1073-
.tsd-accordion:not([open]) > .tsd-accordion-summary > h3 > svg:first-child,
1074-
.tsd-accordion:not([open]) > .tsd-accordion-summary > h4 > svg:first-child,
1075-
.tsd-accordion:not([open]) > .tsd-accordion-summary > h5 > svg:first-child {
1070+
.tsd-accordion:not([open]) > .tsd-accordion-summary > svg:first-child {
10761071
transform: rotate(-90deg);
10771072
}
10781073
.tsd-index-content > :not(:first-child) {
10791074
margin-top: 0.75rem;
10801075
}
1081-
.tsd-index-heading {
1076+
.tsd-index-summary {
10821077
margin-top: 1.5rem;
10831078
margin-bottom: 0.75rem;
10841079
}
1080+
.tsd-index-heading {
1081+
margin: 0;
1082+
}
10851083

10861084
.tsd-no-select {
10871085
-webkit-user-select: none;

0 commit comments

Comments
 (0)