Skip to content

image align and margins #4023

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

Closed
wrobell opened this issue May 17, 2018 · 7 comments · Fixed by pypa/readme_renderer#114
Closed

image align and margins #4023

wrobell opened this issue May 17, 2018 · 7 comments · Fixed by pypa/readme_renderer#114
Assignees
Labels

Comments

@wrobell
Copy link

wrobell commented May 17, 2018

Describe the bug
In long description of a project, an image is specified with

.. image:: https://gitlab.com/wrobell/remt/raw/master/examples/rm.png
   :align: center

Unfortunately, the image is not centered. Also, there is no margin between the image and the preceding paragraph.

Expected behavior

  1. The image is centered.
  2. There is an appropriate margin between the image and preceding paragraph.

To Reproduce
Please see bottom of the following page https://pypi.org/project/remt/.

My Platform
Browser: Chrome/Chromium

@mila
Copy link
Contributor

mila commented Jul 28, 2018

I will look into this.

@nlhkabu
Copy link
Contributor

nlhkabu commented Jul 28, 2018

Assigned to @mila at the EuroPython sprints :)

@mila
Copy link
Contributor

mila commented Jul 28, 2018

See pypa/readme_renderer#112 for a root cause.
If that's fixed, we can add styles .align-{left,right,center} classes.

nlhkabu pushed a commit that referenced this issue Jul 31, 2018
CSS code inspired on Spinx.

Dependes on fixing pypa/readme_renderer#112.
@di
Copy link
Member

di commented Sep 17, 2018

@mila The new version of readme_renderer will get deployed in a bit once #4717 is merged, are you able to add the necessary styles once that happens?

@mila
Copy link
Contributor

mila commented Sep 17, 2018

The styles should be already present. Merged in #4391.

@dstufft
Copy link
Member

dstufft commented Sep 18, 2018

I'm reopening this issue, because the code in readme-renderer that was merged as a result of pypa/readme_renderer#114 isn't actually going to work in all (most?) cases due to the reliance on the inline style attribute, which Warehouse blocks from working using our CSP policy, which we won't be relaxing.

readme_renderer will need to emit css classes instead of inline styles in all casses.

@dstufft
Copy link
Member

dstufft commented Sep 18, 2018

Actually going to close this again, since it was pointed out in pypa/readme_renderer#112 (comment) that this issue was about alignment, which is using classes, not about sizes which does not.

@dstufft dstufft closed this as completed Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants