Skip to content

Commit

Permalink
Add header styling to a markdown block
Browse files Browse the repository at this point in the history
  • Loading branch information
badboy committed Feb 12, 2024
1 parent a03aa25 commit b8240cf
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/components/Markdown.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,28 @@
{#if inline}
{@html parseInline(text)}
{:else}
{@html parse(text)}
<div>
{@html parse(text)}
</div>
{/if}

<style lang="scss">
div :global(h1 a),
div :global(h2 a),
div :global(h3 a),
div :global(h4 a),
div :global(h5 a)
{
color: black;
text-decoration: none;
}
div :global(h1 a:hover),
div :global(h2 a:hover),
div :global(h3 a:hover),
div :global(h4 a:hover),
div :global(h5 a:hover)
{
text-decoration: underline;
}
</style>

0 comments on commit b8240cf

Please sign in to comment.