Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align center on figure does not respect width setting #103

Closed
Luthaf opened this issue Mar 17, 2021 · 5 comments
Closed

Align center on figure does not respect width setting #103

Luthaf opened this issue Mar 17, 2021 · 5 comments
Labels
bug Something isn't working

Comments

@Luthaf
Copy link

Luthaf commented Mar 17, 2021

Describe the bug

I have the following rst (I can create a standalone example if that helps):

.. figure:: some-image.svg
    :width: 400px
    :align: center

I would expect that the resulting HTML renders the images centred in the main column, but with the requested width. Instead, the image takes half of the main column width (352px in my case), regardless of the requested width.

Desktop (please complete the following information):

  • OS: macOS 14.6
  • Browser: Chrome & Firefox & Safari all render the same
@Luthaf Luthaf added the bug Something isn't working label Mar 17, 2021
@pradyunsg
Copy link
Owner

Thanks for reporting this!

A standalone example would be super helpful!

@Luthaf
Copy link
Author

Luthaf commented Mar 18, 2021

Here is a standalone reproduction of this bug:
furo-bug.zip

Using furo, the image is quite small:

furo

While using alabaster, it takes the full width:

alabaster

@pradyunsg
Copy link
Owner

Okay, I love this reproducer. You definitely made my day a lot better with this. ^>^

@pradyunsg
Copy link
Owner

1ff0ae2 should fix this! I'll cut a release over the weekend. :)

@Luthaf
Copy link
Author

Luthaf commented Mar 18, 2021

thanks a lot!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants