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

GitHub dark isn't coloring table text correctly #109

Open
Sombody101 opened this issue Dec 20, 2023 · 1 comment
Open

GitHub dark isn't coloring table text correctly #109

Sombody101 opened this issue Dec 20, 2023 · 1 comment

Comments

@Sombody101
Copy link

Tables using the dark CSS file all have dark text color
image

I don't want to go into the CSS because I don't trust that I can fix it myself so that it won't interfere with other styles applied to each cell.

@slydor
Copy link

slydor commented Jul 17, 2024

Hi! I had the same issue with Brave in Ubuntu with default dark theme. I looked into the applied styles and found out, the browser applied some styles on the table element (called 'user agent stylesheet'):

table {
    border-collapse: separate;
    text-indent: initial;
    line-height: normal;
    font-weight: normal;
    font-size: medium;
    font-style: normal;
    color: -internal-quirk-inherit; /* <--- this one overrides the correct font color */
    text-align: start;
    border-spacing: 2px;
    white-space: normal;
    font-variant: normal;
}

According to https://stackoverflow.com/questions/24258380/font-color-in-a-table-doesnt-inherit-from-parent-div I needed to simply specify a doctype. I added this to the top of my html file and the browser stopped running in 'Quirks' mode:

<!DOCTYPE html>

Maybe that's your issue as well.

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

2 participants