Issue
Generated sites load so fast, that HTML is rendered "bare", and then styles are applied later, leading to a flash of unstyled text (FOUT) issue.
Proposed solution
I've manually patched my own site, but I'd like to contribute a solution for others to use. This would only be a few lines.
- Add a new site parameter (
useInlineStylesheet [boolean])
- Update
layouts/partials/head/css.html:
- If
useInlineStylesheet is true, put combined CSS in a <style> tag
- Else, keep the current logic of linking combined CSS file in a
<link rel="stylesheet"> tag
I'm thinking that using a site parameter would help, because in the (unlikely) case that users have large stylesheets, they may want to use an external link rather than inline it.
LMK your thoughts, and what an appropriate default should be.
Issue
Generated sites load so fast, that HTML is rendered "bare", and then styles are applied later, leading to a flash of unstyled text (FOUT) issue.
Proposed solution
I've manually patched my own site, but I'd like to contribute a solution for others to use. This would only be a few lines.
useInlineStylesheet[boolean])layouts/partials/head/css.html:useInlineStylesheetis true, put combined CSS in a<style>tag<link rel="stylesheet">tagI'm thinking that using a site parameter would help, because in the (unlikely) case that users have large stylesheets, they may want to use an external link rather than inline it.
LMK your thoughts, and what an appropriate default should be.