Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2023-10-25 17:37:02 +03:00
parent b80312497c
commit d21d233b07
3 changed files with 8 additions and 5 deletions

View File

@ -101,7 +101,8 @@
.editor.block-offsets .outline .block {
border-left: solid 1px silver;
}
.editor .outline .block .block {
.editor .outline .block .block,
.editor.crop .outline .block[cropped] .block[cropped] {
margin-left: var(--item-indent);
}
.editor .outline .block>.text {
@ -264,6 +265,8 @@ editor .outline .block:focus {
/* crop... */
/* NOTE: also see rules for: .editor .outline .block .block
* ...can we avoid this?? (XXX) */
.editor.crop .outline .block:not([cropped]) {
padding: 0;
border: none;

View File

@ -1399,6 +1399,8 @@ var Outline = {
var block = document.createElement('div')
block.classList.add('block')
block.setAttribute('tabindex', '0')
// XXX hack??
block.setAttribute('cropped', '')
// code...
var code = document.createElement('textarea')
.autoUpdateSize()
@ -1422,10 +1424,10 @@ var Outline = {
: place
;(place == 'next'
&& (cur.querySelector('.block')
|| cur.nextElementSibling)) ?
|| cur !== this.get(-1))) ?
this.get(place).before(block)
: (place == 'next'
&& !cur.nextElementSibling) ?
&& cur === this.get(-1)) ?
cur.after(block)
: (place == 'before' || place == 'after') ?
cur[place](block)

View File

@ -48,8 +48,6 @@ var setup = function(){
-
- ## Bugs:
focused:: true
- BUG: crop: adding siblings to crop root instantly hides them
- _should add `.cropped` class... but where???_
- BUG: mobile browsers behave quite chaotically ignoring parts of the styling...
-
- ## ToDo: