FIX: adjust mobile specificity (#71)
* FIX: adjust mobile specificity * prettier
This commit is contained in:
parent
04acc4bb30
commit
fc53d7efa2
|
@ -191,8 +191,21 @@ a.d-toc-close {
|
|||
.d-toc-mini {
|
||||
display: block;
|
||||
}
|
||||
|
||||
// core overrides when timeline is active
|
||||
.timeline-container {
|
||||
display: none;
|
||||
}
|
||||
.container.posts .topic-navigation.with-topic-progress {
|
||||
align-self: start;
|
||||
}
|
||||
}
|
||||
|
||||
// overlayed timeline (on mobile and narrow screens)
|
||||
.topic-navigation.with-topic-progress {
|
||||
.d-toc-timeline-toggle {
|
||||
display: none;
|
||||
}
|
||||
.d-toc-wrapper {
|
||||
position: fixed;
|
||||
margin-top: 0.25em;
|
||||
|
@ -246,22 +259,11 @@ a.d-toc-close {
|
|||
}
|
||||
}
|
||||
|
||||
// core overrides when timeline is active
|
||||
.timeline-container {
|
||||
display: none;
|
||||
}
|
||||
.container.posts .topic-navigation.with-topic-progress {
|
||||
align-self: start;
|
||||
}
|
||||
}
|
||||
|
||||
#topic-progress-wrapper {
|
||||
align-items: stretch;
|
||||
.d-toc-mini {
|
||||
display: none;
|
||||
.d-toc-timeline-visible & {
|
||||
display: block;
|
||||
}
|
||||
|
||||
height: 100%;
|
||||
.btn {
|
||||
height: 100%;
|
||||
|
@ -275,6 +277,12 @@ a.d-toc-close {
|
|||
}
|
||||
}
|
||||
|
||||
.d-toc-timeline-toggleable {
|
||||
#topic-progress-wrapper .d-toc-mini {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
// core sets first child's top margin to 0
|
||||
// ensure it's also 0 when TOC markup is first
|
||||
.cooked > div[data-theme-toc]:first-child + * {
|
||||
|
|
|
@ -231,14 +231,6 @@ export default {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (
|
||||
!classNames.some((className) =>
|
||||
document.body.classList.contains(className)
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
|
||||
// link to each heading
|
||||
if (
|
||||
e.target.closest(".d-toc-item") &&
|
||||
|
@ -291,6 +283,14 @@ export default {
|
|||
if (!e.target.closest(".d-toc-wrapper.overlay")) {
|
||||
document.querySelector(".d-toc-wrapper").classList.remove("overlay");
|
||||
}
|
||||
|
||||
if (
|
||||
!classNames.some((className) =>
|
||||
document.body.classList.contains(className)
|
||||
)
|
||||
) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
|
||||
buildTOC(headings) {
|
||||
|
|
Loading…
Reference in New Issue