Skip to content

Commit

Permalink
Make table cells fully clickable
Browse files Browse the repository at this point in the history
See #1273 for the full
explaination.

This needs a browserhack for firefox (or the other way around is also
possible) given that most major browsers are now chromium based it makes
sense to use that as default. At the moment using the firefox solution
also for chromium browsers doesn't seem to work. The selector
`td:not(.testcase-results)` is to make sure that we are reasonable
specific to be applied on the tables, it does actually target everything
because the testcase-results class doesn't have anchors in the cells.

All the anchor tags are now stretched to us the full space inside the
TD.

Based on logic in:
https://stackoverflow.com/questions/18488148/how-to-get-div-height-100-inside-td-of-100#comment120502212_18488334
  • Loading branch information
vmcj committed Aug 19, 2023
1 parent 38a3ea9 commit 06d65c1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
19 changes: 19 additions & 0 deletions webapp/public/style_jury.css
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,22 @@ table.submissions-table {
.devmode-icon {
color: white;
}

tbody td:not(.testcase-results) {
padding: 0;
height: 0;
}

tbody td:not(.testcase-results) a {
width: 100%;
height: 100%;
padding: 0 4px 0 4px;
}

@-moz-document url-prefix() {
.data-table tbody tr td:not(.testcase-results) a, .data-table tbody tr td:not(.testcase-results) a:hover {
border-left: 4px solid transparent;
border-right: 4px solid transparent;
display: inline-table;
}
}
2 changes: 1 addition & 1 deletion webapp/templates/jury/partials/submission_list.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }}">
<a href="{{ link }}">{{ submission.submittime | printtime(null, submission.contest) }}</a>
</td>
<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }}" style="text-align: right;">
<td rowspan="{{ rowSpan }}" class="{{ tdExtraClass }} entityButton">
<a href="{{ link }}">
{{ submission.team | entityIdBadge('t') }}
</a>
Expand Down

0 comments on commit 06d65c1

Please sign in to comment.