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

Table text is not readable when dark mode is disabled #2963

Open
2 tasks done
jyelland opened this issue Jan 17, 2025 · 3 comments
Open
2 tasks done

Table text is not readable when dark mode is disabled #2963

jyelland opened this issue Jan 17, 2025 · 3 comments
Labels

Comments

@jyelland
Copy link

Have you checked that your issue isn't already filed?

  • I read through FAQ and searched through the past issues, none of which addressed my issue.
  • Yes, I have checked that this issue isn't already filed.

Bug description

When dark mode is disabled, white text is displayed on white table backgrounds

How to reproduce the bug

Steps to reproduce:

  1. Fork the repo (c5d0e92)
  2. Change line 399 of _config.yml : enable darkmode: true -> enable darkmode: false
  3. Change line 21 url to https://jyelland.github.io
  4. Commit and push to deploy site via Github Actions
  5. View live site at https://jyelland.github.io/al-folio/
  6. Confirm that dates and non-hyperlink text in "news" and "latest posts" are white-on-white (ctrl-A below)
Image

Error messages and logs

The error message you got, with the full traceback if available. Please paste it between these triple backticks.

What operating system are you using?

Linux, Mac

Where are you seeing the problem on?

Deployed site, Running locally with Docker (docker compose)

More info

As far as I can tell, the problem is that when dark mode is disabled, some tables are given class table-dark. If I manually change table-dark to table using Inspect in Firefox, text changes from white to black. However, it does not occur when I build locally using docker compose on MacOS—text is black on white. I wonder if this is related to #1134?

@jyelland jyelland added the bug label Jan 17, 2025
@george-gca
Copy link
Collaborator

This is weird. Can you look more into it, like what changes happen when enable darkmode: false?

@jyelland
Copy link
Author

I have a lead on what is happening, but no understanding of why. In Firefox, if I open the site in either a private window, or on my laptop where I have set "Never remember history", tables get class table-dark even if enable darkmode: false. This also happens in Chrome and Brave, with default settings. However, it does not happen in Firefox with default settings: table text is black-on-white when enable darkmode: false. So it seems to be browser-specific, and maybe to do with privacy settings...

@george-gca
Copy link
Collaborator

I'd suggest also searching in our code and check what else this setting affects. But if I am going to guess, this probably happens because of how the classes are loaded during the first load. Probably the answer to all this lies in our assets/js/theme.js.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants