Skip to content

Commit 6152792

Browse files
docs(*): simplify display of parameters of member functions
1 parent 84095d0 commit 6152792

File tree

2 files changed

+22
-23
lines changed

2 files changed

+22
-23
lines changed

Diff for: typedoctheme/assets/css/typedoctheme.css

+13-17
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
1-
.tsd-panel.tsd-member {
2-
padding-top: 0;
3-
}
1+
/* Change the member layout to a grey box */
2+
.tsd-panel.tsd-member { padding-top: 0; }
3+
.tsd-panel .tsd-signature, .tsd-panel .tsd-signatures { background-color: #eee; }
44

5-
.tsd-panel .tsd-signature, .tsd-panel .tsd-signatures {
6-
background-color: #eee;
7-
}
5+
/* The short text, one line description of a member */
6+
.tsd-header { list-style: none; margin: 0 2em; font-weight: bold; }
7+
.tsd-header p { margin-top : 0; }
88

9-
.tsd-header {
10-
list-style: none;
11-
margin: 0 2em;
12-
font-weight: bold;
13-
}
9+
/* We added the short text in the .tsd-header, so don't display it in the main comment block */
10+
.tsd-member .tsd-description .lead { display: none; }
1411

15-
.tsd-header p {
16-
margin-top : 0;
17-
}
12+
ul.tsd-parameters li { margin-top: 1em; }
13+
ul.tsd-parameters li > * { display: inline; }
14+
ul.tsd-parameters li > * > p { display: inline; }
1815

19-
.tsd-member .tsd-description .lead {
20-
display: none;
21-
}
16+
.tsd-returns { margin-top: 1em; }
17+
.tsd-returns > * { display: inline; }

Diff for: typedoctheme/partials/member.signature.body.hbs

+9-6
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,10 @@
1111
{{#each parameters}}
1212
<li>
1313
<h5>{{#compact}}
14-
{{#each flags}}
15-
<span class="tsd-flag ts-flag{{this}}">{{this}}</span>&nbsp;
16-
{{/each}}
1714
{{#if flags.isRest}}<span class="tsd-signature-symbol">...</span>{{/if}}
18-
{{name}}:&nbsp;
15+
{{name}}{{#each flags}}
16+
&nbsp;<span class="tsd-flag ts-flag{{this}}">{{this}}</span>
17+
{{/each}}:&nbsp;
1918
{{#with type}}{{>type}}{{/with}}
2019
{{#if defaultValue}}
2120
<span class="tsd-signature-symbol">
@@ -25,7 +24,9 @@
2524
{{/if}}
2625
{{/compact}}</h5>
2726

28-
{{> comment}}
27+
{{#if comment}}
28+
: {{> comment}}
29+
{{/if}}
2930

3031
{{#if type.declaration}}
3132
{{#with type.declaration}}
@@ -38,17 +39,19 @@
3839
{{/if}}
3940

4041
{{#if type}}
42+
<div class="tsd-returns">
4143
<h4 class="tsd-returns-title">Returns {{#with type}}{{>type}}{{/with}}</h4>
4244

4345
{{#if comment.returns}}
44-
{{#markdown}}{{{comment.returns}}}{{/markdown}}
46+
: {{#markdown}}{{{comment.returns}}}{{/markdown}}
4547
{{/if}}
4648

4749
{{#if type.declaration}}
4850
{{#with type.declaration}}
4951
{{> parameter}}
5052
{{/with}}
5153
{{/if}}
54+
</div>
5255
{{/if}}
5356

5457
{{#unless hideSources}}

0 commit comments

Comments
 (0)