pressbooks-book icon indicating copy to clipboard operation
pressbooks-book copied to clipboard

Subsequent paragraphs in a table cell do not inherit paragraph styles in the webbook format

Open mcgratay opened this issue 5 years ago • 0 comments

Prerequisites

Description

Additional paragraphs in a table cell don't display the styles that they're supposed to. In McLuhan, for example, the first paragraph in a cell appears in a smaller font and with a lower line-height than the body text for the theme. Any paragraph that comes after the first inherits styles from the body text rather than the font styles meant for text inside tables.

Screen Shot 2020-01-28 at 5 14 01 PM

This error occurs whether the paragraphs are separated with multiple soft returns, or with a hard return.

Screen Shot 2020-01-28 at 5 14 48 PM

Additional notes:

  • Only affects the webbook stylesheet
  • Appears in all tested Buckram themes
  • Affects all table classes

The following CSS seemed to resolve the issue for the user who reported it: .front-matter table p + p, .part table p + p, .chapter table p + p, .back-matter table p + p, body#tinymce.wp-editor table p + p { font-family: inherit; font-size: inherit; line-height: inherit; }

Note that the above CSS won't work on the Malala theme because of the shapeshifter feature.

Example book: https://textintables.textopress.com/

Steps to Reproduce

  1. On a chapter, find the table icon on the editor and click
  2. Hover over Table on the dropdown menu, then select the number of cells you want in your table from the grid
  3. When the table appears, click inside one of the cells and type a paragraph
  4. Enter a hard return, then type the paragraph again within the same cell
  5. Save and view in webbook format

Expected behavior: Table text styles are consistent

Actual behavior: Additional paragraphs within a cell do not inherit the correct text styles

mcgratay avatar Jan 28 '20 22:01 mcgratay