diff --git a/docusaurus.config.ts b/docusaurus.config.ts index d9fd735..96f7695 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -301,7 +301,7 @@ const config: Config = { ], }, footer: { - style: 'dark', + style: 'light', links: [ { title: 'Documentation', @@ -358,8 +358,9 @@ const config: Config = { copyright: `Copyright © ${new Date().getFullYear()} Companion. Built with Docusaurus.`, }, prism: { - theme: prismThemes.github, - darkTheme: prismThemes.dracula, + // Backgrounds match --companion-surface-muted (src/css/companion-tokens.css); Prism sets them inline, so CSS can't + theme: { ...prismThemes.github, plain: { ...prismThemes.github.plain, backgroundColor: '#f0f0f0' } }, + darkTheme: { ...prismThemes.vsDark, plain: { ...prismThemes.vsDark.plain, backgroundColor: '#202020' } }, }, } satisfies Preset.ThemeConfig, } diff --git a/for-developers/module-development/local-modules.md b/for-developers/module-development/local-modules.md index 074eb3e..7f459c7 100644 --- a/for-developers/module-development/local-modules.md +++ b/for-developers/module-development/local-modules.md @@ -1,6 +1,7 @@ --- title: Setting up the Development Folder -sidebar_label: '└─ Setting up a Dev Folder' +sidebar_label: 'Setting up a Dev Folder' +sidebar_class_name: sidebar-subitem sidebar_position: 2 description: How to load modules in Companion during module development. --- diff --git a/for-developers/setting-up-WSL.md b/for-developers/setting-up-WSL.md index ff03617..93f27fa 100644 --- a/for-developers/setting-up-WSL.md +++ b/for-developers/setting-up-WSL.md @@ -1,6 +1,7 @@ --- title: Setting Up WSL for the Developer Environment -sidebar_label: '└─ WSL Setup Notes' +sidebar_label: 'WSL Setup Notes' +sidebar_class_name: sidebar-subitem sidebar_position: 1.1 description: How to set up Windows System for Linux (WSL) for Companion development --- diff --git a/package.json b/package.json index 43044b6..7ae605f 100644 --- a/package.json +++ b/package.json @@ -20,6 +20,8 @@ "dependencies": { "@docusaurus/core": "3.10.2", "@docusaurus/preset-classic": "3.10.2", + "@fontsource-variable/inter": "^5.3.0", + "@fontsource/fira-code": "^5.3.0", "@mdx-js/react": "^3.1.1", "clsx": "^2.1.1", "prism-react-renderer": "^2.4.1", diff --git a/src/components/HeroButtons.module.css b/src/components/HeroButtons.module.css index 8d7395c..f614da1 100644 --- a/src/components/HeroButtons.module.css +++ b/src/components/HeroButtons.module.css @@ -13,7 +13,8 @@ } .primaryButton { - background-color: #2563eb; + /* The light-theme brand red in both themes; the dark-theme red is too light for white text. */ + background-color: #d50215; color: white; padding: 0.75rem 1.5rem; /* stack label + subtitle vertically */ @@ -31,14 +32,14 @@ } .primaryButton:hover { - background-color: #1d4ed8; + background-color: rgb(170, 2, 17); color: white; text-decoration: none; } .secondaryButton { - background-color: #f3f4f6; - color: #374151; + background-color: var(--companion-surface); + color: var(--companion-body-text); padding: 0.75rem 1.5rem; display: inline-flex; align-items: center; @@ -47,27 +48,15 @@ border-radius: 0.375rem; text-decoration: none; font-weight: 500; - border: 1px solid #d1d5db; + border: 1px solid var(--companion-border-medium); transition: all 0.2s; } .secondaryButton:hover { - background-color: #e5e7eb; - color: #374151; + background-color: var(--companion-action-hover); + color: var(--companion-text-strong); text-decoration: none; - border-color: #9ca3af; -} - -[data-theme='dark'] .secondaryButton { - background-color: #374151; - color: #f9fafb; - border-color: #4b5563; -} - -[data-theme='dark'] .secondaryButton:hover { - background-color: #4b5563; - color: #f9fafb; - border-color: #6b7280; + border-color: var(--companion-action-focus); } /* Small subtitle text inside a button (e.g. "Win / Mac / Linux") */ diff --git a/src/css/companion-tokens.css b/src/css/companion-tokens.css new file mode 100644 index 0000000..317e1c8 --- /dev/null +++ b/src/css/companion-tokens.css @@ -0,0 +1,44 @@ +/* Copy of bitfocus/companion `shared-lib/theme/tokens.css`, which the Companion UI and its bundled user guide share. + Keep the values in step with that file so the website matches the in-app docs. */ +:root { + --companion-font-sans: + 'Inter Variable', system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', + 'Noto Color Emoji'; + --companion-font-mono: 'Fira Code', ui-monospace, monospace; + + --companion-brand: #d50215; + --companion-brand-hover: rgb(170, 2, 17); + --companion-accent-active: #941d1b; + --companion-app-frame-bg: #f3f4f7; + --companion-app-bg: #f9f9f9; + --companion-surface: #fff; + --companion-surface-muted: #f0f0f0; + --companion-border: #ddd; + --companion-border-medium: #bbb; + --companion-text-strong: #000; + --companion-body-text: rgba(37, 42.92, 54.02, 0.95); + --companion-text-secondary: #666; + --companion-selection-bg: #e5e8eb; + --companion-selection-text: #303842; + --companion-action-hover: #e8ebee; + --companion-action-focus: #66788a; +} + +:root[data-theme='dark'] { + --companion-brand: #f0444f; + --companion-brand-hover: #ff6b74; + --companion-accent-active: #e0434a; + --companion-app-frame-bg: #0e0e0e; + --companion-app-bg: #131313; + --companion-surface: #181818; + --companion-surface-muted: #202020; + --companion-border: #303030; + --companion-border-medium: #4b4b4b; + --companion-text-strong: #fff; + --companion-body-text: #dfdfdf; + --companion-text-secondary: #a9a9a9; + --companion-selection-bg: #303030; + --companion-selection-text: #e3e3e3; + --companion-action-hover: #2f2f2f; + --companion-action-focus: #999999; +} diff --git a/src/css/custom.css b/src/css/custom.css index 517ce3a..6a51b2f 100644 --- a/src/css/custom.css +++ b/src/css/custom.css @@ -1,276 +1,419 @@ -/** - * Any CSS included here will be global. The classic template - * bundles Infima by default. Infima is a CSS framework designed to - * work well for content-centric websites. - */ +/* Styling follows bitfocus/companion `docs/src/css/custom.css` (the user guide bundled in the app) so the website and + the in-app docs look the same. Website-only parts (navbar tabs, Algolia search, landing pages) are marked below. */ +@import './companion-tokens.css'; +@import '@fontsource-variable/inter/wght.css'; +@import '@fontsource-variable/inter/wght-italic.css'; +@import '@fontsource/fira-code/400.css'; +@import '@fontsource/fira-code/500.css'; +@import '@fontsource/fira-code/600.css'; +@import '@fontsource/fira-code/700.css'; + +:root, +:root[data-theme='dark'] { + --ifm-color-primary: var(--companion-brand); + --ifm-link-hover-color: var(--companion-brand-hover); + --ifm-color-content: var(--companion-body-text); + --ifm-color-content-secondary: var(--companion-text-secondary); + --ifm-heading-color: var(--companion-text-strong); + --ifm-background-color: var(--companion-app-bg); + --ifm-background-surface-color: var(--companion-surface); + --ifm-font-family-base: var(--companion-font-sans); + --ifm-font-family-monospace: var(--companion-font-mono); + --ifm-code-font-size: 95%; + --ifm-code-background: var(--companion-surface-muted); + --ifm-global-radius: 0.5rem; + --ifm-hover-overlay: var(--companion-action-hover); + --ifm-navbar-height: 3.25rem; + --ifm-navbar-background-color: var(--companion-app-frame-bg); + --ifm-navbar-link-color: var(--companion-body-text); + --ifm-navbar-link-hover-color: var(--companion-text-strong); + --ifm-navbar-search-input-background-color: var(--companion-surface); + --ifm-navbar-search-input-color: var(--companion-body-text); + --ifm-navbar-search-input-placeholder-color: var(--companion-text-secondary); + --ifm-menu-color: var(--companion-body-text); + --ifm-menu-color-active: var(--companion-selection-text); + --ifm-menu-color-background-active: var(--companion-selection-bg); + --ifm-breadcrumb-color-active: var(--companion-selection-text); + --ifm-breadcrumb-item-background-active: var(--companion-selection-bg); + --ifm-breadcrumb-border-radius: var(--ifm-global-radius); + --ifm-toc-border-color: var(--companion-border); + --ifm-table-border-color: var(--companion-border); + --ifm-table-stripe-background: var(--companion-surface-muted); + --docusaurus-highlighted-code-line-bg: var(--companion-selection-bg); + + --companion-log-sample-bg: var(--companion-surface-muted); + + /* Website only: Algolia DocSearch */ + --docsearch-primary-color: var(--companion-brand); + --docsearch-text-color: var(--companion-body-text); + --docsearch-muted-color: var(--companion-text-secondary); + --docsearch-icon-color: var(--companion-text-secondary); + --docsearch-focus-color: var(--companion-action-focus); + --docsearch-search-button-background: var(--companion-surface); + --docsearch-search-button-text-color: var(--companion-text-secondary); + --docsearch-searchbox-background: var(--companion-surface); + --docsearch-searchbox-focus-background: var(--companion-surface); + --docsearch-modal-background: var(--companion-app-bg); + --docsearch-footer-background: var(--companion-app-frame-bg); + --docsearch-hit-background: var(--companion-surface); + --docsearch-hit-color: var(--companion-body-text); + --docsearch-key-background: var(--companion-surface-muted); + --docsearch-key-color: var(--companion-text-secondary); + --docsearch-border-radius: var(--ifm-global-radius); + --docsearch-soft-primary-color: var(--companion-selection-bg); + --docsearch-highlight-color: var(--companion-brand); + --docsearch-hit-highlight-color: var(--companion-selection-bg); + --docsearch-secondary-text-color: var(--companion-text-secondary); + --docsearch-subtle-color: var(--companion-border); + --docsearch-background-color: var(--companion-surface-muted); + --docsearch-muted-color-darker: var(--companion-border-medium); + --docsearch-logo-color: var(--companion-text-secondary); + --docsearch-container-background: rgb(0 0 0 / 60%); + --docsearch-footer-shadow: 0 -1px 0 0 var(--companion-border); + --docsearch-modal-shadow: 0 12px 28px rgb(0 0 0 / 30%), 0 0 0 1px var(--companion-border); + --docsearch-key-pressed-shadow: inset 0 2px 4px rgb(0 0 0 / 25%); +} + +/* Infima doesn't derive these from --ifm-color-primary; without them buttons and other states fall back to its blue. */ +:root { + --ifm-color-primary-dark: #c00213; + --ifm-color-primary-darker: #b50212; + --ifm-color-primary-darkest: #95010f; + --ifm-color-primary-light: #ea0217; + --ifm-color-primary-lighter: #f50218; + --ifm-color-primary-lightest: #fd1b2f; +} -/* Adjust anchor-linking (in-page links) behavior: animate scrolling down to them - and if the screen is tall enough, show a bit above the link for context. */ -@media (prefers-reduced-motion: no-preference) { - html { - scroll-behavior: smooth; - } +:root[data-theme='dark'] { + --ifm-color-primary-dark: #ee2734; + --ifm-color-primary-darker: #ed1927; + --ifm-color-primary-darkest: #c8101c; + --ifm-color-primary-light: #f2616a; + --ifm-color-primary-lighter: #f36f77; + --ifm-color-primary-lightest: #f79aa0; } -@media (min-height: 600px) { - html { - scroll-padding-top: 2rem; - } +:focus-visible { + outline: 2px solid var(--companion-action-focus); + outline-offset: 2px; } -/* You can override the default Infima variables here. */ -:root { - --ifm-color-primary: #d50215; - --ifm-color-primary-dark: #bf0213; - --ifm-color-primary-darker: #b40212; - --ifm-color-primary-darkest: #94010f; - --ifm-color-primary-light: #e00217; - --ifm-color-primary-lighter: #e60c22; - --ifm-color-primary-lightest: #ea2336; - --ifm-code-font-size: 95%; - --docusaurus-highlighted-code-line-bg: rgb(0 0 0 / 10%); - - --companion-navbar-bg: #d50215; - --ifm-navbar-height: 3.25rem; /* default is 3.75 */ - --ifm-navbar-background-color: var(--companion-navbar-bg); - --ifm-navbar-link-color: white; - --ifm-navbar-link-hover-color: white; - - --companion-navbar-item-hover-bg: rgb(255 255 255 / 20%); - --companion-active-tab-color: var(--ifm-font-color-base); - --companion-active-tab-bg: white; - --companion-active-tab-shadow-color: rgb(0 0 0 / 10%); - --companion-mode-toggle-bg: rgb(255 255 255 / 40%); - --companion-group-border-color: rgb(0 0 0 / 10%); - --companion-pulldown-sidebar-bg: white; /* --ifm-background-color is transparent in light mode */ - --companion-log-sample-bg: #f2f2f2; -} - -/* For readability concerns, you should choose a lighter palette in dark mode. */ -[data-theme='dark'] { - --ifm-color-primary: #f04d63; - --ifm-color-primary-dark: #ed3249; - --ifm-color-primary-darker: #eb233e; - --ifm-color-primary-darkest: #d30825; - --ifm-color-primary-light: #f3687d; - --ifm-color-primary-lighter: #f47788; - --ifm-color-primary-lightest: #f89aa7; - - --docusaurus-highlighted-code-line-bg: rgb(0 0 0 / 30%); - --ifm-navbar-link-color: white; - --ifm-navbar-link-hover-color: white; - - --companion-active-tab-color: var(--ifm-font-color-base); /* for the pseudo-tab links in the top navbar */ - --companion-active-tab-bg: var(--ifm-background-color); /* #1b1b1d */ - --companion-active-tab-shadow-color: rgb(125 125 125 / 10%); - --companion-mode-toggle-bg: rgb(0 0 0 / 25%); - --companion-group-border-color: rgb(255 255 255 / 10%); - --companion-pulldown-sidebar-bg: var(--ifm-background-color); - --companion-log-sample-bg: #2e2f31; -} - -/* parent of the "tabs" needs slight adjustments: */ -/* The navbar and (implicitly) right container must not hide overflow: or the version dropdown will be clipped. */ .navbar { - padding-top: 0; /* In order to enable tab-like visuals, we need to let the inner elements deal with padding. */ - padding-bottom: 0; - box-shadow: none; /* keeps tab continuous with page content */ + border-bottom: 1px solid var(--companion-border); + box-shadow: none; +} + +.navbar__inner, +.navbar__items { + min-width: 0; } -/* To get the best tab effect clip overflow so we don't have to precisely calculate the button padding. - This also prevents the shadow from interrupting the continuity of the tab to the page contents */ -.theme-layout-navbar-left { - overflow: hidden; +/* Website only: keep the hover/active backgrounds of neighbouring links from touching */ +.navbar__items { + gap: 0.25rem; } -/* Navbar (the top bar, not the sidebar) link styles - note: `overflow: hidden;` can cause weird text-wrapping (if wrapping is enabled). It clips button text when wrapping is disabled. - Note: The margin-bottom/border-bottom adjustment here is made large to make the tabs touch the bottom of the header bar - Since we're clipping the left-container, the bottom-border needn't be precise -- as long as it's big enough. - note 3: ":not(:last-child)" is to prevent tab-highlighting in the app-packaged docs, where there are no tabs. - */ +.navbar__brand { + min-width: 0; + font-size: 0.9375rem; +} + +.navbar__logo { + height: 1.75rem; +} + +.navbar__title { + font-weight: 600; +} + +.navbar__item.navbar__link, +.navbar__toggle, +.navbar-sidebar__close { + border-radius: var(--ifm-global-radius); + + &:hover { + background-color: var(--companion-action-hover); + } +} + +.navbar__toggle, +.navbar-sidebar__close { + color: var(--companion-body-text); +} + +.navbar__toggle { + padding: 0.25rem; +} + +/* Website only: the section links (User Guide, What's New, ...) on the left of the navbar */ .theme-layout-navbar-left .navbar__link { - --vertical-padding: 0.5rem; /* make up for the reduced line-height */ - --margin-bottom: calc(-1 * var(--ifm-navbar-height) / 2); /* move the button down to create the tab-like effect */ - text-align: center; /* keep labels horizontally centered when they become two lines */ - line-height: 1; /* keep labels compact when words wrap to two lines (in case we remove nowrap later, below) */ - padding-top: var(--vertical-padding); - padding-bottom: calc( - var(--vertical-padding) - var(--margin-bottom) - ); /* note that margin-bottom is negative, so padding-bottom is positive and larger in magnitude */ - margin-bottom: var(--margin-bottom); - white-space: nowrap; /* Prevent two-line buttons! If we add more buttons, this may be removed */ - - /* Make page-tab links with rounded top corners, but square bottom corners so it visually "fuses" with the page */ - border-radius: 0.5rem 0.5rem 0 0; -} - -/* Make the active link look a like a page-tab (like a browser tab or VS Code editor tabs) */ + white-space: nowrap; +} + .theme-layout-navbar-left .navbar__link--active { - color: var(--companion-active-tab-color); - background-color: var(--companion-active-tab-bg); - /* Give the tab a glow */ - box-shadow: 0 -4px 10px 1px var(--companion-active-tab-shadow-color); + color: var(--companion-selection-text); + background-color: var(--companion-selection-bg); + font-weight: 600; +} + +/* Website only: Algolia DocSearch button in the navbar */ +.DocSearch-Button { + height: 2rem; + border: 1px solid var(--companion-border-medium); + border-radius: var(--ifm-global-radius); + font: inherit; + font-size: 0.8125rem; - .navbar__title { - font-weight: var(--ifm-font-weight-semibold); /* for the logo, match other tabs; bold is too strong */ + &:hover { + border-color: var(--companion-action-focus); + box-shadow: none; } } -/* Hover styles for navbar links. - Note: ".navbar__item.navbar__link" excludes dropdown menus, which by default do not highlight, possibly due to dropdown--hoverable - */ -.navbar__item.navbar__link:hover:not(.navbar__link--active), -.navbar__toggle:hover { - background-color: var(--companion-navbar-item-hover-bg); +/* Website only: the DocSearch modal's search field */ +.DocSearch-Modal { + --docsearch-actions-width: auto; } -.navbar__brand:hover, -.navbar-sidebar__close:hover { - opacity: 85%; +.DocSearch-Input { + padding-inline-start: 0.75rem; + font-weight: 400; + + /* The site-wide focus ring would cut through the magnifier; the modal only has this one field anyway */ + &:focus-visible { + outline: none; + } } -/* Make the dark/light mode button stand out better. - Unfortunately, it doesn't have a non-serialized classname, but this works. - Can't say if it's better than .clean-btn[title='system mode'], but it's safer from localization */ -.theme-layout-navbar-right .clean-btn:not(:hover), -.navbar-sidebar__brand .clean-btn:not(:hover) { - background-color: var(--companion-mode-toggle-bg); +.DocSearch-Form:focus-within .DocSearch-MagnifierLabel svg { + color: var(--companion-body-text); } -/* The next two rules adjust spacing for the download, github and light/dark buttons. - The first is for the light/dark button when it is grouped with the other two, so only needs to work on the full navbar. */ -.theme-layout-navbar-right .clean-btn { - margin: 0 0.25em; +.DocSearch-Clear { + height: 1.75rem; + margin-inline-start: 0; + padding: 0 0.5rem; + border-radius: var(--ifm-global-radius); + color: var(--companion-text-secondary); + font-size: 0.8125rem; + font-weight: 400; + + &:hover { + background-color: var(--companion-action-hover); + color: var(--companion-text-strong); + } } -/* when the window is wide, the icons show in the right-header. Don't show text. */ -.theme-layout-navbar-right .navbar__link { - padding: 0.25em; - border-radius: 0.5rem; +/* The Algolia logo sets its own blue fill inside the SVG; show it in one colour like the rest of the modal */ +.DocSearch-Logo svg [class^='cls-'] { + fill: currentColor; +} + +@media (max-width: 996px) { + .navbar { + --ifm-navbar-padding-horizontal: 0.75rem; + } +} + +@media (max-width: 420px) { + .navbar__brand { + font-size: 0.8125rem; + } + + .navbar__logo { + height: 1.5rem; + } +} + +.theme-layout-navbar-right > .fontawesome-container { + padding: 0.45rem; - /* fontawesome-* classes are added in the item definitions in docusaurus.config.ts */ .fontawesome { - height: 2rem; + display: block; width: auto; - display: block; /* removes extra spacing below the SVG */ + height: 1.125rem; } + .fontawesome-text { display: none; } } -/* .navbar-sidebar__items: when the window is narrow, the right-header icons are in the pull-down sidebar - .navbar__inner .dropdown__menu: for dropdown menus in the navbar. (note, though, that the current design does not allow dropdowns in the left section.) - */ .navbar-sidebar__items, .navbar__inner .dropdown__menu { - /* fontawesome-* classes were added in the item definitions in docusaurus.config.ts */ .fontawesome-container { display: flex; align-items: center; + gap: 0.5rem; .fontawesome { - height: 1.5em; width: auto; - /* "display: block" not needed here — flex container eliminates the inline spacing below the SVG */ + height: 1.125rem; + } + } +} + +.navbar-sidebar, +.theme-doc-sidebar-container { + background-color: var(--companion-surface-muted); +} + +.navbar-sidebar__brand { + background-color: var(--companion-app-frame-bg); + border-bottom: 1px solid var(--companion-border); + box-shadow: none; +} + +.theme-doc-sidebar-container .menu { + padding-inline-end: 0.5rem; +} + +.theme-doc-sidebar-menu, +.navbar-sidebar .menu { + --ifm-menu-link-padding-vertical: 0.4rem; + font-size: 0.875rem; + + .menu__list .menu__list { + margin-inline-start: 0.75rem; + padding-inline-start: 0.5rem; + border-inline-start: 1px solid var(--companion-border); + } + + .menu__list-item-collapsible > .menu__link--active:not([aria-current='page']) { + color: var(--ifm-menu-color); + font-weight: 600; + } + + .menu__link[aria-current='page'] { + position: relative; + background-color: var(--companion-selection-bg); + font-weight: 600; + + &::before { + position: absolute; + inset-block: 0.4rem; + inset-inline-start: 0; + width: 3px; + border-radius: 2px; + background-color: var(--companion-accent-active); + content: ''; } + } + + /* Website only: a page shown as a child of the page above it (set with `sidebar_class_name` in its frontmatter) */ + .sidebar-subitem { + margin-inline-start: 0.75rem; + padding-inline-start: 0.5rem; + border-inline-start: 1px solid var(--companion-border); + } - .fontawesome-text { - line-height: 1; - padding-left: 0.5em; + /* Style the immediate groups in Configuration GUI using the bundled sidebar markup. */ + .theme-doc-sidebar-item-category:has(> .menu__list-item-collapsible > a[href$='/category/configuration-gui']) + > .menu__list + > .theme-doc-sidebar-item-category { + margin-block-start: 0.75rem; + + > .menu__list-item-collapsible > .menu__link { + color: var(--companion-text-secondary); + font-size: 0.75rem; + font-weight: 600; } } } -/* Default color for the sidebar toggle is black in light mode and grey in dark mode for some reason; neither look great */ -.navbar__toggle { - color: white; - padding: 0.5em; - border-radius: 0.5em; +.footer { + --ifm-footer-background-color: var(--companion-app-frame-bg); + --ifm-footer-color: var(--companion-text-secondary); + --ifm-footer-link-color: var(--companion-body-text); + --ifm-footer-link-hover-color: var(--companion-brand); + --ifm-footer-title-color: var(--companion-text-strong); + border-top: 1px solid var(--companion-border); +} + +/* Website only: admonitions and the version banner sit on the page surface with a coloured accent, not a tinted fill */ +.alert { + --companion-alert-accent: var(--companion-text-secondary); + --ifm-alert-background-color: var(--companion-surface); + --ifm-alert-background-color-highlight: var(--companion-surface-muted); + --ifm-alert-foreground-color: var(--companion-body-text); + --ifm-alert-border-color: var(--companion-border); + --ifm-alert-border-width: 1px; + --ifm-alert-border-left-width: 3px; + --ifm-alert-shadow: none; + border-inline-start-color: var(--companion-alert-accent); + + &.theme-admonition { + [class*='admonitionHeading'] { + color: var(--companion-alert-accent); + } + + [class*='admonitionIcon'] svg { + fill: var(--companion-alert-accent); + } + } } -/* when window is narrow, the "pull-down" sidebar's class is .navbar-sidebar. - Adjust its colors here to match the body/sidebar colors rather than the (top) navbar colors - (when the window is wider, the permanent sidebar class is .theme-doc-sidebar-menu) - */ -.navbar-sidebar { - --ifm-navbar-background-color: var(--companion-pulldown-sidebar-bg); +/* Light-mode accents also colour the small admonition headings, so keep them at 4.5:1 or better on white */ +.alert--success { + --companion-alert-accent: #1a7d37; } -/* the top of the narrow-win sidebar should be red regardless of theme */ -.navbar-sidebar__brand, -.navbar-sidebar__brand:hover { - background-color: var(--companion-navbar-bg); +.alert--info { + --companion-alert-accent: var(--companion-action-focus); } -/* Close-icon for the drop-down sidebar when the window is narrow */ -.navbar-sidebar__close { - padding: 0.5em; - border-radius: 0.5em; - color: white; /* doesn't do anything currently, because the SVG is hardcoded to: */ - --ifm-color-emphasis-600: white; +.alert--warning { + --companion-alert-accent: #966300; +} - &:hover { - background-color: var(--companion-mode-toggle-bg); - } +.alert--danger { + --companion-alert-accent: var(--companion-brand); } -/* For all sidebars: Make subgroup (aka category) boundaries more distinct. - note that the DOM for collapsing lists in the sidebar is: -