From f4973e01fab1907acbfec6b2e429746d4f1844d4 Mon Sep 17 00:00:00 2001 From: ari Date: Tue, 22 Apr 2025 23:54:45 -0400 Subject: [PATCH 1/2] Added wrap to the postComponent stylesheet --- src/App.svelte | 10 ++++++---- src/lib/PostComponent.svelte | 8 ++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 9e36d30..733320e 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -16,7 +16,11 @@ }); }); // Infinite loading function - const onInfinite = ({ detail: { loaded, complete } } : { detail : { loaded : () => void, complete : () => void}}) => { + const onInfinite = ({ + detail: { loaded, complete }, + }: { + detail: { loaded: () => void; complete: () => void }; + }) => { getNextPosts().then((newPosts) => { console.log("Loading next posts..."); if (newPosts.length > 0) { @@ -53,9 +57,7 @@ {#each posts as postObject} {/each} - +
diff --git a/src/lib/PostComponent.svelte b/src/lib/PostComponent.svelte index 3c4178c..0697fa6 100644 --- a/src/lib/PostComponent.svelte +++ b/src/lib/PostComponent.svelte @@ -213,6 +213,14 @@ #postText { margin: 0; padding: 0; + overflow-wrap: break-word; + word-wrap: break-word; + -ms-word-break: break-all; + word-break: break-word; + -ms-hyphens: auto; + -moz-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; } #headerText { margin-left: 10px; From 3c63c69db77659d801b6ea9163b9660ee349cb81 Mon Sep 17 00:00:00 2001 From: Astra Date: Wed, 23 Apr 2025 13:07:35 +0900 Subject: [PATCH 2/2] Proper line breaks without the hyphens --- src/lib/PostComponent.svelte | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/lib/PostComponent.svelte b/src/lib/PostComponent.svelte index 0697fa6..dc0b874 100644 --- a/src/lib/PostComponent.svelte +++ b/src/lib/PostComponent.svelte @@ -214,13 +214,9 @@ margin: 0; padding: 0; overflow-wrap: break-word; - word-wrap: break-word; - -ms-word-break: break-all; + word-wrap: normal; word-break: break-word; - -ms-hyphens: auto; - -moz-hyphens: auto; - -webkit-hyphens: auto; - hyphens: auto; + hyphens: none; } #headerText { margin-left: 10px;