-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add code snippet blocks and add highlights to <code> in docs page #92
Conversation
Add snippets to use page and fix styling of the snippet
Code cleanup
src/routes/docs/+page.svelte
Outdated
.number > :global(svg) { | ||
color: rgb(var(--m3-scheme-on-primary-container)); | ||
color: inherit; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can drop this declaration entirely
src/routes/docs/Snippet.svelte
Outdated
<Button on:click={copyToClipboard} type="text" iconType="full"> | ||
<Icon icon={iconCopy} /> | ||
</Button> | ||
<svelte:component this={Snackbar} bind:show={snackbar} /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just use <Snackbar bind:show={snackbar} />
src/routes/docs/Snippet.svelte
Outdated
padding-inline-start: 1rem; | ||
box-sizing: border-box; | ||
padding-block: 1rem; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't like how the paddings are all over the place, i would just use a padding: a b c d
shorthand here
import Icon from "$lib/misc/_icon.svelte"; | ||
import ButtonLink from "$lib/buttons/ButtonLink.svelte"; | ||
import Snippet from "./Snippet.svelte"; | ||
import { base } from "$app/paths"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
irrelevant formatting change
I've added snippets like mentioned in #81. I've also created highlights around
<code>
tag to make it more readable. Feel free to change color tokens if needed.