Shrink helm knob with explicit CSS specificity

This commit is contained in:
Admin 2026-09-18 00:52:09 +00:00
parent 3b8fe08d9e
commit 46fc4fcb56

View File

@ -173,11 +173,11 @@ if (!isDesktopPointer.matches) {
z-index: 1; z-index: 1;
} }
.steam-helm-knob { .steam-piece > img.steam-helm-knob {
position: absolute; position: absolute;
left: 50%; left: 50%;
top: 46%; top: 46%;
width: 24%; width: 16%;
height: auto; height: auto;
object-fit: contain; object-fit: contain;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
@ -598,7 +598,7 @@ if (!isDesktopPointer.matches) {
const radarContacts = radarPiece.querySelector('#steam-radar-contacts'); const radarContacts = radarPiece.querySelector('#steam-radar-contacts');
const setHelmKnob = (x = 0, y = 0) => { const setHelmKnob = (x = 0, y = 0) => {
const maxOffset = Math.min(radarPiece.clientWidth * 0.18, 28); const maxOffset = Math.min(radarPiece.clientWidth * 0.16, 24);
const px = Math.max(-1, Math.min(1, x)) * maxOffset; const px = Math.max(-1, Math.min(1, x)) * maxOffset;
const py = Math.max(-1, Math.min(1, y)) * maxOffset; const py = Math.max(-1, Math.min(1, y)) * maxOffset;
helmKnob.style.transform = `translate(-50%, -50%) translate(${px}px, ${py}px)`; helmKnob.style.transform = `translate(-50%, -50%) translate(${px}px, ${py}px)`;