minor tweaks + notes...

Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-11-04 00:38:13 +03:00
parent 77e9a6ba2f
commit 3375ba26d7
3 changed files with 17 additions and 8 deletions

View File

@ -617,22 +617,29 @@
& pre,
&>code,
& :not(pre)>code {
padding: 0.1em 0.3em;
font-family: monospace;
background: rgba(0,0,0,0.07);
border-radius: 0.2em;
outline: none;
}
& :not(pre)>code {
padding: 0.1em 0.3em;
}
& pre>code {
--padding: 0.6em;
display: block;
min-width: calc(100% - var(--padding) * 2);
width: fit-content;
padding: 0.6em 0.6em;
padding-bottom: 0.8em;
padding: var(--padding) var(--padding);
padding-bottom: calc(var(--padding) + 0.2em);
outline: none;
}
/* scrollbar... */
& pre {
margin: 0.8em 0em;
overflow-x: visible;
overflow-y: auto;

View File

@ -185,7 +185,7 @@ var quoted = {
quote: function(_, code){
return `<code>${ this.encode(code) }</code>` },
pre_pattern: /(?<!\\)```(.*\s*\n)((\n|.)*?)\h*(?<!\\)```/g,
pre_pattern: /(?<!\\)```(.*\s*\n)((\n|.)*?)\h*(?<!\\)```(?:[ \t]*$|[ \t]*\n)/g,
pre: function(_, language, code){
language = language.trim()
language = language ?

View File

@ -59,9 +59,6 @@ var setup = function(){
- custom element / web component
- BUG: selecting by _click-n-drag_ or _double/triple click_ for some reason does not work...
- BUG/race: the non-value versions of custom elem seem to sometimes get loaded as empty...
- Q: can we get rid of the editor block??:
- CSS breaks if we do...
- need to figure out a way to handle autofocus for host/editor uniformly
- DONE data interface:
collapsed:: true
- the "natural" way to pass data is to use the same mechanism as `<textarea>` the problem is that we can't extend `HTMLTextAreaElement` as it can not have shadow dom (reject?)
@ -71,9 +68,13 @@ var setup = function(){
- DONE `.value` / `.code` should be both updated internally and also load new content when updated externally -- not yet sure how...
- events
- test nesting...
- Q: can we get rid of the editor block??:
- CSS breaks if we do...
- need to figure out a way to handle autofocus for host/editor uniformly
-
- selection
- multiple node selection (via shift+motion)
- DONE multiple node selection (via shift+motion)
- fixed state -- while `shift` pressed select or deselect only depending on first action (a-la FAR)
- touch/mouse (???)
- Q: should we select text (mouse/touch) without first focusing??
- _...logseq does not do this either_
@ -134,6 +135,7 @@ var setup = function(){
- search?
- _...not sure if search should be internal or external yet..._
- DONE add horizontal scroll to code blocks...
collapsed:: true
- ```html
<outline-editor session-storage="outline-text" value="initial text"></outline-editor>
```