Skip to content

Commit fd8d976

Browse files
authored
fix: Use fixed lengths for the first three columns of "meta" tables (ietf-tools#3637)
Fixes ietf-tools#3615.
1 parent 3b2e2ea commit fd8d976

7 files changed

Lines changed: 36 additions & 17 deletions

File tree

ietf/static/css/ietf.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,25 @@ pre {
8787
font-size: inherit;
8888
}
8989

90+
// Use fixed lengths for the first three columns of "meta" tables.
91+
table tbody.meta {
92+
93+
th:first-child,
94+
td:first-child {
95+
width: 9em;
96+
}
97+
98+
th:nth-child(2),
99+
td:nth-child(2) {
100+
// text-align: right;
101+
width: 14em;
102+
}
103+
104+
td.edit {
105+
width: 1px; // Make sure it uses as little space as possible
106+
}
107+
}
108+
90109
// Highlight required form field labels with bi-asterisk
91110
.required>label:after {
92111
display: inline-block;

ietf/templates/doc/document_bofreq.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
<table class="table table-sm table-borderless">
1717
<tbody class="meta border-top">
1818
<tr>
19-
<th class="col-1">Document</th>
20-
<th class="col-2">Type</th>
19+
<th>Document</th>
20+
<th>Type</th>
2121
<td class="edit"></td>
22-
<td class="col-9">
22+
<td>
2323
{{ doc.get_state.slug|capfirst }} BOF request
2424
{% if snapshot %}<span class="badge bg-warning">Snapshot</span>{% endif %}
2525
</td>

ietf/templates/doc/document_charter.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@
4747
<table class="table table-sm table-borderless">
4848
<tbody class="meta border-top">
4949
<tr>
50-
<th class="col-1">Document</th>
51-
<th class="col-2">
50+
<th>Document</th>
51+
<th>
5252
{% if doc.get_state_slug != "approved" %}
5353
Proposed charter
5454
{% else %}
5555
Charter
5656
{% endif %}
5757
</th>
5858
<td class="edit"></td>
59-
<th class="col-9">
59+
<th>
6060
{{ group.name }} {{ group.type.name }}
6161
<a href="{{ group.about_url }}">({{ group.acronym }})</a>
6262
{% if snapshot %}<span class="badge bg-warning">Snapshot</span>{% endif %}

ietf/templates/doc/document_conflict_review.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
<table class="table table-sm table-borderless mb-3">
1818
<tbody class="meta border-top">
1919
<tr>
20-
<th class="col-1">Document</th>
21-
<th class="col-2">
20+
<th>Document</th>
21+
<th>
2222
{% if doc.get_state_slug not in approved_states %}
2323
Proposed conflict review
2424
{% else %}
2525
Conflict review
2626
{% endif %}
2727
</th>
2828
<td class="edit"></td>
29-
<td class="col-9">
29+
<td>
3030
<a href="{% url "ietf.doc.views_doc.document_main" name=conflictdoc.canonical_name %}">
3131
{% if conflictdoc.get_state_slug == 'rfc' %}
3232
{{ conflictdoc.canonical_name|upper }}

ietf/templates/doc/document_material.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@
1515
<table class="table table-sm table-borderless">
1616
<tbody class="meta border-top">
1717
<tr>
18-
<th class="col-2">
18+
<th>
1919
{% if doc.meeting_related %}Meeting{% endif %}
2020
{{ doc.type.name }}
2121
</th>
2222
<td></td>
23-
<td class="col-10">
23+
<td>
2424
{% if doc.group %}
2525
{{ doc.group.name }}
2626
<a href="{{ doc.group.about_url }}">({{ doc.group.acronym }})</a>

ietf/templates/doc/document_status_change.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
<table class="table table-sm table-borderless">
1818
<tbody class="meta border-top">
1919
<tr>
20-
<th class="col-1">Document</th>
21-
<th class="col-2">
20+
<th>Document</th>
21+
<th>
2222
{% if doc.get_state_slug not in approved_states %}
2323
Proposed status change
2424
{% else %}
@@ -33,7 +33,7 @@
3333
</a>
3434
{% endif %}
3535
</td>
36-
<th class="col-9">
36+
<th>
3737
{{ doc.title }}
3838
{% if snapshot %}<span class="badge bg-warning">Snapshot</span>{% endif %}
3939
</th>

ietf/templates/group/group_about.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@
1414
<table class="my-3 table table-sm table-borderless">
1515
<tbody class="meta border-top">
1616
<tr>
17-
<th class="col-2">{{ group.type.name }}</th>
18-
<th class="col-3">Name</th>
17+
<th>{{ group.type.name }}</th>
18+
<th>Name</th>
1919
<td class="edit">
2020
{% if can_edit_group %}
2121
<a class="btn btn-primary btn-sm"
2222
href="{% url 'ietf.group.views.edit' acronym=group.acronym field='name' %}">Edit</a>
2323
{% endif %}
2424
</td>
25-
<th class="col-7">{{ group.name }}</th>
25+
<th>{{ group.name }}</th>
2626
</tr>
2727
<tr>
2828
<td></td>

0 commit comments

Comments
 (0)