Thing deck: the measured masthead clearance includes the header's top margin

offsetHeight leaves out the 2.4rem/1.3rem margin above the masthead, so on
a phone the hero's eyebrow started 20px inside the header box. The stage
now pads its top by the masthead's full footprint above the stage.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Meta Vens 2026-10-02 15:36:45 +02:00
commit 5c4fcc7fd4

View file

@ -141,7 +141,7 @@
$('.tps').textContent=tps.toLocaleString();
}
var hdr=document.querySelector('.page-header');
function sizeHead(){if(hdr)root.style.setProperty('--masthead-h',hdr.offsetHeight+'px');}
function sizeHead(){if(hdr)root.style.setProperty('--masthead-h',hdr.offsetHeight+parseFloat(getComputedStyle(hdr).marginTop)+'px');}
function req(){if(!ticking){ticking=true;requestAnimationFrame(frame);}}
window.addEventListener('scroll',req,{passive:true});
window.addEventListener('resize',function(){sizeHead();sizeCanvas();sizeBurst();req();});