fix(fonts): sincronizar @font-face en critical-bootstrap.css

El archivo critical-bootstrap.css (TIPO 2) carga primero y tenia
valores desactualizados que causaban el salto visual en navbar.

Cambios:
- font-display: optional → swap
- size-adjust: 106% → 100.6%

Ahora ambos archivos (@font-face) estan sincronizados:
- critical-bootstrap.css (inline P:0)
- css-global-fonts.css (deferred)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
FrankZamora
2025-12-02 10:06:04 -06:00
parent d8fa5cb609
commit 78ec902688

View File

@@ -31,11 +31,14 @@
/* ========================================================================== /* ==========================================================================
CRITICAL FONTS (Poppins - LCP optimization) CRITICAL FONTS (Poppins - LCP optimization)
font-display: swap + preload = fuente carga rapido y siempre se muestra
size-adjust: 100.6% = fallback casi identico a Poppins (minimiza CLS)
========================================================================== */ ========================================================================== */
@font-face { @font-face {
font-family: 'Poppins Fallback'; font-family: 'Poppins Fallback';
src: local('Arial'), local('Helvetica Neue'), local('sans-serif'); src: local('Arial'), local('Helvetica Neue'), local('sans-serif');
size-adjust: 106%; size-adjust: 100.6%;
ascent-override: 105%; ascent-override: 105%;
descent-override: 35%; descent-override: 35%;
line-gap-override: 10%; line-gap-override: 10%;
@@ -45,21 +48,21 @@
src: url('/wp-content/themes/roi-theme/Assets/Fonts/poppins-v24-latin-regular.woff2') format('woff2'); src: url('/wp-content/themes/roi-theme/Assets/Fonts/poppins-v24-latin-regular.woff2') format('woff2');
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
font-display: optional; /* CLS fix: no swap, usa fallback si fuente no carga a tiempo */ font-display: swap;
} }
@font-face { @font-face {
font-family: 'Poppins'; font-family: 'Poppins';
src: url('/wp-content/themes/roi-theme/Assets/Fonts/poppins-v24-latin-600.woff2') format('woff2'); src: url('/wp-content/themes/roi-theme/Assets/Fonts/poppins-v24-latin-600.woff2') format('woff2');
font-weight: 600; font-weight: 600;
font-style: normal; font-style: normal;
font-display: optional; font-display: swap;
} }
@font-face { @font-face {
font-family: 'Poppins'; font-family: 'Poppins';
src: url('/wp-content/themes/roi-theme/Assets/Fonts/poppins-v24-latin-700.woff2') format('woff2'); src: url('/wp-content/themes/roi-theme/Assets/Fonts/poppins-v24-latin-700.woff2') format('woff2');
font-weight: 700; font-weight: 700;
font-style: normal; font-style: normal;
font-display: optional; font-display: swap;
} }
:root { :root {