mirror of
https://github.com/flynx/pWiki.git
synced 2025-10-29 18:10:09 +00:00
124 lines
2.3 KiB
CSS
Executable File
124 lines
2.3 KiB
CSS
Executable File
|
|
:root {
|
|
--font-size: 5mm;
|
|
--button-size: 2em;
|
|
|
|
font-family: sans-serif;
|
|
font-size: var(--font-size);
|
|
|
|
/*text-size-adjust: none;*/
|
|
text-size-adjust: 150%;
|
|
}
|
|
|
|
.editor {
|
|
display: block;
|
|
position: relative;
|
|
}
|
|
|
|
.editor .code {
|
|
display: none;
|
|
}
|
|
|
|
.editor .outline {
|
|
display: block;
|
|
position: relative;
|
|
/* XXX do a better calculation... */
|
|
width: calc(100% - (var(--button-size) + 4em));
|
|
}
|
|
|
|
.editor .outline [tabindex] {
|
|
position: relative;
|
|
}
|
|
.editor .outline div [tabindex] {
|
|
margin-left: 2em;
|
|
}
|
|
.editor .outline [tabindex]>span,
|
|
.editor .outline [tabindex]>textarea {
|
|
--padding: 0.2em;
|
|
|
|
display: block;
|
|
width: 100%;
|
|
/* 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;
|
|
font-size: var(--font-size);
|
|
|
|
outline: none;
|
|
border: none;
|
|
}
|
|
.editor .outline [tabindex]>textarea {
|
|
height: calc(2 * var(--padding) + 1em);
|
|
overflow: hidden;
|
|
resize: none;
|
|
}
|
|
|
|
/* show/hide node's view/code... */
|
|
.editor .outline [tabindex]>textarea:focus+span,
|
|
.editor .outline [tabindex]>textarea:not(:focus) {
|
|
position: absolute;
|
|
opacity: 0;
|
|
top: 0;
|
|
}
|
|
|
|
/* 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] {
|
|
border-bottom: solid 1px silver;
|
|
}
|
|
.editor .outline div[collapsed] div {
|
|
display: none;
|
|
}
|
|
|
|
/* XXX are we selecting subtrees or blocks??? */
|
|
.editor .outline [selected] {
|
|
background: silver;
|
|
}
|
|
|
|
|
|
.editor .toolbar {
|
|
display: inline-block;
|
|
position: absolute;
|
|
top: 1em;
|
|
right: 1em;
|
|
}
|
|
.editor .toolbar button {
|
|
--margin: 0.1em;
|
|
|
|
display: block;
|
|
|
|
width: calc(var(--button-size) + var(--margin) * 2);
|
|
height: var(--button-size);
|
|
margin: var(--margin);
|
|
|
|
font-size: var(--button-size);
|
|
}
|
|
|
|
|
|
.editor .outline h1,
|
|
.editor .outline h2,
|
|
.editor .outline h3,
|
|
.editor .outline h4,
|
|
.editor .outline h5,
|
|
.editor .outline h6 {
|
|
margin-top: 0.5em;
|
|
margin-bottom: 0.5em;
|
|
}
|
|
|
|
|