design: space out markdown paragraphs

This commit is contained in:
James Xylight committed 2025-08-26 18:55:19 -07:00
1 parent 25c879d173
commit caa58635f9
5 files changed
+6 -16

No files matched your search

@@ -1,6 +1,6 @@
<script lang="ts">
import { tick } from 'svelte'
import type { HTMLTextareaAttributes } from 'svelte/elements'
import type { HTMLAttributes } from 'svelte/elements'
let textarea: HTMLTextAreaElement | undefined = $state()
@@ -11,7 +11,7 @@
textarea.style.height = `${textarea.scrollHeight}px` // Set height to the scrollHeight
}
}
interface Props extends HTMLTextareaAttributes {
interface Props extends HTMLAttributes<HTMLTextAreaElement> {
label?: string | undefined
value: string
required?: boolean
@@ -337,7 +337,6 @@
{/if}
{/if}
<FreeTextInput
type="text"
required
bind:value={data.title}
placeholder={placeholders.get('post')}
+1 -1
View File
@@ -151,7 +151,7 @@
<article
dir="auto"
class={[!noStyle && 'break-words space-y-2 leading-normal', clazz]}
class={[!noStyle && 'break-words space-y-4 leading-normal', clazz]}
{style}
>
<SvelteMarkdown
@@ -9,12 +9,12 @@
let { children } = $props()
</script>
<p class="leading-normal break-words {options.inline ? '' : 'max-w'}">
<p class="leading-[1.7] break-words {options.inline ? '' : 'max-w'}">
{@render children?.()}
</p>
<style>
.max-w {
max-width: 80ch;
max-width: 70ch;
}
</style>
+1 -10
View File
@@ -8,7 +8,7 @@
import { t } from '$lib/i18n/translations'
import { LINKED_INSTANCE_URL } from '$lib/instance.svelte'
import { site } from '$lib/lemmy.svelte.js'
import { Badge, Menu, Spinner } from 'mono-svelte'
import { Menu, Spinner } from 'mono-svelte'
import {
Bars3,
GlobeAlt,
@@ -32,15 +32,6 @@
let { style = '', class: clazz = '' }: Props = $props()
</script>
{#snippet notifBadge(number: number)}
<Badge
color={number > 0 ? 'red-subtle' : 'gray-subtle'}
class="min-w-5 h-5 p-0! px-0.5 grid place-items-center ml-auto"
>
{number > 99 ? '∞' : number}
</Badge>
{/snippet}
<CommandsWrapper bind:open={promptOpen} />
<nav
class={[