Skip to content

Conversation

@doup
Copy link
Contributor

@doup doup commented Nov 5, 2024

This PR builds on top of #1603 and hence on the huge effort spearheaded by @lynnpepin.

There are some changes though:

  • Synced with latest main commit.
  • Changed how CSS variables are used to a more semantic approach. We have variables ("tokens") for different BEM components, and depending on light/dark theme we change the colors assigned to these. We don't alter the color anymore. So no more color redefinition: --color-white: #000;. All BEM components and pages use token for colors now.
  • And the most important change, light theme is only enabled on selected templates of the web page. Cart raised his concerns in Discord about the quality difference between the light and dark themes so we opted for this more gradual approach. For now it's only applied to docs.html which means that the quickstart, book, contributing guide and migration guides will show the light theme IF the user prefers light themes.
    • To enable light mode in a template we only need to add the following line in any Tera template that extends layouts/base.html. This will add the light-mode class to the <html/> element.
    {% block theme %}light-mode{% endblock theme %}
bevy-maybe-light-mode.mp4

@alice-i-cecile alice-i-cecile added C-Accessibility C-Webdev A-Cross-Cutting Impacts multiple parts of the website X-Controversial There is active debate or serious implications around merging this PR labels Nov 5, 2024
@alice-i-cecile
Copy link
Member

Marked as controversial, not because I think anyone has any objection, but because I know @cart will have opinions on the palette etc. I think it looks really nice :)

He's heads-down in BSN work right now though, so it may be a while until you get a review.

@doup
Copy link
Contributor Author

doup commented Mar 4, 2025

@cart dark-mode now should look the same as main.

Light-mode will be enabled only for: Getting Started, Migration Guides, Contributing Guide and Errors. News light-mode was started, but must be finished & activated in another PR.

@doup doup requested a review from cart March 4, 2025 19:29
<h1>
{{ section_or_page.extra.long_title | default(value=section_or_page.title) | safe }}
{% if section_or_page.extra.subtitle %}
<span class="docs-page-subtitle">{{ section_or_page.extra.subtitle }}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

is this no longer used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I couldn't find any instance of this being used, I think it's a feature no one knows about.

@krunchington
Copy link
Contributor

Left a few comments but overall the restructuring totally makes sense. The stepwise approach with the intersection of class and media queries is also great.

@cart
Copy link
Member

cart commented Mar 6, 2025

Yup the palette looks good to me now! You've made inline code blocks "squarer". I prefer the "rounder" style / I think it fits our vibes more. Can you revert that?

Additionally, the text in the headerbar is still pure white. Can you switch back to the slightly off-white color?

@doup
Copy link
Contributor Author

doup commented Mar 7, 2025

I fixed the reported issues and found a couple of extra more. I think now it's done… 🤞🤞🤞

@doup doup requested a review from krunchington March 7, 2025 08:46
@krunchington
Copy link
Contributor

Changes look good to me

Copy link
Contributor

@krunchington krunchington left a comment

Choose a reason for hiding this comment

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

Leaving my approval, the css changes look well scoped to not cause issues with the current experience, and allow the gradual rollout of the media query based preference. I'd still defer to actual maintainers for approval of the color/style values.

@cart
Copy link
Member

cart commented Mar 7, 2025

Haha ok one more change and then we're good to merge: the cards on the Donate page no longer use the standard card background color. Can you switch that back?

@doup
Copy link
Contributor Author

doup commented Mar 8, 2025

🙈🙈🙈🙈🙈🙈

I just pushed final-light-mode.v4.definitive-NOW-FOR-REAL.pr… maybe it's ready, maybe not. Schrodinger PR.


A new bg-color rule slipped for the donate cards, now removed. I've also fixed a couple of issues with the link colors in light-mode.

Copy link
Member

@cart cart left a comment

Choose a reason for hiding this comment

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

We're good to go now. Thanks for bearing with me!

@cart cart added this pull request to the merge queue Mar 8, 2025
@lynnpepin
Copy link
Contributor

Yay!! This might technically be cosmetic but this is my most highly anticipated Bevy feature :D Thank you so much for all this hard work, I'm excited to see this on the Bevy website

Merged via the queue into bevyengine:main with commit 9033e70 Mar 8, 2025
10 checks passed
@doup
Copy link
Contributor Author

doup commented Mar 9, 2025

No problem @cart, the PR had out of scope changes.

@cart cart moved this from Respond (With Priority) to Responded in @cart's attention Mar 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Cross-Cutting Impacts multiple parts of the website C-Accessibility C-Webdev X-Controversial There is active debate or serious implications around merging this PR

Projects

Status: Responded

Development

Successfully merging this pull request may close these issues.

5 participants