Skip to content

Commit

Permalink
wrap long lists of parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
sethladd committed Feb 22, 2015
1 parent b716941 commit f89798b
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
8 changes: 6 additions & 2 deletions templates/new/class.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,9 @@ <h2>Static Methods</h2>
<dt>
<code>
<span class="returntype">{{{ linkedReturnType }}}</span>
<span class="name">{{ name }}</span>({{{ linkedParams }})
<span class="name-and-params">
<span class="name">{{ name }}</span>({{{ linkedParams }})
</span>
</code>
</dt>
<dd>
Expand All @@ -200,7 +202,9 @@ <h2>Instance Methods</h2>
<dt>
<code>
<span class="returntype">{{{ linkedReturnType }}}</span>
<span class="name">{{ name }}</span>({{{ linkedParams }})
<span class="name-and-params">
<span class="name">{{ name }}</span>({{{ linkedParams }})
</span>
</code>
</dt>
<dd>
Expand Down
8 changes: 6 additions & 2 deletions templates/new/library.html
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ <h2>Functions</h2>
<dt id="{{htmlId}}">
<code>
<span class="returntype">{{{ linkedReturnType }}}</span>
<span class="name">{{ name }}</span>({{{ linkedParams }})
<span class="name-and-params">
<span class="name">{{ name }}</span>({{{ linkedParams }})
</span>
</code>
</dt>
<dd>
Expand All @@ -132,7 +134,9 @@ <h2>Typedefs</h2>
<dt id="htmlId">
<code>
<span class="returntype">{{{ linkedReturnType }}}</span>
<span class="name">{{ name }}</span>({{{ linkedParams }})
<span class="name-and-params">
<span class="name">{{ name }}</span>({{{ linkedParams }})
</span>
</code>
</dt>
<dd>
Expand Down
10 changes: 10 additions & 0 deletions templates/new/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ dl.withreturntypes .returntype {
color: gray;
}

dl.withreturntypes span.name-and-params {
display: block;
margin-left: 250px;
}

dl.withreturntypes dd {
margin-left: 250px;
color: gray;
Expand All @@ -96,6 +101,11 @@ dl.withreturntypes dd {
float: none;
width: auto;
}

dl.withreturntypes span.name-and-params {
display: inline;
margin:0;
}
}

dl.dl-horizontal dt {
Expand Down
4 changes: 4 additions & 0 deletions test/fake_package/lib/fake.dart
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ typedef String FakeProcesses(String input);
/// A typedef with a type parameter.
typedef T GenericTypedef<T>(T input);

/// Lots and lots of parameters.
typedef int LotsAndLotsOfParameters(so,many,parameters,it,should,wrap,when,
converted,to,html,documentation);

/// This class is cool!
class Cool {

Expand Down

0 comments on commit f89798b

Please sign in to comment.