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

Update navbar styling to use data-bs-theme attribute #2573

Merged
merged 3 commits into from
May 22, 2024
Merged

Conversation

hadley
Copy link
Member

@hadley hadley commented May 22, 2024

@jayhesselberth does this make sense to you? It slightly changes the colour (hopefully not too noticeably), but computes them in such a way that switching to dark mode should be easier.

@hadley hadley requested a review from jayhesselberth May 22, 2024 12:44
Copy link

github-actions bot commented May 22, 2024

@include border-radius($border-radius);
padding: 0.5rem;
Copy link
Member Author

Choose a reason for hiding this comment

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

As far as I can tell, this padding had no effect.

background: change-color($primary, $alpha: 0.1);
}

.navbar-dark {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not sure why we had this; it doesn't seem necessary now.

@@ -1,5 +1,5 @@
{{#navbar}}
<nav class="navbar fixed-top navbar-{{{type}}} navbar-expand-lg bg-{{{bg}}}" data-bs-theme="{{{type}}}" aria-label="{{#translate}}{{site_nav}}{{/translate}}">
Copy link
Member Author

Choose a reason for hiding this comment

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

In preparation for #2338 — if you activate dark mode, we won't write these so that everything is controlled via css.

@jayhesselberth
Copy link
Collaborator

I think this makes sense. Changes to navbar colors are imperceptible.

@hadley hadley merged commit 36db657 into main May 22, 2024
14 checks passed
@hadley hadley deleted the navbar-style-updates branch May 22, 2024 13:51
hadley added a commit that referenced this pull request May 22, 2024
SebKrantz pushed a commit to SebKrantz/pkgdown that referenced this pull request Jun 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants