md: add max-w to paragraphs
This commit is contained in:
1 parent
5129cb36ae
commit
0bd9631fc0
3 files changed
+16
-2
No files matched your search
@@ -92,6 +92,9 @@
|
||||
|
||||
export let source: string = ''
|
||||
export let inline: boolean = false
|
||||
|
||||
options.inline = inline
|
||||
|
||||
export let noStyle: boolean = false
|
||||
|
||||
$: tokens = marked.lexer(source)
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
<p class="leading-[1.5]">
|
||||
<script>
|
||||
import { options } from '../Markdown.svelte'
|
||||
</script>
|
||||
|
||||
<p class="leading-[1.5] {options.inline ? '' : 'max-w'}">
|
||||
<slot />
|
||||
</p>
|
||||
|
||||
<style>
|
||||
.max-w {
|
||||
max-width: 80ch;
|
||||
}
|
||||
</style>
|
||||
Reference in new issue
Block a user