gt icon indicating copy to clipboard operation
gt copied to clipboard

Change CSS so that table defaults have low specificity

Open cscheid opened this issue 3 years ago • 1 comments

Prework

Proposal

html {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', 'Fira Sans', 'Droid Sans', Arial, sans-serif;
}

.gt_table {
  display: table;
  border-collapse: collapse;
  margin-left: auto;
  margin-right: auto;
  color: #FFFFFF;
  font-size: 16px;
  font-weight: normal;
  font-style: normal;
  width: auto;
  border-top-style: solid;
  border-top-width: 2px;
  border-top-color: #A8A8A8;
  border-right-style: none;
  border-right-width: 2px;
  border-right-color: #D3D3D3;
  border-bottom-style: solid;
  border-bottom-width: 2px;
  border-bottom-color: #A8A8A8;
  border-left-style: none;
  border-left-width: 2px;
  border-left-color: #D3D3D3;
}

.gt_heading {
  text-align: center;
  border-left-style: none;
  border-left-width: 1px;
  border-left-color: #D3D3D3;
  border-right-style: none;
  border-right-width: 1px;
  border-right-color: #D3D3D3;
}

#dbgyypyluh .gt_table {
  background-color: #FF0000;
}

cscheid avatar Aug 16 '22 20:08 cscheid

A suggestion in https://github.com/quarto-dev/quarto-cli/discussions/10512#discussioncomment-10388292

the entire style tag be replaced by a link element with a data URI?

As noted in https://github.com/rstudio/gt/discussions/1157, keeping all css elements for each table can get the document to become quite chunky.

olivroy avatar Aug 30 '24 12:08 olivroy