Open eecavanna opened 2 hours ago
Note: I used these commands to build the documentation locally (for testing).
git clone https://github.com/microbiomedata/metaMAGs.git
cd ./metaMAGs/docs
docker run --rm -it -v .:/docs sphinxdoc/sphinx sphinx-build -M html . _build
Then, I opened file:///path/to/metaMAGs/docs/_build/html/index.html
in my web browser (to preview the result).
Broken version
Underlying code (in
.rst
file):Fixed version
Underlying code (in
.rst
file):Remarks
When
scale
is specified, the resulting HTML markup includes some inline styles, as shown here:That is forcing the web browser to show the image with a height that is some predefined number of pixels (in this case, 409.5; but any other constant would cause the same issue).
Meanwhile, the web browser is setting the width to be whatever its container allows it to be, which (a) depends on the page layout, (b) can vary as the viewport width varies, and (c) is generally not 1248.0 pixels (although it may happen by coincidence).
I will open a PR containing the fix.