Skip to content

Commit 5311c96

Browse files
Make problem badges a bit wider by default so they have the same size.
1 parent f47ff24 commit 5311c96

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

webapp/public/style_domjudge.css

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,9 @@ tr.ignore td, td.ignore, span.ignore {
618618
}
619619

620620
.problem-badge {
621-
font-size: 100%;
621+
--badge-padding-x: 0.5em;
622+
font-size: 1em;
623+
min-width: 2em;
622624
}
623625

624626
.tooltip .tooltip-inner {

webapp/src/Twig/TwigExtension.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1085,7 +1085,7 @@ public function problemBadge(ContestProblem $problem): string
10851085
// Pick the foreground text color based on the background color.
10861086
$foreground = ($background[0] + $background[1] + $background[2] > 450) ? '#000000' : '#ffffff';
10871087
return sprintf(
1088-
'<span class="badge problem-badge" style="background-color: %s; min-width: 28px; border: 1px solid %s"><span style="color: %s;">%s</span></span>',
1088+
'<span class="badge problem-badge" style="background-color: %s; border: 1px solid %s"><span style="color: %s;">%s</span></span>',
10891089
$rgb,
10901090
$border,
10911091
$foreground,

0 commit comments

Comments
 (0)