openstackdocstheme sphinx theme doesn't insert padding after a table

Bug #1439918 reported by Tom Fifield
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-manuals
Fix Released
Medium
Bernd Bausch

Bug Description

If you have a table followed by a code block, the theme will render them as directly next to each other. I think it makes sense to have at least a small amount of space between the bottom of the table and the next block

To test - something like this:

========== ====================== =============================
Parameter Description Values
========== ====================== =============================
cake cake cake
========== ====================== =============================

.. code-block:: python
    pass

Lana (loquacity)
Changed in openstack-manuals:
status: New → Confirmed
Changed in openstack-manuals:
importance: Undecided → Medium
Revision history for this message
Bernd Bausch (berndbausch) wrote :

This is not limited to a code block after a table, but also a normal text paragraph after a table <p>. My guess is that any element will follow a table without sufficient space.

Using pure Sphinx without openstackdocstheme, there is a space. Firebug reveals that the table itself has no margins around it, but a paragraph coming after a table has an upper and a lower margin. With openstackdocstheme, the paragraph has no upper margin, which explains the lack of vertical space.

I would investigate how upper margins can be added to all affected elements and if this would break openstackdocstheme somewhere else. Right now I can't commit the time for this.

Revision history for this message
Tom Fifield (fifieldt) wrote :

Thanks for the excellent detective work, Bernd!

Changed in openstack-manuals:
milestone: none → mitaka
status: Confirmed → Triaged
Revision history for this message
Bernd Bausch (berndbausch) wrote :

bootstrap.min.css explicitly sets the top margin of a paragraph to 0:

p {
 margin:0 0 10px
}

Changing the first 0 to 10px immediately has the wanted effect.

Margins around code blocks are defined in a different way I don't understand yet.

Changed in openstack-manuals:
assignee: nobody → Bernd Bausch (berndbausch)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to openstackdocstheme (master)

Fix proposed to branch: master
Review: https://review.openstack.org/232427

Changed in openstack-manuals:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to openstackdocstheme (master)

Reviewed: https://review.openstack.org/232427
Committed: https://git.openstack.org/cgit/openstack/openstackdocstheme/commit/?id=9d1a9699cd84e785a141af453e0daef20e36fc26
Submitter: Jenkins
Branch: master

commit 9d1a9699cd84e785a141af453e0daef20e36fc26
Author: Bernd <email address hidden>
Date: Thu Oct 8 18:03:36 2015 +0900

    Add table padding to openstackdocstheme CSS

    This patch adds white space below a table to make it look nicer.

    Change-Id: I7148ba6dc1e0e01ee0eceeb3a90bcc2591c0b0c5
    Closes-Bug: #1439918

Changed in openstack-manuals:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.