2023-09-29 02:47:07 +03:00
|
|
|
|
|
|
|
|
:root {
|
2023-10-06 17:53:28 +03:00
|
|
|
--font-size: 5mm;
|
2023-10-04 15:33:07 +03:00
|
|
|
--button-size: 2em;
|
2023-10-03 16:12:19 +03:00
|
|
|
|
2023-09-29 02:47:07 +03:00
|
|
|
font-family: sans-serif;
|
2023-10-06 17:53:28 +03:00
|
|
|
font-size: var(--font-size);
|
|
|
|
|
|
|
|
|
|
/*text-size-adjust: none;*/
|
|
|
|
|
text-size-adjust: 150%;
|
2023-10-08 17:42:44 +03:00
|
|
|
|
|
|
|
|
/*scroll-behavior: smooth;*/
|
2023-09-29 02:47:07 +03:00
|
|
|
}
|
|
|
|
|
|
2023-10-03 16:12:19 +03:00
|
|
|
.editor {
|
|
|
|
|
display: block;
|
|
|
|
|
position: relative;
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-07 17:06:54 +03:00
|
|
|
.editor .code {
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-03 16:12:19 +03:00
|
|
|
.editor .outline {
|
|
|
|
|
display: block;
|
|
|
|
|
position: relative;
|
2023-10-04 21:54:34 +03:00
|
|
|
/* XXX do a better calculation... */
|
|
|
|
|
width: calc(100% - (var(--button-size) + 4em));
|
2023-10-03 16:12:19 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.editor .outline [tabindex] {
|
2023-09-29 02:47:07 +03:00
|
|
|
position: relative;
|
|
|
|
|
}
|
2023-10-03 16:12:19 +03:00
|
|
|
.editor .outline div [tabindex] {
|
2023-09-29 02:47:07 +03:00
|
|
|
margin-left: 2em;
|
|
|
|
|
}
|
2023-10-03 16:12:19 +03:00
|
|
|
.editor .outline [tabindex]>span,
|
|
|
|
|
.editor .outline [tabindex]>textarea {
|
2023-09-29 02:47:07 +03:00
|
|
|
--padding: 0.2em;
|
|
|
|
|
|
|
|
|
|
display: block;
|
2023-10-03 16:32:29 +03:00
|
|
|
width: 100%;
|
2023-09-29 02:47:07 +03:00
|
|
|
/* XXX this is a tiny bit off and using textarea's height here is off too... */
|
|
|
|
|
min-height: 1em;
|
|
|
|
|
padding: var(--padding);
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
|
|
|
|
font-family: sans-serif;
|
2023-10-06 17:53:28 +03:00
|
|
|
font-size: var(--font-size);
|
2023-10-08 17:42:44 +03:00
|
|
|
white-space: pre-wrap;
|
2023-09-29 02:47:07 +03:00
|
|
|
|
|
|
|
|
outline: none;
|
|
|
|
|
border: none;
|
|
|
|
|
}
|
2023-10-03 16:12:19 +03:00
|
|
|
.editor .outline [tabindex]>textarea {
|
2023-09-29 02:47:07 +03:00
|
|
|
height: calc(2 * var(--padding) + 1em);
|
|
|
|
|
overflow: hidden;
|
|
|
|
|
resize: none;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/* show/hide node's view/code... */
|
2023-10-06 17:53:28 +03:00
|
|
|
.editor .outline [tabindex]>textarea:focus+span,
|
|
|
|
|
.editor .outline [tabindex]>textarea:not(:focus) {
|
2023-09-29 02:47:07 +03:00
|
|
|
position: absolute;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
top: 0;
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-03 16:12:19 +03:00
|
|
|
/* focus... */
|
|
|
|
|
.editor .outline [tabindex]:focus {
|
|
|
|
|
/*outline: solid 0.2em silver;*/
|
|
|
|
|
outline: none;
|
|
|
|
|
}
|
|
|
|
|
.editor .outline [tabindex]:focus>span,
|
|
|
|
|
.editor .outline [tabindex]:focus>textarea {
|
|
|
|
|
background: rgba(0,0,0,0.1);
|
|
|
|
|
}
|
|
|
|
|
.editor .outline [tabindex].focused:not(:focus)>span,
|
|
|
|
|
.editor .outline [tabindex].focused:not(:focus)>textarea {
|
|
|
|
|
background: rgba(0,0,0,0.05);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.editor .outline div[collapsed] {
|
2023-09-29 02:47:07 +03:00
|
|
|
border-bottom: solid 1px silver;
|
|
|
|
|
}
|
2023-10-03 16:12:19 +03:00
|
|
|
.editor .outline div[collapsed] div {
|
2023-09-29 02:47:07 +03:00
|
|
|
display: none;
|
|
|
|
|
}
|
|
|
|
|
|
2023-09-30 17:27:28 +03:00
|
|
|
/* XXX are we selecting subtrees or blocks??? */
|
2023-10-03 16:12:19 +03:00
|
|
|
.editor .outline [selected] {
|
2023-09-30 17:27:28 +03:00
|
|
|
background: silver;
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-03 16:12:19 +03:00
|
|
|
|
|
|
|
|
.editor .toolbar {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
position: absolute;
|
|
|
|
|
top: 1em;
|
|
|
|
|
right: 1em;
|
2023-09-29 02:47:07 +03:00
|
|
|
}
|
2023-10-03 16:12:19 +03:00
|
|
|
.editor .toolbar button {
|
2023-10-04 21:54:34 +03:00
|
|
|
--margin: 0.1em;
|
|
|
|
|
|
2023-10-03 16:12:19 +03:00
|
|
|
display: block;
|
2023-10-04 15:33:07 +03:00
|
|
|
|
2023-10-04 21:54:34 +03:00
|
|
|
width: calc(var(--button-size) + var(--margin) * 2);
|
2023-10-03 16:12:19 +03:00
|
|
|
height: var(--button-size);
|
2023-10-04 21:54:34 +03:00
|
|
|
margin: var(--margin);
|
2023-10-04 15:33:07 +03:00
|
|
|
|
|
|
|
|
font-size: var(--button-size);
|
2023-09-29 02:47:07 +03:00
|
|
|
}
|
2023-10-01 02:58:55 +03:00
|
|
|
|
|
|
|
|
|
2023-10-08 17:42:44 +03:00
|
|
|
/*-------------------------------------------------------------------*/
|
2023-10-08 02:59:06 +03:00
|
|
|
/* Styles */
|
|
|
|
|
|
2023-10-08 02:36:29 +03:00
|
|
|
.editor .outline .heading-1>span,
|
|
|
|
|
.editor .outline .heading-1>textarea,
|
|
|
|
|
.editor .outline .heading-2>span,
|
|
|
|
|
.editor .outline .heading-2>textarea,
|
|
|
|
|
.editor .outline .heading-3>span,
|
|
|
|
|
.editor .outline .heading-3>textarea,
|
|
|
|
|
.editor .outline .heading-4>span,
|
|
|
|
|
.editor .outline .heading-4>textarea,
|
|
|
|
|
.editor .outline .heading-5>span,
|
|
|
|
|
.editor .outline .heading-5>textarea,
|
|
|
|
|
.editor .outline .heading-6>span,
|
|
|
|
|
.editor .outline .heading-6>textarea {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
.editor .outline .heading-1>span,
|
|
|
|
|
.editor .outline .heading-1>textarea {
|
|
|
|
|
font-size: 2.5em;
|
|
|
|
|
}
|
|
|
|
|
.editor .outline .heading-2>span,
|
|
|
|
|
.editor .outline .heading-2>textarea {
|
|
|
|
|
font-size: 1.9em;
|
|
|
|
|
}
|
|
|
|
|
.editor .outline .heading-3>span,
|
|
|
|
|
.editor .outline .heading-3>textarea {
|
|
|
|
|
font-size: 1.5em;
|
|
|
|
|
}
|
|
|
|
|
.editor .outline .heading-4>span,
|
|
|
|
|
.editor .outline .heading-4>textarea {
|
|
|
|
|
font-size: 1.3em;
|
|
|
|
|
}
|
|
|
|
|
.editor .outline .heading-5>span,
|
|
|
|
|
.editor .outline .heading-5>textarea {
|
|
|
|
|
font-size: 1.1em;
|
|
|
|
|
}
|
|
|
|
|
.editor .outline .heading-6>span,
|
|
|
|
|
.editor .outline .heading-6>textarea {
|
|
|
|
|
font-size: 1em;
|
|
|
|
|
}
|
2023-10-08 02:59:06 +03:00
|
|
|
|
2023-10-08 02:36:29 +03:00
|
|
|
/* XXX EXPERIMENTAL -- not sure about this... */
|
2023-10-08 17:42:44 +03:00
|
|
|
.editor .outline .list-item:before,
|
2023-10-08 02:36:29 +03:00
|
|
|
.editor .outline .list>[tabindex]:before {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
position: absolute;
|
|
|
|
|
content: "";
|
|
|
|
|
top: 0.6em;
|
|
|
|
|
left: -0.8em;
|
|
|
|
|
width: 0.5em;
|
|
|
|
|
height: 0.5em;
|
|
|
|
|
background: silver;
|
|
|
|
|
}
|
|
|
|
|
|
2023-10-08 17:42:44 +03:00
|
|
|
.editor .outline .XXX>span {
|
|
|
|
|
background: yellow;
|
|
|
|
|
}
|
2023-10-03 16:12:19 +03:00
|
|
|
|
2023-10-08 17:42:44 +03:00
|
|
|
.editor .outline .comment>span {
|
|
|
|
|
color: silver;
|
|
|
|
|
}
|
2023-10-08 02:36:29 +03:00
|
|
|
|
2023-10-08 17:42:44 +03:00
|
|
|
.editor .outline [tabindex]>span>input[type=checkbox] {
|
|
|
|
|
--width: 3em;
|
|
|
|
|
|
|
|
|
|
height: 1em;
|
|
|
|
|
width: var(--width);
|
|
|
|
|
margin-left: calc(-1 * var(--width));
|
|
|
|
|
}
|
2023-10-08 02:36:29 +03:00
|
|
|
|