Skip to main content

demo_theme

Function demo_theme 

Source
pub fn demo_theme() -> Theme
Expand description

The design system a demonstration should start in.

An application picks its own theme and never needs this. The samples do, because the point of a sample is to show what one declaration looks like under each system, and on any given machine the adaptive default can only ever show you one of them. Material 3 and Fluent went unseen for weeks for exactly that reason: everything was checked on a Mac, so everything was Cupertino.

DXC_DESIGN names the system. Anything else, including nothing, adapts to the host. DXC_SCHEME names light or dark; anything else leaves the reader’s own setting alone.