Skip to content

Commit 197bca5

Browse files
committed
Some styles for markdown
1 parent 936bb2e commit 197bca5

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

code-flask.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ export default class CodeFlaskElement extends HTMLElement {
66
this.attachShadow({ mode: 'open' })
77
this.shadowRoot.innerHTML += `<style> :host { display: block; position: relative;
88
overflow-x: auto; min-height: 100px; }
9-
.codeflask .token.punctuation { color: var(--codeflask-punctuation, #4a4a4a) }
9+
.codeflask .token.title { color: var(--codeflask-title, #000) }
10+
.codeflask .token.punctuation { color: var(--codeflask-punctuation, #6a6a6a) }
1011
.codeflask .token.keyword { color: var(--codeflask-keyword, #8500ff) }
1112
.codeflask .token.operator { color: var(--codeflask-operator, #ff5598) }
1213
.codeflask .token.string { color: var(--codeflask-string, #41ad8f) }
@@ -18,6 +19,9 @@ export default class CodeFlaskElement extends HTMLElement {
1819
.codeflask .token.property { color: var(--codeflask-property, #8500ff) }
1920
.codeflask .token.tag { color: var(--codeflask-tag, #8500ff) }
2021
.codeflask .token.attr-value { color: var(--codeflask-attr-value, #8500ff) }
22+
.codeflask .token.url { color: var(--codeflask-url, #4040ff) }
23+
.codeflask .token.italic { font-style: italic }
24+
.codeflask .token.bold { font-weight: bolder }
2125
</style>`
2226
this.editorElement = document.createElement('div')
2327
this.editorElement.style.width = '100%'

demo.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ <h1>
2929

3030
<script type="module">
3131
import './dist/code-flask.module.js'
32+
// NOTE: you can add prism languages here like:
33+
// import './node_modules/prismjs/components/prism-markdown.min.js'
3234
</script>
3335

3436
<code-flask id="cfdemo" language="markup">x</code-flask>

0 commit comments

Comments
 (0)