Skip to content

Commit

Permalink
Make the editor font identical to non-editable code blocks.
Browse files Browse the repository at this point in the history
  • Loading branch information
rblank committed Sep 6, 2024
1 parent d1e37e1 commit 8f81174
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/demo/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ When set, the `{exec}` block is made editable.
```
```{rst:directive:option} when: value
:type: click | load | never
Determines when the block's code is executed: on a click by the user (`click`),
when the page loads (`load`) or not at all (`never`).
Determines when the block's code is executed: on user request (`click`, the
default), when the page loads (`load`) or not at all (`never`).
```
````

Expand Down
1 change: 0 additions & 1 deletion tdoc/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ class Exec(CodeBlock):
option_spec = CodeBlock.option_spec | {
'after': directives.unchanged,
'editable': directives.flag,
# TODO: Split :when: into :immediate: and :controls:
'when': lambda c: directives.choice(c, ('click', 'load', 'never')),
}

Expand Down
4 changes: 4 additions & 0 deletions tdoc/common/static/styles/t-doc.css
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ div.tdoc-exec.tdoc-editable div.cm-editor {
div.tdoc-exec.tdoc-editable div.cm-focused {
outline: none;
}
div.tdoc-exec.tdoc-editable div.cm-editor div.cm-scroller {
font-family: var(--pst-font-family-monospace);
font-size: .875em;
}

/* Execution controls */
div[class*=highlight-].tdoc-exec {
Expand Down

0 comments on commit 8f81174

Please sign in to comment.