pressbooks-book
pressbooks-book copied to clipboard
Subsequent paragraphs in a table cell do not inherit paragraph styles in the webbook format
Prerequisites
- [x] Can you reproduce the behavior you wish to address with all plugins except Pressbooks deactivated?
- [x] Are you running the latest version of Pressbooks, the latest version of McLuhan, and the latest version of WordPress?
- [x] Are you experiencing the issue while using this book theme?
- [x] Did you perform a cursory search to see if your bug or enhancement is already listed?
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.
This error occurs whether the paragraphs are separated with multiple soft returns, or with a hard return.
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
- On a chapter, find the table icon on the editor and click
- Hover over Table on the dropdown menu, then select the number of cells you want in your table from the grid
- When the table appears, click inside one of the cells and type a paragraph
- Enter a hard return, then type the paragraph again within the same cell
- 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