Skip to content

Commit c5ad429

Browse files
committed
web: reduce patch list table padding
The checkbox, A/R/T and S/W/F columns have too much horizontal padding, causing long text columns to wrap unnecessarily. Reduce cell padding from 1em to 0.5em and give the checkbox cells a dedicated .checkbox class with minimal padding. Also reduce the pill min-width to 1em. Signed-off-by: Robin Jarry <robin@jarry.cc>
1 parent 1d67229 commit c5ad429

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎pkg/web/patches.templ‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ templ patchListPage(d patchListData) {
128128
<thead>
129129
<tr>
130130
if d.PC.User != nil {
131-
<th><input type="checkbox" title="Select all" id="select-all"/></th>
131+
<th class="checkbox"><input type="checkbox" title="Select all" id="select-all"/></th>
132132
}
133133
@sortHeader("Patch", "name", d)
134134
<th>Series</th>
@@ -144,7 +144,7 @@ templ patchListPage(d patchListData) {
144144
for _, p := range d.Patches {
145145
<tr>
146146
if d.PC.User != nil {
147-
<td><input type="checkbox" name="patch_id" value={ fmt.Sprintf("%d", p.ID) }/></td>
147+
<td class="checkbox"><input type="checkbox" name="patch_id" value={ fmt.Sprintf("%d", p.ID) }/></td>
148148
}
149149
<td>
150150
<a href={ templ.SafeURL(patchURL(d.Project.Linkname, p.Msgid)) }>

‎pkg/web/static/style.css‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,14 +245,14 @@ patch-list table {
245245
width: 100%;
246246
}
247247
patch-list th {
248-
padding: 3px 1em;
248+
padding: 3px 0.5em;
249249
border-bottom: 2px solid #ddd;
250250
text-align: left;
251251
}
252252
patch-list th a { color: #333; }
253253
patch-list th a:hover { color: #c00; text-decoration: none; }
254254
patch-list td {
255-
padding: 3px 1em;
255+
padding: 3px 0.5em;
256256
border-top: 1px solid #e8e8e8;
257257
white-space: nowrap;
258258
overflow: hidden;
@@ -269,6 +269,11 @@ patch-list tbody tr:hover { background: #f0f0f0; }
269269
patch-list input[type="checkbox"] {
270270
vertical-align: middle;
271271
}
272+
patch-list .checkbox {
273+
padding: 3px;
274+
width: 1.5em;
275+
text-align: center;
276+
}
272277

273278
/* --- patch actions --- */
274279
patch-actions {
@@ -310,7 +315,7 @@ fieldset legend {
310315
/* --- pills --- */
311316
pill {
312317
display: inline-block;
313-
min-width: 1.3em;
318+
min-width: 1em;
314319
text-align: center;
315320
margin: 0 1px;
316321
}

0 commit comments

Comments
 (0)