Appearance interface

Module @runic-artifex/views in @runic-artifex/views 0.23.0

interface Appearance

The page's appearance. engine is what the page's CSS sees and host what the host read from the desktop; the other members combine them: - colorScheme is the engine's, which follows a window's own scheme, or the host's without it. - contrast and reducedMotion are the latest change: the engine's value, until the host pushes a change of the member, whose value then applies until the engine's media query changes. An engine that reads the desktop's setting only when the page loads, or does not follow it at all, so reports the desktop's later changes. Without the engine's value they are the host's. - textScale, accentColor and systemColors come from the host alone. - A member the host decided for the window (override in the push, as for a guest's page in a hosted region) is the host's value, whatever the engine's media query reports, from the first push on, as long as the latest push lists it. The engine's values stay what the page's CSS sees: such a page styles from this appearance, not from media queries. null is a preference neither source knows, as under server rendering. To tell "the desktop asks for forced colours" from "this page's colours are forced", read host.contrast and engine.contrast.

Properties

colorScheme

readonly colorScheme: AppearanceColorScheme | null;

No documentation.

contrast

readonly contrast: AppearanceContrast | null;

No documentation.

reducedMotion

readonly reducedMotion: boolean | null;

No documentation.

textScale

readonly textScale: number | null;

No documentation.

accentColor

readonly accentColor: string | null;

No documentation.

systemColors

readonly systemColors: AppearanceSystemColors | null;

No documentation.

engine

readonly engine: EngineAppearance;

The engine's media queries alone.

host

readonly host: HostAppearance | null;

What the host pushed, or null before its first push and with a host without appearance/1.