Give every class icon a uniform frame in the signup picker

The source class icons vary slightly in shape/contrast, which made
the picker boxes look inconsistent even at identical CSS dimensions.
Each icon now sits inside a fixed 44x44 frame (object-fit: contain)
with its own background, and the button gets a min-height so all 8
options are pixel-identical regardless of label length or icon art.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Maaxxs 2026-09-18 18:56:42 +02:00
parent 5c28cb5735
commit a9d1e8deef
2 changed files with 31 additions and 4 deletions

View file

@ -725,8 +725,10 @@ input:focus, select:focus, textarea:focus {
display: flex;
flex-direction: column;
align-items: center;
gap: 0.4rem;
justify-content: flex-start;
gap: 0.5rem;
padding: 0.75rem 0.5rem;
min-height: 96px;
background: var(--bg-panel-alt);
border: 1px solid var(--border);
border-radius: 8px;
@ -736,7 +738,32 @@ input:focus, select:focus, textarea:focus {
text-align: center;
}
.class-picker-option img { width: 32px; height: 32px; }
/* Einheitlicher Rahmen um jedes Klassen-Icon, damit alle Kaestchen trotz
unterschiedlicher Icon-Formen/-Kontraste gleich wirken. */
.class-icon-frame {
display: flex;
align-items: center;
justify-content: center;
width: 44px;
height: 44px;
flex-shrink: 0;
background: var(--bg-panel);
border-radius: 6px;
}
.class-icon-frame img {
width: 30px;
height: 30px;
object-fit: contain;
}
.class-picker-label {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
line-height: 1.2;
}
.class-picker-option:hover { border-color: var(--gold); }

View file

@ -326,8 +326,8 @@ include __DIR__ . '/includes/header.php';
<div class="class-picker">
<?php foreach ($classOptions as $classOption): ?>
<button type="button" class="class-picker-option" data-class="<?= e($classOption) ?>">
<img src="<?= e(class_icon_url($classOption)) ?>" alt="">
<span><?= e($classOption) ?></span>
<span class="class-icon-frame"><img src="<?= e(class_icon_url($classOption)) ?>" alt=""></span>
<span class="class-picker-label"><?= e($classOption) ?></span>
</button>
<?php endforeach; ?>
</div>