| 1 |
/** |
| 2 |
* Tables |
| 3 |
*/ |
| 4 |
|
| 5 |
table { |
| 6 |
// default to table-center |
| 7 |
margin-left: auto; |
| 8 |
margin-right: auto; |
| 9 |
|
| 10 |
&.table-right { |
| 11 |
margin-right: 0; |
| 12 |
} |
| 13 |
|
| 14 |
&.table-left { |
| 15 |
margin-left: 0; |
| 16 |
} |
| 17 |
} |
| 18 |
|
| 19 |
// customize table caption from bootstrap |
| 20 |
// to display them on top and centered |
| 21 |
table caption { |
| 22 |
text-align: center; |
| 23 |
caption-side: top; |
| 24 |
color: var(--pst-color-text-muted); |
| 25 |
} |
| 26 |
|
| 27 |
// MyST Markdown tables use these classes to control alignment |
| 28 |
th, |
| 29 |
td { |
| 30 |
&.text-left { |
| 31 |
text-align: left; |
| 32 |
} |
| 33 |
|
| 34 |
&.text-right { |
| 35 |
text-align: right; |
| 36 |
} |
| 37 |
|
| 38 |
&.text-center { |
| 39 |
text-align: center; |
| 40 |
} |
| 41 |
} |
| 42 |
|
| 43 |
// override bootstrap table colors |
| 44 |
.table { |
| 45 |
@include table-colors; |
| 46 |
|
| 47 |
--bs-table-bg: transparent; // background |
| 48 |
--bs-table-color: var( |
| 49 |
--pst-color-text-base |
| 50 |
); // ensure text and bullets are visible |
| 51 |
} |
| 52 |
|
| 53 |
.pst-scrollable-table-container { |
| 54 |
// Put a horizontal scrollbar just below tables that are too wide to fit |
| 55 |
// within the main column |
| 56 |
overflow-x: auto; |
| 57 |
} |