Creates a Material-UI theme for the given display mode.
baseTheme exists only so we can read its calibrated pxToRem, used to convert our font
sizes to rem. The real theme is then created in a single createTheme call from the
generated options (plus htmlFontSize) - we never pass baseTheme itself into that call.
Doing so would merge our options onto an already-built theme, and MUI only overrides the
specific properties we set. Anything we don't explicitly set (e.g. font family on body/button
text, divider/disabled colours in dark mode, or the 640/960px breakpoints) would silently
fall back to baseTheme's defaults instead of ours.
Parameters
mode: TypeDisplayTheme
Display theme mode ('light', 'dark', 'geo.ca', or 'canada.ca')
Creates a Material-UI theme for the given display mode.
baseThemeexists only so we can read its calibratedpxToRem, used to convert our font sizes to rem. The real theme is then created in a singlecreateThemecall from the generated options (plushtmlFontSize) - we never passbaseThemeitself into that call. Doing so would merge our options onto an already-built theme, and MUI only overrides the specific properties we set. Anything we don't explicitly set (e.g. font family on body/button text, divider/disabled colours in dark mode, or the 640/960px breakpoints) would silently fall back tobaseTheme's defaults instead of ours.