Skip to content

Commit

Permalink
Various table fixes (#1833)
Browse files Browse the repository at this point in the history
This PR makes a few changes to the _tables.scss file:

- Matches our table alignment classes with an [update to MyST from 2021](executablebooks/MyST-Parser#450) (version [0.16.0](https://github.com/executablebooks/MyST-Parser/releases/tag/v0.16.0))
- Removes the redundant and useless `display: table` and `overflow: auto` rules
- Updates a comment

Fixes #1804.
  • Loading branch information
gabalafou authored May 27, 2024
1 parent 7551fa1 commit aabe57d
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/pydata_sphinx_theme/assets/styles/content/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
table {
@include table-colors;

display: table;
overflow: auto;

// default to table-center
margin-left: auto;
margin-right: auto;
Expand All @@ -33,15 +30,15 @@ table caption {
// MyST Markdown tables use these classes to control alignment
th,
td {
&.text-align\:left {
&.text-left {
text-align: left;
}

&.text-align\:right {
&.text-right {
text-align: right;
}

&.text-align\:center {
&.text-center {
text-align: center;
}
}
Expand All @@ -57,7 +54,7 @@ td {
}

.pst-scrollable-table-container {
// Put a scrollbar just below tables that are too wide to fit within the main
// column
// Put a horizontal scrollbar just below tables that are too wide to fit
// within the main column
overflow-x: auto;
}

0 comments on commit aabe57d

Please sign in to comment.