Skip to content

Commit 7972f01

Browse files
cjshacjsha
andauthored
Remove white space in enum tables (#113)
- Allow "tableFormat" css class to be used in other html elements that aren't div Co-authored-by: cjsha <[email protected]>
1 parent 3a264e5 commit 7972f01

File tree

3 files changed

+27
-36
lines changed

3 files changed

+27
-36
lines changed

template/partials/enum.tmpl.partial

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,20 @@
88
<h2>Fields</h2>
99

1010
<table>
11-
1211
<tr>
1312
<th style="white-space: no-wrap">Field & Value</th>
1413
<th>Description</th>
1514
</tr>
16-
1715
{{#oe.enum}}
1816
<tr>
1917
<td style="white-space: no-wrap">
20-
<code>
21-
{{{field&value}}}
22-
</code>
23-
</td>
24-
<td>
25-
{{{description}}}
26-
</td>
18+
<code>
19+
{{{field&value}}}
20+
</code>
21+
</td>
22+
<td class="tableFormat">
23+
{{{description}}}
24+
</td>
2725
</tr>
2826
{{/oe.enum}}
29-
30-
</table>
27+
</table>
Lines changed: 14 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,23 @@
11
<tr>
2-
32
<td style = "white-space: nowrap;">
43
<code>{{{name}}}</code>
54
</td>
6-
75
<td style = "white-space: nowrap;">
86
{{{type}}}
97
</td>
10-
11-
<td>
12-
<div class="tableFormat">
13-
{{#propertyDescription}}
14-
{{{propertyDescription.text}}}
15-
{{#hasEnum}}
16-
<table>
17-
{{#enum}}
18-
<tr>
19-
<td class="term"><code>{{{field&value}}}</code></td>
20-
<td class="description">{{{enumDescription}}}</td>
21-
</tr>
22-
{{/enum}}
23-
</table>
24-
{{/hasEnum}}
25-
{{/propertyDescription}}
26-
</div>
8+
<td class="tableFormat">
9+
{{#propertyDescription}}
10+
{{{propertyDescription.text}}}
11+
{{#hasEnum}}
12+
<table>
13+
{{#enum}}
14+
<tr>
15+
<td class="term"><code>{{{field&value}}}</code></td>
16+
<td class="description">{{{enumDescription}}}</td>
17+
</tr>
18+
{{/enum}}
19+
</table>
20+
{{/hasEnum}}
21+
{{/propertyDescription}}
2722
</td>
28-
2923
</tr>

template/public/main.css

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
@import "workflow.css";
22

3-
div.tableFormat *:last-child {
3+
.tableFormat *:last-child {
44
margin-bottom: 0;
55
}
66

7-
div.tableFormat table {
7+
.tableFormat table {
88
display: grid;
99
grid-template-columns: auto;
1010
margin-top: 1rem;
@@ -14,20 +14,20 @@ div.tableFormat table {
1414
border-collapse: collapse;
1515
}
1616

17-
div.tableFormat td {
17+
.tableFormat td {
1818
padding: 0;
1919
border: 0 hidden;
2020
}
2121

22-
div.tableFormat td.term {
22+
.tableFormat td.term {
2323
/* !important tag prevents overrides from dotnet.css associated with:
2424
body[data-yaml-mime="ManagedReference"] article td.term, body[data-yaml-mime="ApiPage"] article td.term
2525
important tags are not good practice*/
2626
font-weight: var(--bs-body-font-weight) !important;
2727
white-space: nowrap;
2828
}
2929

30-
div.tableFormat td.description {
30+
.tableFormat td.description {
3131
padding-left: 1rem;
3232
}
3333

0 commit comments

Comments
 (0)