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:
parent
b08896c2a4
commit
5c4fcc7fd4
1 changed files with 1 additions and 1 deletions
|
|
@ -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();});
|
||||
|
|
|
|||
Loading…
Reference in a new issue