summaryrefslogtreecommitdiff
path: root/assets/css/components/_content.scss
blob: 6c5815cb473c9de55b98b4ab13314eea3b5b55f6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
/* toc */

#toc-container {
    position: absolute;
    bottom: 0;
    right: calc(50% + var(--page-width) / 2);
    left: auto;
    height: 100%;
    top: 12rem;
}

@media screen and (max-width: 1200px) {
    #toc-container {
        display: none
    }
}

#toc {
    /* position */
    position: sticky;
    top: 3rem;
    /* styling */
    font-size: 1rem;
    padding: 0 2rem;
}

@media screen and (max-width: 1700px) {
    #toc {
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 1500px) {
    #toc {
        font-size: 0.825rem;
    }
}

#toc ul, #toc ol {
    margin-block-start: 0;
    margin-block-end: 0;
    padding-inline-start: 1rem;
}

#toc li {
    list-style: none;
}

#toc li > a {
    color: var(--secondary-text-color);
    text-decoration: none;
    transition: color .3s;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
}

#toc li > a::before {
    content: '';
    display: inline-block;
    width: 1rem;
    height: .3rem;
    background-color: var(--block-background-color);
    border-radius: .2rem;
    transition: background .3s;
}

#toc li a:hover,
#toc li.is-active-li > a {
    color: var(--text-color);
}

#toc li.is-active-li > a::before {
    background-color: var(--secondary-text-color);
}

#toc .toc-list {
	overflow: hidden;
	position: relative;
}

#toc .toc-list .toc-list {
    max-height: 25rem;
	overflow-y: auto
}

#toc .toc-list.is-collapsed {
	max-height: 0
}