Forum How do I...?

Display of List item element

hiroyasu
Hello,
Please see the attached PDF, HTML,CSS file.

The p element and span element under the Li element are displayed differently when converted to PDF.
When it is a span element, a line break is not inserted, but when it is a p element, a line break is inserted.
Is there a way to prevent a line breaks when using the p element?


My environment is
Amazon Linux2
Prince 14.2
prince-php-wrapper 1.0.0
PHP 8.0.8
Laravel 8.49.2

Thank you in advance.

  1. test.css4.1 MB
  2. test.html0.7 kB
  3. test.pdf14.5 kB
hiroyasu
I have confirmed that this phenomenon occurs when the same CSS is applied to 'ul >li > p' and 'ul >li > .
hiroyasu
I've got prevented a line breaks when using the p element.
I add the setting under below setting in CSS.
.prose-sm ul > li::before {
@apply block;
}

Thank you in advance.
mikeday
Yes it appears to be caused by the ::before pseudo-element, although with such a large style sheet it's not simple to narrow down everything that is going on.
hiroyasu
Thank you for your reply.