Page wrapping creates empty element
See original GitHub issueDescribe the bug
Sometimes single line text element gets wrapped at the top or bottom of a page. This creates an empty element on the other page. It does not look good when there is a parent with some backgroudColor
.
Expected behavior
Single line Text
should never get page wrapped, or is there a case I am missing ?
Screenshots
Desktop (please complete the following information):
- OS: MacOS, Ubuntu
- node.js
- React-pdf version 1.4.2
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Empty HTML elements wraps the other with its content ...
Empty HTML elements wraps the other with its content unintentionally · Can I check where the problem is: is the page output ok...
Read more >Wrapping and breaking text - CSS: Cascading Style Sheets
This guide explains the various ways in which overflowing text can be managed in CSS.
Read more >white-space - CSS-Tricks
The CSS white-space property controls how text is handled on the element it is applied to. Let's say you have HTML exactly like...
Read more >What are empty elements in HTML ? - GeeksforGeeks
An element that does not have an enclosing tag is called an empty element. Adding the closing tags to the empty elements will...
Read more >HTML br tag - W3Schools
The <br> tag inserts a single line break. The <br> tag is useful for writing addresses or poems. The <br> tag is an...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @diegomura !
I just took the time to test it again. Here are the results :
It is still present, but as I look at it now, I am not sure that it should be considered a bug… I fixed it quite easily with the
wrap
prop. Given the workaround and the absence of other complaints on the matter, I think it’s better to leave it as is and focus on other stuff !Note : a simple workaround is to set
wrap={false}
, but I figured it was worth mentioning anyway.