Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to specify maximum allowed space between words? #2268

Closed
ondras opened this issue Oct 6, 2024 · 2 comments
Closed

How to specify maximum allowed space between words? #2268

ondras opened this issue Oct 6, 2024 · 2 comments
Labels
CSS Questions about how to do something with CSS

Comments

@ondras
Copy link

ondras commented Oct 6, 2024

I am trying to justify my paragraphs and I am not very happy with the result (see #2264). However, I think that even the default fast'n'dirty line breaking algorithm could do better, especially when I see the same HTML+CSS being rendered more nicely in a browser.

In this example rendering:
obrazek

  • the first line has too large inter-word spaces
  • the second line has a non-breakable space after i

I have hyphenation turned on (lang=cs). In my opinion, hyphenating at i jedno | tlivých or i jed | notlivých would result in the first line having better/smaller spacing. Is there a way to define the "maximum allowed space between words"?

@ondras
Copy link
Author

ondras commented Oct 7, 2024

Update: I think the problem is caused by #2270 instead.

@liZe
Copy link
Member

liZe commented Oct 9, 2024

Update: I think the problem is caused by #2270 instead.

Yes, the current algorithm should hyphenate as soon as it can, unless hyphenate-limit-zone is set.

Let’s continue the discussion on #2270.

@liZe liZe closed this as not planned Won't fix, can't repro, duplicate, stale Oct 9, 2024
@liZe liZe added the CSS Questions about how to do something with CSS label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CSS Questions about how to do something with CSS
Projects
None yet
Development

No branches or pull requests

2 participants