From aabe57deb0190ba94adb0b416c8cc50ce79bf5f1 Mon Sep 17 00:00:00 2001 From: gabalafou Date: Mon, 27 May 2024 05:54:01 -0400 Subject: [PATCH] Various table fixes (#1833) This PR makes a few changes to the _tables.scss file: - Matches our table alignment classes with an [update to MyST from 2021](https://github.com/executablebooks/MyST-Parser/pull/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. --- .../assets/styles/content/_tables.scss | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/pydata_sphinx_theme/assets/styles/content/_tables.scss b/src/pydata_sphinx_theme/assets/styles/content/_tables.scss index e6ae236f6..75149742c 100644 --- a/src/pydata_sphinx_theme/assets/styles/content/_tables.scss +++ b/src/pydata_sphinx_theme/assets/styles/content/_tables.scss @@ -6,9 +6,6 @@ table { @include table-colors; - display: table; - overflow: auto; - // default to table-center margin-left: auto; margin-right: auto; @@ -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; } } @@ -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; }