Skip to content

Commit 33a0810

Browse files
committed
modify class view to align font styles and better screen reader use closes #702
1 parent 23a691a commit 33a0810

File tree

5 files changed

+35
-22
lines changed

5 files changed

+35
-22
lines changed

Gruntfile.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,7 @@ module.exports = function(grunt) {
408408
'update-version',
409409
'exec',
410410
'clean',
411+
'requirejs:yuidoc_theme',
411412
'requirejs',
412413
'copy',
413414
'assemble',

src/assets/css/main.css

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,14 @@ div.reference-subgroup {
441441
margin: 1em 0 0 0;
442442
}
443443

444+
#item ul {
445+
margin-top: 0.5em;
446+
}
447+
448+
#item li {
449+
margin-bottom: 1em;
450+
}
451+
444452
.description {
445453
clear: both;
446454
display: block;
@@ -455,7 +463,8 @@ div.reference-subgroup {
455463

456464
.paramname {
457465
display: inline-block;
458-
width: 33%;
466+
min-width: 25%;
467+
margin-right: 1%;
459468
font-size: 1.2em;
460469
}
461470

@@ -467,7 +476,7 @@ div.reference-subgroup {
467476
.paramtype {
468477
display: inline-block;
469478
font-size: 1.2em;
470-
width: 66%;
479+
width: 73%;
471480
vertical-align: top;
472481
}
473482

@@ -2267,6 +2276,9 @@ footer {
22672276
footer {
22682277
font-size: 0.5em;
22692278
}
2279+
.paramtype {
2280+
width: 96%;
2281+
}
22702282
}
22712283

22722284
@media (max-width:400px) {

src/templates/pages/reference/assets/js/reference.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/templates/pages/reference/assets/js/reference.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,32 @@
11

22
<% if (typeof constructor !== 'undefined') { %>
33
<div class="constructor">
4-
<!--<h2>Constructor</h2>-->
54
<%=constructor%>
65
</div>
76
<% } %>
87

9-
<% var fields = _.filter(things, function(item) { return item.itemtype === 'property' && item.access !== 'private' }); %>
8+
<% let fields = _.filter(things, function(item) { return item.itemtype === 'property' && item.access !== 'private' }); %>
109
<% if (fields.length > 0) { %>
11-
<h4>Fields</h4>
12-
<p>
13-
<% _.each(fields, function(item) { %>
14-
<a href="<%=item.hash%>" <% if (item.module !== module) { %>class="addon"<% } %> ><%=item.name%></a>: <%= item.description %>
15-
<br>
16-
<% }); %>
17-
</p>
10+
<h3 id='reference-fields'>Fields</h3>
11+
<ul aria-labelledby='reference-fields'>
12+
<% _.each(fields, function(item) { %>
13+
<li>
14+
<div class='paramname'><a href="<%=item.hash%>" <% if (item.module !== module) { %>class="addon"<% } %>><%=item.name%></a></div>
15+
<div class='paramtype'><%= item.description %></div>
16+
</li>
17+
<% }); %>
18+
</ul>
1819
<% } %>
1920

20-
<% var methods = _.filter(things, function(item) { return item.itemtype === 'method' && item.access !== 'private' }); %>
21+
<% let methods = _.filter(things, function(item) { return item.itemtype === 'method' && item.access !== 'private' }); %>
2122
<% if (methods.length > 0) { %>
22-
<h4>Methods</h4>
23-
<p>
24-
<table>
23+
<h3 id='reference-methods'>Methods</h3>
24+
<ul aria-labelledby='reference-methods'>
2525
<% _.each(methods, function(item) { %>
26-
<tr>
27-
<td><a href="<%=item.hash%>" <% if (item.module !== module) { %>class="addon"<% } %>><%=item.name%><% if (item.itemtype === 'method') { %>()<%}%></a></td><td><div class="method_description"><%= item.description %></div></td>
28-
</tr>
26+
<li>
27+
<div class='paramname'><a href="<%=item.hash%>" <% if (item.module !== module) { %>class="addon"<% } %>><%=item.name%><% if (item.itemtype === 'method') { %>()<%}%></a></div>
28+
<div class='paramtype'><%= item.description %></div>
29+
</li>
2930
<% }); %>
30-
</table>
31-
</p>
31+
</ul>
3232
<% } %>

0 commit comments

Comments
 (0)