Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix theme toggle JavaScript and A11y #1628

Merged
merged 2 commits into from Mar 22, 2023
Merged

Conversation

julien-deramond
Copy link
Member

Based on twbs/blog#355, same modifications:

  • Revert modifications done in JS like upstream
  • Get --bs-dropdown-min-width definition from upstream
  • Get a11y enhancement from upstream

⚠️ The first highlight area of the page was broken on light mode, so this PR embeds a fix but I wasn't sure about the colors to use. @mdo I let you check that.

It is now:
Screenshot 2023-03-22 at 08 09 07

It was (https://icons.getbootstrap.com/ in light mode):

Screenshot 2023-03-22 at 08 10 28

@@ -5,8 +5,6 @@
*/

(() => {
'use strict'
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Linting is not happy with this removal. I can reintroduce it if needed or we should change the rules. As you wish.

Copy link
Member

@XhmikosR XhmikosR Mar 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah it's needed here because the JS docs files here are treated as CJS and not modules.

@XhmikosR XhmikosR added the docs Improvements or additions to documentation label Mar 22, 2023
Copy link
Member

@XhmikosR XhmikosR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@XhmikosR XhmikosR merged commit b5dd471 into main Mar 22, 2023
8 checks passed
@XhmikosR XhmikosR deleted the main-jd-fix-theme-toggle branch March 22, 2023 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to documentation
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants