fix(home): equalize process cards after fonts load

- deferred height-equalization script in `HomeProcess.astro` to `document.fonts.ready`
- card heights now measured with correct web fonts in all environments, not just Vite dev server
This commit is contained in:
2026-06-10 01:54:40 -07:00
parent 3003a68e39
commit 0db10a04d8
+4 -2
View File
@@ -24,6 +24,8 @@ const { section } = Astro.props;
const max = Math.max(...cards.map(c => c.offsetHeight)); const max = Math.max(...cards.map(c => c.offsetHeight));
if (max > 0) cards.forEach(c => (c.style.height = `${max}px`)); if (max > 0) cards.forEach(c => (c.style.height = `${max}px`));
} }
equalizeProcessCards(); document.fonts.ready.then(() => {
window.addEventListener('resize', equalizeProcessCards); equalizeProcessCards();
window.addEventListener('resize', equalizeProcessCards);
});
</script> </script>