gt
gt copied to clipboard
Change CSS so that table defaults have low specificity
Prework
- [x] Read and abide by gt's code of conduct and contributing guidelines.
- [x] Search for duplicates among the existing issues (both open and closed).
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;
}
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.