Skip to content
This repository was archived by the owner on Nov 17, 2020. It is now read-only.

Commit 82c6229

Browse files
committed
Use consistent & healthy padding for table headers, even when sorting
Without this, as soon as a column is sorted, extra padding is added and all table contents get shifted a few pixels downwards in a rather jerky fashion - this is difficult to capture in screenshots. Also, text in table headers becomes misaligned. By using sorting symbols that have the same height, sorting columns asc/desc doesn't make the content in table headers "jump" and remain misaligned.
1 parent 3c49853 commit 82c6229

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

priv/www/css/main.css

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,8 @@ table.legend td { padding: 4px 0 4px 10px; width: 130px; }
9292
input#truncate { width: 50px; text-align: right; }
9393

9494
table { border-collapse: collapse; }
95-
table th { font-weight: normal; color: black; }
96-
97-
table th, table td { font: 12px Verdana, sans-serif; padding: 2px 4px; }
95+
table th { font-weight: normal; color: black; padding: 6px 5px 5px 5px; line-height: 1em; }
96+
table td { padding: 2px 5px; }
9897
table.list th, table.list td { vertical-align: top; min-width: 5em; width: auto; }
9998

10099
table.list { border-width: 1px; margin-bottom: 1em; }
@@ -173,7 +172,7 @@ tr.alt2>td {
173172
td span,
174173
td abbr {
175174
display: inline-block;
176-
padding: 3px 5px;
175+
padding: 2px 4px;
177176
margin: 0 0 3px 0;
178177
}
179178

@@ -322,7 +321,7 @@ input[type=submit][disabled]:hover, button[disabled]:hover, a.button.disabled {
322321

323322
h3 { padding: 0 0 2px 0; margin: 1em 0 1em 0; font-size: 1em; border-bottom: 1px solid #E4E4E4; font-weight: normal; }
324323

325-
abbr { background: #99EBFF; padding: 3px 5px; border-radius: 5px; -moz-border-radius: 5px; border: none; cursor: default; text-decoration: none; }
324+
abbr { background: #99EBFF; padding: 2px 4px; border-radius: 5px; -moz-border-radius: 5px; border: none; cursor: default; text-decoration: none; }
326325

327326
table.list td abbr a { display: inline; width: auto; }
328327

priv/www/js/formatters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,7 +835,7 @@ function fmt_sort(display, sort) {
835835
var prefix = '';
836836
if (current_sort == sort) {
837837
prefix = '<span class="arrow">' +
838-
(current_sort_reverse ? '&#9660; ' : '&#9650; ') +
838+
(current_sort_reverse ? '&#9661; ' : '&#9651; ') +
839839
'</span>';
840840
}
841841
return '<a class="sort" sort="' + sort + '">' + prefix + display + '</a>';

0 commit comments

Comments
 (0)