diff options
author | Ilion Beyst <ilion.beyst@gmail.com> | 2022-09-14 20:50:47 +0200 |
---|---|---|
committer | Ilion Beyst <ilion.beyst@gmail.com> | 2022-09-14 20:50:47 +0200 |
commit | 1a5755f0a3aa239f2eb64ed2cb065254e560f0c4 (patch) | |
tree | 402e4ac9c3d784201929c1915fb3216c52a0d878 /web | |
parent | 3eedbc0b855f468804ddc4e6ef6f207200550022 (diff) | |
download | planetwars.dev-1a5755f0a3aa239f2eb64ed2cb065254e560f0c4.tar.xz planetwars.dev-1a5755f0a3aa239f2eb64ed2cb065254e560f0c4.zip |
add basic markdown document styling
Diffstat (limited to 'web')
-rw-r--r-- | web/pw-server/src/routes/docs/doc.svelte | 8 | ||||
-rw-r--r-- | web/pw-server/src/styles/global.scss | 1 | ||||
-rw-r--r-- | web/pw-server/src/styles/markdown.scss | 37 |
3 files changed, 40 insertions, 6 deletions
diff --git a/web/pw-server/src/routes/docs/doc.svelte b/web/pw-server/src/routes/docs/doc.svelte index ed08270..5b2c686 100644 --- a/web/pw-server/src/routes/docs/doc.svelte +++ b/web/pw-server/src/routes/docs/doc.svelte @@ -1,15 +1,11 @@ -<div class="container"> +<div class="container markdown-body"> <slot /> </div> -<style scoped lang="scss"> +<style lang="scss"> @use "src/styles/variables"; .container { max-width: 800px; - color: rgb(36, 41, 47); } - .container a { - color: variables.$blue-primary; - } </style> diff --git a/web/pw-server/src/styles/global.scss b/web/pw-server/src/styles/global.scss index 642d54a..2278dd4 100644 --- a/web/pw-server/src/styles/global.scss +++ b/web/pw-server/src/styles/global.scss @@ -1,3 +1,4 @@ @forward "./variables.scss"; @forward "./buttons.scss"; @forward "./prism.scss"; +@forward "./markdown.scss"
\ No newline at end of file diff --git a/web/pw-server/src/styles/markdown.scss b/web/pw-server/src/styles/markdown.scss new file mode 100644 index 0000000..d5ed2fa --- /dev/null +++ b/web/pw-server/src/styles/markdown.scss @@ -0,0 +1,37 @@ +@use "./variables.scss"; + +.markdown-body { + color: rgb(36, 41, 47); + font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, + "Open Sans", "Helvetica Neue", sans-serif; + + + a { + color: variables.$blue-primary; + } + + code { + color: darken(#e3116c, 5%); + font-family: "Consolas", "Bitstream Vera Sans Mono", "Courier New", Courier, monospace; + direction: ltr; + text-align: left; + white-space: pre; + word-spacing: normal; + word-break: normal; + font-size: 0.9em; + line-height: 1.2em; + + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; + + -webkit-hyphens: none; + -moz-hyphens: none; + -ms-hyphens: none; + hyphens: none; + } + + li { + padding: .5em; + } +}
\ No newline at end of file |