docs(fonts[loading]): switch to font-display block with inline CSS · tmux-python/tmuxp@6564409 · GitHub
Skip to content

Commit 6564409

Browse files
committed
docs(fonts[loading]): switch to font-display block with inline CSS
why: font-display swap causes visible text reflow (FOUT). Matching the tony.nl/cv approach: block rendering until preloaded fonts arrive, and inline the @font-face CSS to eliminate the extra fonts.css request. what: - Change font-display from swap to block - Move @font-face CSS from external fonts.css to inline <style> in <head> - Use pathto() in template for correct relative font URLs at any page depth - Remove _generate_css() function (CSS now generated in Jinja template)
1 parent a31731a commit 6564409

2 files changed

Lines changed: 48 additions & 55 deletions

File tree

‎docs/_ext/sphinx_fonts.py‎

Lines changed: 20 additions & 55 deletions

‎docs/_templates/page.html‎

Lines changed: 28 additions & 0 deletions

0 commit comments

Comments
 (0)