forked from modelica/ModelicaSpecification
-
Notifications
You must be signed in to change notification settings - Fork 2
/
MLS-navbar-left.css
193 lines (171 loc) · 4.72 KB
/
MLS-navbar-left.css
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
/*
* CSS for left navigation bar.
* Developed from LaTeXML-navbar-left.css as starting point.
*/
body {
margin: 0px;
background: #F6F6F6;
}
nav > div.ltx_TOC {
margin-left: 1em;
}
.ltx_page_navbar {
display: block!important;
position: fixed;
z-index: 2;
top: 0px;
margin: 0px;
padding: 0px;
font-size: 14px; /* Less than what is inherited from .body, to reduce need for scrolling. */
line-height: 1.3; /* Less than what is inherited from .body, to reduce need for scrolling. */
color: black;
border-style: solid;
border-color: #707A85; /* "Bouncing ball trace gray" */
border-width: 0px;
border-right-width: 8px;
background: #F6F6F6;
height: 100%; /* Provide fixed height for .ltx_TOC to refer to. */
}
.ltx_page_navbar:before {
position: fixed;
z-index: 4;
left: 0px;
top: 0px;
margin: 0px;
padding: 0px;
font-size: 25px;
color: #DE1D31; /* "Bouncing ball red" */
height: 30px;
width: calc(3rem - 8px);
background: #F6F6F6;
text-align: center;
content: "☰"; /* Chinese character that looks like hamburger. */
}
.ltx_page_navbar a[rel=start] {
display: none; /* Don't show sidebar title, as it is too long to look good, and seem to lack structure for adequate layout. */
}
.ltx_page_navbar .ltx_tocentry_document > .ltx_ref_self {
display: none; /* Similar to sidebar title, but for the top page. */
}
.ltx_page_header a[rel=prev] {
display: none; /* Don't show link to previous chapter. */
}
.ltx_page_header a[rel=next] {
display: none; /* Don't show link to previous chapter. */
}
.ltx_page_footer a[rel=bibliography] {
display: none; /* Don't show link to bibliography. */
}
.ltx_page_footer a[rel=index] {
display: none; /* Don't show link to index. */
}
.ltx_TOC {
padding-right: 1em;
overflow-y: auto;
}
.ltx_TOC > ul.ltx_toclist {
padding: 0em;
}
.ltx_tocentry_document > ul.ltx_toclist {
padding: 0em;
}
.ltx_toclist ul {
padding-left: 1em; /* Indentation of each table of contents level below the top. */
}
/* How to deal with the long section titles in the table of contents (overriding styling from LaTeXML.css).
* The right boundary for these titles is the .ltx_page_navbar padding-right.
*/
.ltx_page_navbar li {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.ltx_ref_title .ltx_tag_ref {
font-size: 75%; /* Compress navbar even more by shrinking the numbering. */
}
.ltx_page_main {
position: absolute;
z-index: 1;
margin-top: 0px;
margin-bottom: 0px;
border-width: 0px;
max-width: 80em;
padding: 0px;
}
.ltx_page_header {
position: fixed;
z-index: 3;
top: 0px;
height: 1.5rem;
padding: 0.5rem 1rem;
background: #F6F6F6; /* Same as body. */
color: black; /* Same as side bar. */
white-space: nowrap;
text-overflow: ellipsis;
}
.ltx_page_content {
padding: 1rem;
margin-top: 1.5rem; /* Header height plus padding below, minus a little bit. */
background: white;
}
.ltx_page_footer {
padding: 1rem;
background: white;
}
/* Layout for wide screens, with navbar always expanded.
* The threshold for being considered wide is set so that it should be possible to get a collapsable
* navbar at the same time as extending .ltx_page_main to its max-width (currently 80em).
* This max-width is added to the .ltx_page_main margin-left in the collapsable layout, currently
* resulting in 1306px if 1em is converted to 16px:
* 80em * 16px/em + 2px + 16px + 8px = 1306px
* Add 4px of slack, and the threshold becomes 1310.
*/
@media screen and (min-width: 1310px) {
.ltx_page_main {
margin-left: 350px;
}
.ltx_page_navbar {
left: 0px;
width: calc(350px - 8px); /* Width of .ltx_page_main, minus .ltx_page_navbar border-right-width. */
}
.ltx_TOC {
height: 100%;
}
.ltx_page_header {
width: calc(100% - 350px - 2em); /* Subtract 2em for the total horizontal padding on this element. */
}
.ltx_page_navbar:before {
display: none;
}
}
/* Layout for smaller screens or other media where navbar is only expanded when hovered.
*/
@media screen and (max-width: 1310px) {
.ltx_page_main {
/* Leave just enough space to fit the hamburger plus the right border of the .ltx_page_navbar.
* Don't define this in em units, since the em is not the same below in .ltx_page_navbar.
*/
margin-left: 0px;
}
.ltx_page_navbar {
width: 500px;
height: 2.5rem;
left: calc(3rem - (500px + 8px));
transition: 0.3s;
}
.ltx_TOC {
margin-top: 20px; /* Reserve space for hamburger. */
height: calc(100% - 20px);
}
.ltx_page_header {
padding-left: 4rem;
width: calc(100% - (4rem + 1rem)); /* Subtract horizontal padding on this element. */
}
.ltx_page_navbar:hover {
left: 0px;
height: 100%;
}
.ltx_page_navbar:before {
display: block;
}
}