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

unreadable text when browsing in dark mode #384

Open
andrewrk opened this issue Jan 18, 2024 · 1 comment
Open

unreadable text when browsing in dark mode #384

andrewrk opened this issue Jan 18, 2024 · 1 comment

Comments

@andrewrk
Copy link

Hello Every.org team,

Thanks for your wonderful organization and for this handy widget. It's almost perfect for us except for a little CSS bug.

In this screenshot, it is difficult to see but I have typed "1000" into the Donation Amount box. You can see the problem live at https://ziglang.org/zsf/

image

In normal or light mode, which is the setting most users browse with, this is not a problem. But users who have their system theme set to dark mode will not be able to see the donation amount.

You can simulate this in Firefox with this button:

image

I've been trying to work around the issue but it's tricky because of the shadow DOM. I didn't know about the shadow DOM until today so I've been trying things like

#donation-input {
  color:black
}

and scratching my head as to why it wasn't taking effect.

This affects the "Private Note" field as well:

image

Any suggested workaround would be welcome.

@andrewrk
Copy link
Author

Found a workaround:

let style = document.createElement('style');
style.innerHTML = '#donation-input { color: black; } #privateNote { color: black }';
document.getElementById("shadow-wrapper").shadowRoot.appendChild(style);

andrewrk added a commit to ziglang/www.ziglang.org that referenced this issue Jan 18, 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

No branches or pull requests

1 participant