Add base table-of-contents, don't collapse headlines.
This commit is contained in:
parent
58bb7ccc49
commit
e268734a3f
2 changed files with 64 additions and 22 deletions
|
@ -149,7 +149,8 @@ body nav input {
|
|||
}
|
||||
|
||||
/* Item list */
|
||||
.node .contents ul {
|
||||
.node .contents ul,
|
||||
.global-table-of-contents ul {
|
||||
--tree-spacing : 1rem;
|
||||
--tree-radius : 0.75ex;
|
||||
--tree-line-separation: 0.5rem;
|
||||
|
@ -158,12 +159,14 @@ body nav input {
|
|||
list-style: none;
|
||||
}
|
||||
|
||||
.node .contents ul li {
|
||||
.node .contents ul li,
|
||||
.global-table-of-contents ul li{
|
||||
position: relative;
|
||||
padding-left: calc(var(--tree-spacing) * 2);
|
||||
}
|
||||
|
||||
.node .contents ul li::after {
|
||||
.node .contents ul li::after,
|
||||
.global-table-of-contents ul li::after {
|
||||
content: '';
|
||||
display: block;
|
||||
position: absolute;
|
||||
|
@ -175,7 +178,8 @@ body nav input {
|
|||
background: var(--tree-color);
|
||||
}
|
||||
|
||||
.node .contents ul li::before {
|
||||
.node .contents ul li::before,
|
||||
.global-table-of-contents ul li::before {
|
||||
content: ' ';
|
||||
width: var(--tree-spacing);
|
||||
display: inline-block;
|
||||
|
@ -186,26 +190,36 @@ body nav input {
|
|||
}
|
||||
|
||||
/* Nested item list */
|
||||
.node .contents ul ul {
|
||||
.node .contents ul ul,
|
||||
.global-table-of-contents ul ul {
|
||||
padding: 0;
|
||||
margin-left: calc(var(--tree-spacing));
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
.node .contents ul ul li {
|
||||
.node .contents ul > li > ul,
|
||||
.global-table-of-contents ul > li > ul {
|
||||
margin-left: calc(0px - var(--tree-spacing));
|
||||
}
|
||||
|
||||
.node .contents ul ul li,
|
||||
.global-table-of-contents ul ul li {
|
||||
margin-left: calc(0px - var(--tree-radius) / 2 + 2px);
|
||||
border-left: 2px solid var(--tree-color);
|
||||
}
|
||||
|
||||
.node .contents ul ul li::marker {
|
||||
.node .contents ul ul li::marker,
|
||||
.global-table-of-contents ul ul li::marker {
|
||||
content: '';
|
||||
}
|
||||
|
||||
.node .contents ul ul li::after {
|
||||
.node .contents ul ul li::after,
|
||||
.global-table-of-contents ul ul li::after {
|
||||
left: calc(var(--tree-spacing) * 2 - 0.5ex);
|
||||
}
|
||||
|
||||
.node .contents ul ul li::before {
|
||||
.node .contents ul ul li::before,
|
||||
.global-table-of-contents ul ul li::before {
|
||||
width: calc(var(--tree-spacing) * 2);
|
||||
height: calc(var(--tree-spacing) + 5px);
|
||||
margin-top: -100%;
|
||||
|
@ -215,11 +229,13 @@ body nav input {
|
|||
border-bottom-style: solid;
|
||||
}
|
||||
|
||||
.node .contents ul ul li:last-of-type::before {
|
||||
.node .contents ul ul li:last-of-type::before,
|
||||
.global-table-of-contents ul ul li:last-of-type::before {
|
||||
border-bottom-left-radius: var(--tree-border-radius);
|
||||
}
|
||||
|
||||
.node .contents ul li:last-of-type {
|
||||
.node .contents ul li:last-of-type,
|
||||
.global-table-of-contents ul li:last-of-type {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
|
@ -533,8 +549,9 @@ tr.__table-separator {
|
|||
border: 1px solid rgba(255,255,255,0.5);
|
||||
}
|
||||
|
||||
.node .contents ul {
|
||||
--tree-color: #666;
|
||||
.node .contents ul,
|
||||
.global-table-of-contents ul {
|
||||
--tree-color: #aaa;
|
||||
}
|
||||
|
||||
/* Tables. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue