Member Junction
    Preparing search index...
    • Resolves the data-theme value to put on the element — MJ's dark token block is keyed on [data-theme="dark"] — or null to leave the element alone.

      • light / dark are explicit and always applied.
      • auto defers to the PAGE: when an ancestor already carries data-theme (an MJ application, or a site that follows MJ's convention), nothing is applied and the ancestor wins; otherwise it follows the visitor's OS preference.

      Parameters

      • mode: WidgetThemeMode

        The configured mode.

      • pageDeclaresTheme: boolean

        Whether an ancestor of the element already has a data-theme.

      • prefersDark: boolean

        Whether the OS prefers dark.

      Returns "light" | "dark" | null