Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • B bootstrap
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 263
    • Issues 263
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 114
    • Merge requests 114
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Bootstrap
  • bootstrap
  • Merge requests
  • !37738

Docs: handle light/dark mode in Algolia search modal

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Julien Déramond requested to merge main-jd-dark-mode-for-algolia into main Dec 27, 2022
  • Overview 2
  • Commits 2
  • Pipelines 0
  • Changes 2

Description

This PR suggests some modifications to handle the dark mode in Algolia modal based on the values available in their CSS file.

Light mode Dark mode 
Screenshot 2022-12-27 at 22 52 03  Screenshot 2022-12-27 at 22 51 54

I preferred to avoid adding a data-theme="dark" to our <html> in the docs and rather copied the content of their CSS file in ours.

Also moved some --docsearch-* definitions in our _search.scss file to gather together this management in a single file.

Finally, had to add a patch because --docsearch-logo-color doesn't seem to work well in our case. Sounds like a bug (see https://github.com/algolia/docsearch/issues/1695 where I've added a lil' comment)

⚠️ This PR doesn't tackle the visible focus (keyboard focus). We should create a dedicated issue/PR for that since it already doesn't work even in light mode.

2022-12-27 22 49 46

Motivation & Context

Simple motivation: having a light/dark mode for this modal as well.

Type of changes

  • Enhancement

Checklist

  • I have read the contributing guidelines
  • My code follows the code style of the project (using npm run lint)
  • My change introduces changes to the documentation
  • I have updated the documentation accordingly
  • All new and existing tests passed

Live previews

  • https://deploy-preview-37738--twbs-bootstrap.netlify.app/docs/5.3/getting-started/introduction/

Related issues

Linked to a sub-task in #37549

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: main-jd-dark-mode-for-algolia