Shrink helm knob with explicit CSS specificity
This commit is contained in:
parent
3b8fe08d9e
commit
46fc4fcb56
@ -173,11 +173,11 @@ if (!isDesktopPointer.matches) {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.steam-helm-knob {
|
||||
.steam-piece > img.steam-helm-knob {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 46%;
|
||||
width: 24%;
|
||||
width: 16%;
|
||||
height: auto;
|
||||
object-fit: contain;
|
||||
transform: translate(-50%, -50%);
|
||||
@ -598,7 +598,7 @@ if (!isDesktopPointer.matches) {
|
||||
const radarContacts = radarPiece.querySelector('#steam-radar-contacts');
|
||||
|
||||
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 py = Math.max(-1, Math.min(1, y)) * maxOffset;
|
||||
helmKnob.style.transform = `translate(-50%, -50%) translate(${px}px, ${py}px)`;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user