Skip to content

Commit 683e86e

Browse files
authored
Markdown improvements
2 parents ea3f075 + 806bd7f commit 683e86e

File tree

4 files changed

+32
-2
lines changed

4 files changed

+32
-2
lines changed

full.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ html, body {
1515
inset: 0;
1616
z-index: 1000;
1717
pointer-events: none;
18-
box-shadow: inset 0 0 0 2px rgb(104 187 228 / 50%);
18+
box-shadow: inset 0 0 0 2px hsl(223deg 86% 64% / 50%);
1919
}
2020

2121
::selection {

lib/codeit.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,8 @@ class CodeitElement extends HTMLElement {
384384
innerHTMLObserver.observe(cd, innerHTMLConfig);
385385

386386

387+
if (cd.edit) {
388+
387389
cd.on('keydown', (event) => {
388390

389391
// get current selection
@@ -504,6 +506,8 @@ class CodeitElement extends HTMLElement {
504506
recordHistory();
505507

506508
});
509+
510+
}
507511

508512

509513
// IDE-style behaviors

live-view/extensions/markdown/markdown-dark.css

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
background: rgba(255, 255, 255, 0.15);
2828
}
2929

30+
:focus-visible {
31+
box-shadow: 0 0 0 2px hsl(223deg 86% 64% / 50%);
32+
outline: none;
33+
}
34+
3035

3136
html {
3237
background: var(--bg-color);
@@ -140,6 +145,27 @@ body li + li {
140145
margin-top: 0.25em;
141146
}
142147

148+
body li:has(> input[type="checkbox"]) {
149+
list-style: none;
150+
margin-left: -1em;
151+
}
152+
153+
body input[type="checkbox"] {
154+
width: 18px;
155+
height: 18px;
156+
margin: 0;
157+
margin-bottom: -3px;
158+
margin-right: 2px;
159+
background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzgyODY4OSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE4IDE5SDZjLS41NSAwLTEtLjQ1LTEtMVY2YzAtLjU1LjQ1LTEgMS0xaDEyYy41NSAwIDEgLjQ1IDEgMXYxMmMwIC41NS0uNDUgMS0xIDF6bTEtMTZINWMtMS4xIDAtMiAuOS0yIDJ2MTRjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yeiIvPjwvc3ZnPg==);
160+
background-size: 100%;
161+
appearance: none;
162+
-webkit-appearance: none;
163+
}
164+
165+
body input[type="checkbox"][checked] {
166+
background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMjRweCIgdmlld0JveD0iMCAwIDI0IDI0IiB3aWR0aD0iMjRweCIgZmlsbD0iIzgyODY4OSI+PHBhdGggZD0iTTAgMGgyNHYyNEgwVjB6IiBmaWxsPSJub25lIi8+PHBhdGggZD0iTTE5IDNINWMtMS4xIDAtMiAuOS0yIDJ2MTRjMCAxLjEuOSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMlY1YzAtMS4xLS45LTItMi0yem0tOC4yOSAxMy4yOWMtLjM5LjM5LTEuMDIuMzktMS40MSAwTDUuNzEgMTIuN2MtLjM5LS4zOS0uMzktMS4wMiAwLTEuNDEuMzktLjM5IDEuMDItLjM5IDEuNDEgMEwxMCAxNC4xN2w2Ljg4LTYuODhjLjM5LS4zOSAxLjAyLS4zOSAxLjQxIDAgLjM5LjM5LjM5IDEuMDIgMCAxLjQxbC03LjU4IDcuNTl6Ii8+PC9zdmc+);
167+
}
168+
143169
body code, body tt {
144170
padding: 0.2em 0.4em;
145171
margin: 0;

service-worker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
// update worker name when updating cached files
3-
const WORKER_NAME = 'codeit-worker-v774';
3+
const WORKER_NAME = 'codeit-worker-v775';
44

55

66
self.importScripts('/worker/client-channel.js');

0 commit comments

Comments
 (0)