useblocks / sphinx-simplepdf

A simple PDF builder for Sphinx documentations
https://sphinx-simplepdf.readthedocs.io
MIT License
32 stars 14 forks source link

[#66] remove 'display: inline-block' from inline code blocks #80

Closed zeddee closed 1 year ago

zeddee commented 1 year ago

Fixes #66

inline code blocks should not be assigned 'display: inline-block' despite their namesake. without inline-block.

Setting display to inline-block turns <code> into a block element, which when applied to an exceptionally long element (i.e. long non-breaking 'pre'-formatted lines) makes ordering and sizing of elements around it weird.


Before:

Screenshot 2023-05-13 at 00 33 11

After removing display: inline-block:

Screenshot 2023-05-13 at 00 31 27

danwos commented 1 year ago

Thanks for this fix :+1:

sachin-suresh-rapyuta commented 1 year ago

Thanks. How do we take the latest changes to our local?

danwos commented 1 year ago

A pip install git+https://github.com/useblocks/sphinx-simplepdf.git should install it from main-branch.

sachin-suresh-rapyuta commented 1 year ago

I think it also needs a fix for the tables? cc: @zeddee

This is a list within a table: image

zeddee commented 1 year ago

that's completely unrelated to the issue with code block styles. text-align: justify is set for all <p> elements in the rendered main.css (https://github.com/useblocks/sphinx-simplepdf/blob/f321ca2c74bfa97aa9ad9e0f5bceedceb3eacaad/sphinx_simplepdf/themes/simplepdf_theme/static/styles/sources/_text.scss#L151), so if you want left-aligned paragraphs, you should set it there.

zeddee commented 1 year ago

No. Please don’t lump unrelated requests into an MR.

On Fri, 2 Jun 2023 at 11:24, Sachin Suresh @.***> wrote:

Thanks @zeddee https://github.com/zeddee . Could you also help me with the below queries:

  1. Can this css style be overwritten from my custom.css file
  2. Where are other styles defined - for example, caption text in TOC, back cover image, code block caption, etc. Is there a way to customize all these on my custom.css file for better handling the PDF output?

— Reply to this email directly, view it on GitHub https://github.com/useblocks/sphinx-simplepdf/pull/80#issuecomment-1573428074, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABTS5C3ECWZV5JVRC2XAFWTXJGWMJANCNFSM6AAAAAAYACCPDI . You are receiving this because you were mentioned.Message ID: @.***>