Browsers currently paint a window with a default background before/while loading web pages, CSS, and other resources. This happens both upon opening a new window with a URL (initial paint), and when navigating from one page to another (transitional paint), and is currently unspecified by the CSS rendering model.
This hole in the CSS rendering model results in proposals to use meta tags instead, such as viewport, and potentially for a dark mode.
Rather than awkwardly punting this area of rendering behavior(s) to an HTML meta tag or other non-CSS solution, CSS should define how browsers should (or at least may) render initial and transitional paints, preferably with a feature that permits author control, especially (at least) between pages of the same origin.
Prior related work:
- 1997(?) Internet Explorer 4.0 / Windows: MSDN Interpage Transitions (AKA inter-page transitions) and MSDN Transitions Reference
- 1998 CSS Progressive Rendering (Proposal) (Posted 1998-09-10 to w3c-css-wg) — both W3C member-only links written by me (Tantek), permission granted to share information at those links publicly.
- 2015 [css-nav-trans] RFC: Proposal for style rule to specify transitions between page navigations
Anything specified in the CSS rendering model for handling initial and transitional page paints should reference the HTML specification and hook into the DOM and states described in: HTML Standard: 7.7 Session history and navigation.
Labels: Needs Thought, unknown/future spec