Skip to content

Commit d8f31fd

Browse files
committed
Restyle declarations.
- Make the declaration name bold and darker. - Lighten the rest of the signature (return type, params, etc.) - Add some extra space between declarations. - Make the "read-only" etc. slug lines smaller and lighter.
1 parent 1a4f126 commit d8f31fd

File tree

8 files changed

+36
-28
lines changed

8 files changed

+36
-28
lines changed

lib/resources/styles.css

Lines changed: 21 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,15 @@ dt {
204204
}
205205

206206
dd {
207-
margin-bottom: 16px;
208-
color: #727272;
207+
color: #212121;
208+
}
209+
210+
dd.callable, dd.constant, dd.property {
211+
margin-bottom: 24px;
212+
}
213+
214+
dd p {
215+
margin-top: 4px;
209216
}
210217

211218
section.summary h2 {
@@ -228,6 +235,7 @@ dl.dl-horizontal dt {
228235

229236
dt .name {
230237
font-size: 17px;
238+
font-weight: 500;
231239
}
232240

233241
dl dt.callable .name {
@@ -239,8 +247,13 @@ dl dt.callable .name {
239247
white-space: nowrap;
240248
}
241249

250+
.signature {
251+
color: #727272;
252+
}
253+
242254
.signature a {
243-
color: rgb(51, 51, 51);
255+
/* 50% mix of default-primary-color and primary-text-color. */
256+
color: #4674a2;
244257
}
245258

246259
.optional {
@@ -340,9 +353,12 @@ footer .container-fluid {
340353
margin: 0;
341354
}
342355

343-
.is-inherited {
344-
color: #727272;
356+
/* The little slug line under a declaration for things like "const",
357+
"read-only", etc. */
358+
.features {
359+
font-size: 14px;
345360
font-style: italic;
361+
color: #727272;
346362
}
347363

348364
.multi-line-signature {
@@ -416,10 +432,6 @@ nav .self-name {
416432
font-style: italic;
417433
}
418434

419-
.readable-writable {
420-
font-style: italic;
421-
}
422-
423435
section.multi-line-signature div.parameters {
424436
margin-left: 24px;
425437
}

lib/templates/_callable.html

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@
66
</dt>
77
<dd>
88
{{#isInherited}}
9-
<div>
10-
<span class="is-inherited">inherited</span>
11-
</div>
9+
<div class="features">inherited</div>
1210
{{/isInherited}}
13-
{{{ oneLineDoc }}}
11+
<p>{{{ oneLineDoc }}}</p>
1412
</dd>

lib/templates/_constant.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
<dt id="{{htmlId}}" class="constant">
22
<span class="top-level-variable-type">{{{ linkedReturnType }}}</span>
33
<span class="name {{#isDeprecated}}deprecated{{/isDeprecated}}">{{{ linkedName }}}</span>
4-
=
5-
<span class="constant-value">{{{ constantValue }}}</span>
4+
<span class="signature">= {{{ constantValue }}}</span>
65
</dt>
76
<dd>
8-
<div class="is-const">
9-
const
10-
</div>
11-
{{{ oneLineDoc }}}
7+
<div class="features">const</div>
8+
<p>{{{ oneLineDoc }}}</p>
129
</dd>

lib/templates/_property.html

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
<dt id="{{htmlId}}" class="property">
2-
{{#isInherited}}{{>name_summary}}{{/isInherited}}{{^isInherited}}{{{linkedName}}}{{/isInherited}}
2+
{{#isInherited}}{{>name_summary}}{{/isInherited}}
3+
{{^isInherited}}<span class="name">{{{linkedName}}}</span>{{/isInherited}}
34
<span class="signature">&#8594; {{{ linkedReturnType }}}</span>
45
</dt>
56
<dd>
67
{{>readable_writable}}
7-
{{{ oneLineDoc }}}
8+
<p>{{{ oneLineDoc }}}</p>
89
</dd>

lib/templates/_readable_writable.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<div class="readable-writable">
2-
{{#readOnly}}read-only{{/readOnly}}{{#writeOnly}}write-only{{/writeOnly}}{{#readWrite}}read / write{{/readWrite}}{{#isInherited}}, <span class="is-inherited">inherited</span>{{/isInherited}}
1+
<div class="features">
2+
{{#readOnly}}read-only{{/readOnly}}{{#writeOnly}}write-only{{/writeOnly}}{{#readWrite}}read / write{{/readWrite}}{{#isInherited}}, inherited{{/isInherited}}
33
</div>

lib/templates/class.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ <h2>Constructors</h2>
131131
const
132132
</div>
133133
{{/isConst}}
134-
{{{ oneLineDoc }}}
134+
<p>{{{ oneLineDoc }}}</p>
135135
</dd>
136136
{{/class.constructors}}
137137
</dl>

lib/templates/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ <h2>Libraries</h2>
1515
</dt>
1616
<dd>
1717
{{#isNotDocumented}}<span class="undocumented">Library not documented.</span>{{/isNotDocumented}}
18-
{{{ oneLineDoc }}}
18+
<p>{{{ oneLineDoc }}}</p>
1919
</dd>
2020
{{/package.libraries}}
2121
</dl>

lib/templates/library.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ <h2>Enums</h2>
7777
{{{linkedName}}}
7878
</dt>
7979
<dd>
80-
{{{ oneLineDoc }}}
80+
<p>{{{ oneLineDoc }}}</p>
8181
</dd>
8282
{{/library.enums}}
8383
</dl>
@@ -94,7 +94,7 @@ <h2>Classes</h2>
9494
<span class="name {{#isDeprecated}}deprecated{{/isDeprecated}}">{{{linkedName}}}</span>
9595
</dt>
9696
<dd>
97-
{{{ oneLineDoc }}}
97+
<p>{{{ oneLineDoc }}}</p>
9898
</dd>
9999
{{/library.classes}}
100100
</dl>
@@ -111,7 +111,7 @@ <h2>Exceptions / Errors</h2>
111111
<span class="name {{#isDeprecated}}deprecated{{/isDeprecated}}">{{{linkedName}}}</span>
112112
</dt>
113113
<dd>
114-
{{{ oneLineDoc }}}
114+
<p>{{{ oneLineDoc }}}</p>
115115
</dd>
116116
{{/library.exceptions}}
117117
</dl>

0 commit comments

Comments
 (0)