Skip to content

Commit

Permalink
Fixes #289: Inconsistent table typography sizing (#1215)
Browse files Browse the repository at this point in the history
* Fix table typography inconsistent sizing

* Remove rule duplication

* Remove <ol> and fix build

* Build new theme.css for #1215

* Add an example rendering with paragraphs inside tables

* build theme.css for #1215

Co-authored-by: Benjamin Bach <[email protected]>
  • Loading branch information
nienn and benjaoming authored Aug 26, 2022
1 parent 90463f0 commit b2f52f4
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
23 changes: 23 additions & 0 deletions docs/demo/lists_tables.rst
Original file line number Diff line number Diff line change
Expand Up @@ -346,3 +346,26 @@ List Tables

This is a long caption for a figure. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Donec porttitor dolor in odio posuere, vitae ornare libero mattis. In lobortis justo vestibulum nibh aliquet, non.


Tables with paragraphs
----------------------

.. regression test for https://github.com/readthedocs/sphinx_rtd_theme/issues/289
Test to see that tables behave well with nested paragraphs.

+------------+----------+-------------------------+
| Precedence | Operator | Description |
+============+==========+=========================+
| 1 | \:: | Scope resolution |
+------------+----------+-------------------------+
| 2 | ( ) | Function call |
| | | |
| | [ ] | Subscript |
| | | |
| | . | Member access |
| | | |
| | .{ } | Bit-field concatenation |
+------------+----------+-------------------------+

2 changes: 1 addition & 1 deletion sphinx_rtd_theme/static/css/theme.css

Large diffs are not rendered by default.

7 changes: 6 additions & 1 deletion src/sass/_theme_rst.sass
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@
&:hover .headerlink
opacity: 1

// Consistent font sizing for table typography
.wy-table
th, td
p, ul
font-size: inherit

// override the Wyrm accessibility anti-pattern of hiding button focus
.btn:focus
outline: 2px solid
Expand Down Expand Up @@ -378,7 +384,6 @@
td
border: none
p
font-size: inherit
line-height: inherit
td > strong
display: inline-block
Expand Down

0 comments on commit b2f52f4

Please sign in to comment.