diff --git a/src/app/features/settings/SettingsPage.tsx b/src/app/features/settings/SettingsPage.tsx index 04059d80..02925cdc 100644 --- a/src/app/features/settings/SettingsPage.tsx +++ b/src/app/features/settings/SettingsPage.tsx @@ -2,6 +2,7 @@ import React, { ReactNode } from 'react'; import { useTranslation } from 'react-i18next'; import { Box, Icon, IconButton, Icons, Scroll, Text } from 'folds'; import { Page, PageContent, PageHeader } from '../../components/page'; +import { SettingsContentCenter } from './styles.css'; type SettingsPageProps = { title: ReactNode; @@ -19,8 +20,11 @@ export function SettingsPage({ title, requestClose, children }: SettingsPageProp const { t } = useTranslation(); return ( - - + {/* paddingRight:0 matches PageContent so the header's centered 720 column + lines up exactly with the content column below (PageHeader defaults to + a S200 right pad, which would shift the title ~4px off the content). */} + + {title} @@ -40,7 +44,7 @@ export function SettingsPage({ title, requestClose, children }: SettingsPageProp - + {children} diff --git a/src/app/features/settings/styles.css.ts b/src/app/features/settings/styles.css.ts index c6606d76..a192b445 100644 --- a/src/app/features/settings/styles.css.ts +++ b/src/app/features/settings/styles.css.ts @@ -40,7 +40,15 @@ export const SettingRow = style({ // JetBrains Mono for technical values — mxid, device ids, version, tokens — // the same stack the DM stream / bot surfaces use for handles & timestamps. export const Mono = style({ - fontFamily: - '"JetBrains Mono Variable", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace', + fontFamily: 'var(--font-mono)', fontVariantNumeric: 'tabular-nums', }); + +// Centre the settings content as a calm reading column on wide desktop so it +// stops stretching edge-to-edge. width:100% + margin:auto means it degrades to +// full-width inside the narrower mobile settings sheet (no visible cap there). +export const SettingsContentCenter = style({ + maxWidth: toRem(720), + width: '100%', + margin: 'auto', +}); diff --git a/src/index.css b/src/index.css index 762a15a0..12bf89e6 100644 --- a/src/index.css +++ b/src/index.css @@ -50,6 +50,12 @@ --font-emoji: 'Twemoji_DISABLED'; --font-secondary: 'InterVariable', var(--font-emoji), sans-serif; + /* Single shared mono stack for technical metadata (mxid, aliases, + timestamps, device ids, version, shortcodes, command sigs). JetBrains + Mono Variable is imported globally in index.tsx; this var lets every + surface point at one stack instead of repeating it. */ + --font-mono: 'JetBrains Mono Variable', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, + monospace; } .dark-theme {