-
-
Notifications
You must be signed in to change notification settings - Fork 427
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
The color of the tables' body should be set #157
Comments
I actually disagree with this one I'm afraid. My feeling is that DataTables should inherit whatever the body text colour is - that way it will work automatically if you are using it with a dark themed site or with a light themed site. If you need to change it for your site a single line of CSS would be all is needed. Ideally the DataTables stylesheet should be defining as little "theme" styling as possible. |
@DataTables Yes, it should inherit the body text, I agree with you. However, why the background of the table is not inheritable? The font color of the buttons is not inheritable, either. I mean it's inconsistent. In a dark theme, the background of the table doesn't inherit from the parent DOM but the font color does. It results in a table with a white background (because it's hardcoded, but I expect it inherit from the parent and to be "dark") and white font color (inherited). So in a dark theme we can see that all other elements are actually hard-coded but only the font color of the body |
Ah I'm with you now - this example demonstrates it nicely: http://live.datatables.net/hedekori/1/edit . I agree - DataTables' row styling should be using rgba only. I will be updating that in the v2 branch. |
Great! Thanks. So should we leave this issue open or closed? |
Makes sense to leave it open since it is unresolved atm. Thanks! |
Hi,
First of all, I'm using the default theme as an example. It should apply to other themes as well.
Now the default theme of
datatables
sets the "background-color" to "white", but not the "color" of the table. It causes an issue that the users will see a blank table when the color of the whole page is set to "white" (for example, in a dark theme).In addition, from the below screenshot we can know that all other font elements of the table are using
#333
as the font color. The only exception is the table body. I don't know if there's any special reason for doing that.So my suggestion is that
datatables
should set the color to "#333" explicitly.Thanks.
(This issue is originally discussed at rstudio/DT#767 , if you are interested)
When we set the color of the page to white, the content of the table is missing
The text was updated successfully, but these errors were encountered: