feat(theme-classic): replace native color mode tooltip with fast CSS …#11891
Closed
Injora wants to merge 1 commit intofacebook:mainfrom
Closed
feat(theme-classic): replace native color mode tooltip with fast CSS …#11891Injora wants to merge 1 commit intofacebook:mainfrom
Injora wants to merge 1 commit intofacebook:mainfrom
Conversation
✅ [V2]Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
Collaborator
|
Thanks for the PR, but this is not something we were looking to introduce. Please open an issue with a design proposal first to see if we want that feature. If we introduce a tooltip system to Docusaurus, we'll do this globally in a comprehensive way across the whole theme. We'll likely do this in the future, using modern CSS such as anchor positioning. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pre-flight checklist
Motivation
This PR improves the perceived performance and user experience of the
ColorModeToggleby replacing the browser's slow, nativetitleattribute with a fast, custom CSS-driven tooltip.Previously, when hovering over the dark/light mode toggle, users had to wait for the standard browser and OS delay (often >1s) for the tooltip to appear. By moving this into a
::afterpseudo-element and passing the label via adata-tooltipattribute, the tooltip now smoothly and rapidly fades in below the button, drastically enhancing the premium interactive feel of Docusaurus navbars.Test Plan
--ifm-color-emphasis-900/100) and displays the appropriate translated mode label.attr(data-tooltip)updates instantaneously alongside the icon changes.:focus-visible) to verify tooltip accessibility is preserved.Screen.Recording.2026-04-03.at.12.04.05.mov
Test links
Deploy preview: https://deploy-preview-_____--docusaurus-2.netlify.app/
Related issues/PRs
N/A — Self-identified visual UX enhancement.