Closed davidhund closed 6 years ago
Using inlineStyles I noticed you inline the 'critical' CSS in a <style> block in the <head> and then <link> the complete, non-critical, CSS file right above </body> (so as not to block rendering).
inlineStyles
<style>
<head>
<link>
</body>
Another good pattern is to use rel=preload in the head for this non-critical CSS file and then load it with JS. A good explanation (and JS utility) can be found in LoadCSS by the Filamentgroup.
rel=preload
Adding a loadCSS script might be out of scope, but it might be good to document (README?) this usage with extractStyles.
loadCSS
extractStyles
inlineStyles could actually do half the work by also adding a <link rel="preload" href="org-stylesheet.css" as="style">.
<link rel="preload" href="org-stylesheet.css" as="style">
Love the suggestion. Coming in the next release. :-)
🎉
Using
inlineStyles
I noticed you inline the 'critical' CSS in a<style>
block in the<head>
and then<link>
the complete, non-critical, CSS file right above</body>
(so as not to block rendering).Another good pattern is to use
rel=preload
in the head for this non-critical CSS file and then load it with JS. A good explanation (and JS utility) can be found in LoadCSS by the Filamentgroup.Adding a
loadCSS
script might be out of scope, but it might be good to document (README?) this usage withextractStyles
.inlineStyles
could actually do half the work by also adding a<link rel="preload" href="org-stylesheet.css" as="style">
.