diff --git a/docs/requirements.txt b/docs/requirements.txt index 1ff0c828042..09a11359ae7 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,7 +1,7 @@ matplotlib numpy sphinx-copybutton>=0.3.1 -sphinx-gallery>=0.9.0 +sphinx-gallery>=0.11.1 sphinx==5.0.0 tabulate -e git+https://github.com/pytorch/pytorch_sphinx_theme.git#egg=pytorch_sphinx_theme diff --git a/docs/source/_static/css/custom_torchvision.css b/docs/source/_static/css/custom_torchvision.css index bdc4071c1aa..07346d7b03f 100644 --- a/docs/source/_static/css/custom_torchvision.css +++ b/docs/source/_static/css/custom_torchvision.css @@ -21,3 +21,15 @@ article.pytorch-article .reference.download.internal, article.pytorch-article .s .table-weights p { margin-bottom: 0.2rem !important; } + +/* Fix for Sphinx gallery 0.11 +See https://github.com/sphinx-gallery/sphinx-gallery/issues/990 +*/ +article.pytorch-article .sphx-glr-thumbnails .sphx-glr-thumbcontainer { + width: unset; + margin-right: 0; + margin-left: 0; +} +article.pytorch-article div.section div.wy-table-responsive tbody td { + width: 50%; +}