ui/damagenumbershud.razor.scss
// DAMAGE NUMBERS — floating "-240" over the thing you shot.
//
// ⚠️ No animation here on purpose. Position and opacity are driven per frame
// from code because the anchor is a WORLD point; a keyframe cannot know where
// that lands on screen. The stylesheet only carries appearance.
.dmg-nums {
position: absolute;
width: 100%;
height: 100%;
pointer-events: none;
}
.num {
position: absolute;
// ⚠️ Centred ON the projected point, not hanging off it. Left/Top are the
// hit position, so the element has to pull itself back by half its own size
// or every number sits down-right of what it describes.
transform: translateX(-50%) translateY(-50%);
font-family: Inter; // ⚠️ NOT Consolas — it is not shipped and s&box
// logged "Font 'Consolas' not found, falling back to system font",
// which means the face was whatever the OS chose. Inter is the one
// face this project actually ships.
font-weight: bold;
font-size: 26px;
color: white;
// A hard shadow rather than an outline — these are read against zombies,
// muzzle flash and blood, and thin type disappears into all three.
text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.85);
white-space: nowrap;
}
// Headshot: yellow and larger. The addon builds a second font at 4/3 the size
// for exactly this, which is where 35px comes from.
.num.hs {
font-size: 35px;
color: #ffff00;
}
// ═══ BASALT (`HudTheme`) — the map's face, Cinzel on the hit numbers ═══
//
// *"i want the font for this map to affect … all hud messages that appear on screen"* (2026-09-27). The class is put on from `OnUpdate` (`HudTheme.Wear`), because this
// tree is built once and a class in its razor would keep the theme it was built under.
// ⛔ ON INTER'S LINE BOX, so no row grows taller: 0.898 of Cinzel's own line, which is Inter's 1.211 of the size. See
// `.round` in SurvivalHud.razor.scss for why it is not 1.211. It is wider on mixed-case text, which it sets in small capitals. Cinzel-Bold is the one face shipped,
// so every weight draws bold.
.dmg-nums.theme-basalt,
.dmg-nums.theme-basalt .num
{
font-family: Cinzel;
line-height: 0.898;
}