question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The color of the tables' body should be set

See original GitHub issue

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 https://github.com/rstudio/DT/pull/767 , if you are interested)

When we set the color of the page to white, the content of the table is missing

image

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
DataTablescommented, Mar 18, 2020

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.

0reactions
DataTablescommented, Mar 18, 2020

Makes sense to leave it open since it is unresolved atm. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Table Colors & Background : MGA - Web Development Tutorials
Tables can have outer border colors as well as cell border colors. They also can have background colors, patterns, and graphic images as...
Read more >
<tbody>: The Table Body element - HTML - MDN Web Docs
This attribute is used to indicate the number of characters to offset the column data from the alignment characters specified by the char ......
Read more >
HTML Table Basics
To change the background color, use the attribute bgcolor="color". The table below has its background color set to #00ff00 with a table tag...
Read more >
Table Background Color - HTML.am
This page demonstrates how to set the table background color within your web pages and other HTML documents. You can use the same...
Read more >
HTML Table Background Color - Quackit Tutorials
In HTML, table background color is specified using Cascading Style Sheets (CSS). In particular, you use the CSS background-color property to set the ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found