Text alignment combined with whitespace styling not correctly interpreted
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 11.2k
- Forks
- 1.8k
- PR merge metrics
- No merged PRs in 30d
Description
When text is styled with both whitespace and text alignment declarations the spacing and layout of the text is not always correctly interpreted.
For example, if the white-space styling is pre or pre-wrap then the spacing should not be adjusted to justify the text.
<html>
<head>
</head>
<body>
<div style="background: #c0c0c0; font-family: Courier; font-weight: normal; text-align: justify; white-space:pre-line;">LOOK AT SOME OF THESE TEST VALUES LOOK AT SOME OF
THESE TEST VALUES LOOK AT SOME OF THESE TEST VALUES LOOK AT SOME
OF THESE TEST VALUES LOOK AT SOME OF THESE TEST VALUES LOOK AT SOME
OF THESE TEST VALUES LOOK AT SOME OF THESE TEST VALUES LOOK AT
SOME OF THESE TEST VALUES LOOK AT SOME OF THESE TEST VALUES LOOK AT SOME OF THESE TEST VALUES</div>
</body>
</html>
TODO: investigate further, this is based on browser rendering, not all combinations tested
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No files, tests, or entry points are named. Start by reproducing the supplied HTML in dompdf and a browser, then trace the handling of text-align with white-space: pre, pre-wrap, and pre-line; done means spacing and layout match the expected browser behavior without unjustified text.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css, html, php
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100