Quantcast
Channel: Active questions tagged svelte - Stack Overflow
Viewing all articles
Browse latest Browse all 1541

Styling Markdown output

$
0
0

I'm using Sveltekit & SCSS for my development.

I've been trying to use the marked npm package to get Markdown onto my site. I've been able to get markdown working, but having trouble styling the output that it's displaying. All of this is within a .svelte page.

This is a the code for the output of the Markdown

import { marked } from 'marked';import DOMPurify from 'dompurify';let markdownContent = '';let clean;markdownContent = setups[0].description;clean = DOMPurify.sanitize(marked(markdownContent));

This is the output of the Markdown codeMarkdown outputDev tools output

I've tried adding in css at a global level for example h1, h2, h3, etc. But no styles I do apply to the markdown that is being output.

I've looked into my css and everything else has a style applied so i can only believe it's working correctly.


Viewing all articles
Browse latest Browse all 1541

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>