Skip to content

Commit

Permalink
notes + fix + cleanup...
Browse files Browse the repository at this point in the history
Signed-off-by: Alex A. Naanou <[email protected]>
  • Loading branch information
flynx committed Oct 25, 2023
1 parent e2092e8 commit bf8ac4e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 23 deletions.
44 changes: 23 additions & 21 deletions experiments/outline-editor/editor.css
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,13 @@
display: none;
}

.editor .children {
}

.editor .header,
.editor .outline {
display: block;
position: relative;

padding: 1em var(--outline-padding);
padding-bottom: 1.2em
}

/* virtual empty block... */
.editor .outline:empty:after {
content: "Empty";
display: block;
font-style: italic;
color: rgba(0,0,0,0.2);
}
.editor .outline:empty:hover:after {
}

/* header */
.editor .header {
margin: 1em var(--outline-padding);
padding-bottom: 1.2em;

border-bottom: solid 1px rgba(0,0,0,0.15);
}
.editor .header:empty {
display: none;
Expand All @@ -91,6 +74,25 @@
}


.editor .outline {
display: block;
position: relative;

padding: 1em var(--outline-padding);
padding-bottom: 1.2em;
}

/* virtual empty block... */
.editor .outline:empty:after {
content: "Empty";
display: block;
font-style: italic;
color: rgba(0,0,0,0.2);
}
.editor .outline:empty:hover:after {
}


.editor .outline .block {
position: relative;
outline: none;
Expand Down
2 changes: 1 addition & 1 deletion experiments/outline-editor/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ var Outline = {
// ...putting the same pattern in a normal group and
// returning it works fine...
//.replace(/(?<=[\n\h]*)(?:(?:\n|^)\s*\w*\s*::\s*[^\n]*\s*)*$/,
.replace(/([\n\t ]*)(?:(?:\n|^)[\t ]*\w*[\t ]*::[\t ]*[^\n]*[\t ]*)+$/,
.replace(/([\n\t ]*)(?:(?:\n|^)[\t ]*\w+[\t ]*::[\t ]*[^\n]+[\t ]*)+$/,
function(match, ws){
var attrs = match
.trim()
Expand Down
2 changes: 1 addition & 1 deletion experiments/outline-editor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
-
- ## ToDo:
- crop: make path clickable
- undo
collapsed:: true
- edit stack (position, action, ...)
Expand Down Expand Up @@ -112,6 +111,7 @@
- empty item height is a bit off...
- search?
- _...not sure if search should be internal or external yet..._
- DONE crop: make path clickable
- DONE Q: crop: should we control crop via "crop-in"/"crop-out" instead of crop/uncrop??
- _crop-in/crop-out seems more natural..._
- DONE crop: show crop path (and depth)
Expand Down

0 comments on commit bf8ac4e

Please sign in to comment.