Improve word wrapping

This patch improves word wrapping for the description text in book
details by justifying the text block and allowing for words to be
wrapped by automatically inserting hyphens if necessary.

This causes the description box to look far less ragged on the right
edge which I think helps the overall cleanliness of the look.

Unfortunately the app's/browser's aren't as good as e.g. the TeX
algorithm for hyphening and there are JavaScript libraries which seem to
reimplement that. But this is already a significant step up and far less
work for something which is not the main focus of this app.
This commit is contained in:
Lars Kiesow 2023-02-10 23:27:33 +01:00
parent e8c6fc635f
commit a185c3abe9
No known key found for this signature in database
GPG key ID: 5DAFE8D9C823CE73

View file

@ -127,7 +127,7 @@
</div>
<div class="w-full py-4">
<p class="text-sm">{{ description }}</p>
<p class="text-sm text-justify" style="hyphens: auto;">{{ description }}</p>
</div>
<tables-podcast-episodes-table v-if="isPodcast" :library-item="libraryItem" :local-library-item-id="localLibraryItemId" :episodes="episodes" :local-episodes="localLibraryItemEpisodes" :is-local="isLocal" />