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: make dark style of navbar properly #179

Merged
merged 1 commit into from
Oct 1, 2021
Merged

fix: make dark style of navbar properly #179

merged 1 commit into from
Oct 1, 2021

Conversation

lex111
Copy link
Contributor

@lex111 lex111 commented Sep 30, 2021

Fixes bugs reported in the comment facebook/docusaurus#3937 (comment)

Before After
image image

@@ -156,15 +156,17 @@ html[data-theme='dark'],

&--dark {
--ifm-navbar-background-color: #242526;
--ifm-menu-color-background-active: rgba(255, 255, 255, 0.05);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Increased contrast for active link background to make it more visible.

@@ -169,7 +169,7 @@
</a>
<button type="button" class="clean-btn navbar-sidebar__close">
<svg viewBox="0 0 413.348 413.348" width="20" height="20">
<path d="m413.348 24.354-24.354-24.354-182.32 182.32-182.32-182.32-24.354 24.354 182.32 182.32-182.32 182.32 24.354 24.354 182.32-182.32 182.32 182.32 24.354-24.354-182.32-182.32z"/>
<path fill="currentColor" d="m413.348 24.354-24.354-24.354-182.32 182.32-182.32-182.32-24.354 24.354 182.32 182.32-182.32 182.32 24.354 24.354 182.32-182.32 182.32 182.32 24.354-24.354-182.32-182.32z"/>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using current color for close button to consistency with toggle button (seems better).

@lex111 lex111 requested a review from slorber September 30, 2021 14:22
@github-actions
Copy link

Dist CSS Diff

diff --git a/packages/core/dist/css/default/default.css b/packages/core/dist-branch/css/default/default.css
index 553f0d9..c5ab10d 100644
--- a/packages/core/dist/css/default/default.css
+++ b/packages/core/dist-branch/css/default/default.css
@@ -2499,7 +2499,7 @@ html[data-theme='dark'],
   }
 
 .navbar__brand:hover {
-      color: inherit;
+      color: var(--ifm-navbar-link-hover-color);
       text-decoration: none;
     }
 
@@ -2571,16 +2571,18 @@ html[data-theme='dark'],
 
 .navbar--dark {
     --ifm-navbar-background-color: #242526;
+    --ifm-menu-color-background-active: rgba(255, 255, 255, 0.05);
     --ifm-navbar-link-color: var(--ifm-color-gray-100);
     --ifm-navbar-link-hover-color: var(--ifm-color-primary);
     --ifm-navbar-search-input-background-color: rgba(255, 255, 255, 0.1);
     --ifm-navbar-search-input-color: var(--ifm-color-white);
     --ifm-navbar-search-input-placeholder-color: rgba(255, 255, 255, 0.5);
     --ifm-menu-color: var(--ifm-color-gray-300);
-    --ifm-navbar-toggle-color: var(--ifm-color-white);
   }
 
-.navbar--dark .navbar__toggle {
+.navbar--dark .navbar__toggle,
+    .navbar--dark .navbar-sidebar__close,
+    .navbar--dark .navbar-sidebar__back {
       color: var(--ifm-color-white);
     }
 

@github-actions
Copy link

Size Change: +916 B (0%)

Total Size: 566 kB

Filename Size Change
./packages/core/dist/css/default-dark/default-dark-rtl.css 82.4 kB +122 B (0%)
./packages/core/dist/css/default-dark/default-dark-rtl.min.css 57.6 kB +107 B (0%)
./packages/core/dist/css/default-dark/default-dark.css 82.3 kB +122 B (0%)
./packages/core/dist/css/default-dark/default-dark.min.css 57.6 kB +107 B (0%)
./packages/core/dist/css/default/default-rtl.css 80.8 kB +122 B (0%)
./packages/core/dist/css/default/default-rtl.min.css 56.5 kB +107 B (0%)
./packages/core/dist/css/default/default.css 80.7 kB +122 B (0%)
./packages/core/dist/css/default/default.min.css 56.5 kB +107 B (0%)
ℹ️ View Unchanged
Filename Size
./packages/core/dist/js/alerts.js 409 B
./packages/core/dist/js/alerts.min.js 409 B
./packages/core/dist/js/button-groups.js 267 B
./packages/core/dist/js/button-groups.min.js 267 B
./packages/core/dist/js/dropdowns.js 1.01 kB
./packages/core/dist/js/dropdowns.min.js 1.01 kB
./packages/core/dist/js/menu.js 1.94 kB
./packages/core/dist/js/menu.min.js 1.94 kB
./packages/core/dist/js/navbar.js 1.08 kB
./packages/core/dist/js/navbar.min.js 1.08 kB
./packages/core/dist/js/pills.js 270 B
./packages/core/dist/js/pills.min.js 270 B
./packages/core/dist/js/radio-behavior.js 705 B
./packages/core/dist/js/radio-behavior.min.js 705 B
./packages/core/dist/js/tabs.js 267 B
./packages/core/dist/js/tabs.min.js 267 B

compressed-size-action

@netlify
Copy link

netlify bot commented Sep 30, 2021

✔️ Deploy Preview for infima ready!

🔨 Explore the source changes: 9c82026

🔍 Inspect the deploy log: https://app.netlify.com/sites/infima/deploys/6155c7f114f1d1000817941c

😎 Browse the preview: https://deploy-preview-179--infima.netlify.app/demo

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 30, 2021
@slorber
Copy link
Collaborator

slorber commented Oct 1, 2021

thanks 👍

@slorber slorber merged commit 71106e9 into main Oct 1, 2021
@lex111 lex111 deleted the lex111/iss3937-2 branch October 2, 2021 09:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants