You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Critical CSS is the CSS a page needs to draw what is visible before the reader scrolls. Putting it inline in <head> and loading the rest later makes the first paint faster.
From the django-components discussion: when a site is built from components, the framework knows which component CSS each page uses. So it could put the CSS of some components inline in <head> and load the rest as files later.
Existing tools such as critical and penthouse already extract critical CSS from a rendered page, including from local files, but they need Node. A possible extension: render each page, run one of these tools on the output, and put the critical CSS inline. A guide that shows how to do this by hand would be a smaller first step.
docs/design/extensions_roadmap.md sections 3 and 6 list critical-CSS extraction as not actionable yet. This issue keeps the request so it can be picked up when that changes. Inline CSS for whole components is tracked in #36.
Activity