Skip to content

Commit b2f52f4

Browse files
niennbenjaoming
andauthored
Fixes #289: Inconsistent table typography sizing (#1215)
* 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]>
1 parent 90463f0 commit b2f52f4

File tree

3 files changed

+30
-2
lines changed

3 files changed

+30
-2
lines changed

docs/demo/lists_tables.rst

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,3 +346,26 @@ List Tables
346346

347347
This is a long caption for a figure. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
348348
Donec porttitor dolor in odio posuere, vitae ornare libero mattis. In lobortis justo vestibulum nibh aliquet, non.
349+
350+
351+
Tables with paragraphs
352+
----------------------
353+
354+
.. regression test for https://github.com/readthedocs/sphinx_rtd_theme/issues/289
355+
356+
Test to see that tables behave well with nested paragraphs.
357+
358+
+------------+----------+-------------------------+
359+
| Precedence | Operator | Description |
360+
+============+==========+=========================+
361+
| 1 | \:: | Scope resolution |
362+
+------------+----------+-------------------------+
363+
| 2 | ( ) | Function call |
364+
| | | |
365+
| | [ ] | Subscript |
366+
| | | |
367+
| | . | Member access |
368+
| | | |
369+
| | .{ } | Bit-field concatenation |
370+
+------------+----------+-------------------------+
371+

sphinx_rtd_theme/static/css/theme.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/sass/_theme_rst.sass

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,12 @@
225225
&:hover .headerlink
226226
opacity: 1
227227

228+
// Consistent font sizing for table typography
229+
.wy-table
230+
th, td
231+
p, ul
232+
font-size: inherit
233+
228234
// override the Wyrm accessibility anti-pattern of hiding button focus
229235
.btn:focus
230236
outline: 2px solid
@@ -378,7 +384,6 @@
378384
td
379385
border: none
380386
p
381-
font-size: inherit
382387
line-height: inherit
383388
td > strong
384389
display: inline-block

0 commit comments

Comments
 (0)