Skip to content

Commit 6c8dc60

Browse files
TheElectronWillromanowski
authored andcommitted
Make it easier to click on sidebar arrows
1 parent 1953e8c commit 6c8dc60

File tree

3 files changed

+91
-143
lines changed

3 files changed

+91
-143
lines changed
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
.node {
2-
stroke: #333;
3-
stroke-width: 2.5px;
4-
fill: white;
2+
stroke: #333;
3+
stroke-width: 2.5px;
4+
fill: white;
55
}
66

77
.edgeLabel {
8-
fill: white;
8+
fill: white;
99
}
1010

1111
.edgePath {
12-
stroke: #333;
13-
stroke-width: 1.5px;
14-
fill: #333;
12+
stroke: #333;
13+
stroke-width: 1.5px;
14+
fill: #333;
1515
}
1616

1717
#graph {
18-
width: 100%;
19-
height: 80%;
18+
width: 100%;
19+
height: 80%;
2020
}
2121

22-
.diagram-class a[href] {
23-
text-decoration: underline;
24-
color: #FFFFFF;
22+
.diagram-class a {
23+
text-decoration: underline;
24+
color: #FFF;
2525
}
2626

2727
.diagram-class span[data-unresolved-link] {
28-
color: #FFFFFF;
28+
color: #FFF;
2929
}

scala3doc/resources/dotty_res/styles/scalastyle.css

Lines changed: 76 additions & 127 deletions
Original file line numberDiff line numberDiff line change
@@ -149,29 +149,29 @@ th {
149149
padding-left: 1em;
150150
}
151151
.sideMenuPart a {
152-
align-items: center;
153-
flex: 1;
154-
overflow-x: hidden;
152+
align-items: center;
153+
flex: 1;
154+
overflow-x: hidden;
155155
overflow-wrap: anywhere;
156156
color: var(--leftbar-fg);
157157
margin-right: .5rem;
158+
padding: 7px 0;
158159
}
159160
.sideMenuPart > .overview {
160-
display: flex;
161-
align-items: center;
162-
position: relative;
161+
display: flex;
162+
align-items: center;
163+
position: relative;
163164
user-select: none;
164-
padding: 7px 0;
165165
}
166166
.sideMenuPart > .overview::before {
167167
width: var(--side-width);
168-
box-sizing: border-box;
169-
content: '';
170-
top: 0;
171-
right: 0;
172-
bottom: 0;
173-
position: absolute;
174-
z-index: 1;
168+
box-sizing: border-box;
169+
content: '';
170+
top: 0;
171+
right: 0;
172+
bottom: 0;
173+
position: absolute;
174+
z-index: 1;
175175
}
176176
.sideMenuPart > .overview:hover::before {
177177
background: var(--leftbar-hover-bg);
@@ -187,18 +187,18 @@ th {
187187
color: var(--leftbar-current-fg);
188188
}
189189
.sideMenuPart.hidden > .sideMenuPart {
190-
height: 0;
191-
visibility: hidden;
190+
height: 0;
191+
visibility: hidden;
192192
}
193193
.overview a, .overview .navButton {
194194
z-index: 3;
195195
}
196196
.sideMenuPart .navButton {
197-
height: 100%;
198-
align-items: center;
199-
display: flex;
200-
justify-content: flex-end;
201-
padding-right: 1rem;
197+
height: 100%;
198+
align-items: center;
199+
display: flex;
200+
justify-content: flex-end;
201+
padding: 7px 10px;
202202
cursor: pointer;
203203
}
204204
.sideMenuPart .navButtonContent::before {
@@ -216,55 +216,10 @@ th {
216216
.sideMenuPart.hidden .navButtonContent::before {
217217
content: "\e903"; /* arrow down */
218218
}
219-
.sideMenuPart .navButtonContent:hover::before {
219+
.sideMenuPart .navButton:hover .navButtonContent::before {
220220
color: var(--leftbar-current-bg);
221221
}
222222

223-
/* Search */
224-
.search-content {
225-
/* TODO override search style without !important */
226-
padding: 0 !important;
227-
margin: var(--content-padding) !important;
228-
position: absolute !important;
229-
top: 0 !important;
230-
right: 0 !important;
231-
z-index: 5 !important;
232-
background: none !important;
233-
}
234-
.search button {
235-
background: none !important;
236-
fill: var(--icon-color) !important;
237-
cursor: pointer !important;
238-
}
239-
.search button:hover {
240-
fill: var(--link-hover-fg) !important;
241-
}
242-
.search button svg {
243-
width: 24px !important;
244-
height: 24px !important;
245-
}
246-
.popup-wrapper { /* search popup */
247-
box-shadow: 0 0 10px var(--border-light) !important;
248-
border: 2px solid var(--border-light) !important;
249-
font-family: var(--mono-font) !important;
250-
/* TODO dokka already uses !important so I can't override that...
251-
min-width: calc(100% - var(--side-width) - 36px) !important;
252-
left: 24px;
253-
*/
254-
}
255-
.popup-wrapper .indented {
256-
text-indent: 1.5em !important;
257-
}
258-
.popup-wrapper .disabled {
259-
color: var(--inactive-fg) !important;
260-
font-weight: 500 !important;
261-
}
262-
.action_def:hover, .action_def:focus-within {
263-
color: var(--selected-fg);
264-
background: var(--selected-bg) !important;
265-
font-weight: 500;
266-
}
267-
268223
/* Cover */
269224
.cover h1 {
270225
font-size: 38px;
@@ -274,99 +229,99 @@ th {
274229

275230
/* Tabs */
276231
.section-tab {
277-
border: none;
278-
outline: none;
232+
border: none;
233+
outline: none;
279234
background: transparent;
280-
padding: 0 6px 4px 6px;
281-
margin: 1rem 1rem 0 0;
282-
border-bottom: 1px solid grey;
283-
cursor: pointer;
235+
padding: 0 6px 4px 6px;
236+
margin: 1rem 1rem 0 0;
237+
border-bottom: 1px solid grey;
238+
cursor: pointer;
284239
}
285240
.section-tab[data-active=""] {
286241
color: unset;
287242
font-weight: bold;
288-
border-bottom: 2px solid var(--active-tab-color);
243+
border-bottom: 2px solid var(--active-tab-color);
289244
}
290245
.tabs-section-body > :not([data-active]) {
291-
display: none;
246+
display: none;
292247
}
293248

294249
/* Tabs content */
295250
.table {
296-
/*! display: flex; */
297-
flex-direction: column;
251+
/*! display: flex; */
252+
flex-direction: column;
298253
}
299254
.table-row {
300-
border-bottom: 2px solid var(--border-light);
301-
padding: 8px 24px 8px 0;
255+
border-bottom: 2px solid var(--border-light);
256+
padding: 8px 24px 8px 0;
302257
}
303258
.main-subrow {
304259
margin-bottom: .5em;
305260
}
306261
.main-subrow > span > a, .main-subrow > span > span[data-unresolved-link] {
307-
text-decoration: none;
308-
font-style: normal;
309-
font-weight: bold;
310-
color: unset;
311-
font-size: 18px;
262+
text-decoration: none;
263+
font-style: normal;
264+
font-weight: bold;
265+
color: unset;
266+
font-size: 18px;
312267
}
313268
.main-subrow .anchor-icon { /* Link Anchor */
314-
margin-left: .25rem;
315-
opacity: 0;
316-
transition: 0.2s 0.5s;
269+
margin-left: .25rem;
270+
opacity: 0;
271+
transition: 0.2s 0.5s;
317272
cursor: pointer;
318273
}
319274
.main-subrow .anchor-icon > svg {
320275
margin-bottom: -5px;
321276
fill: var(--link-fg);
322277
}
323278
.main-subrow:hover .anchor-icon {
324-
opacity: 1;
325-
transition: 0.2s;
279+
opacity: 1;
280+
transition: 0.2s;
326281
}
327282
.brief-with-platform-tags ~ .main-subrow {
328-
padding-top: 0;
283+
padding-top: 0;
329284
}
330285

331286
.brief {
332-
white-space: pre-wrap;
333-
overflow: hidden;
287+
white-space: pre-wrap;
288+
overflow: hidden;
334289
margin-bottom: .5em;
335290
}
336291
/* Declarations */
337292
.symbol.monospace {
338293
color: var(--symbol-fg);
339-
display: block;
340-
white-space: normal;
294+
display: block;
295+
white-space: normal;
341296
position: relative;
342297
padding-right: 24px; /* avoid the copy button */
343298
margin: 1em 0;
344299
}
345300
.symbol .top-right-position {
346-
position: absolute;
347-
top: 8px;
348-
right: 8px;
301+
position: absolute;
302+
top: 8px;
303+
right: 8px;
349304
}
350305
/* "copy to clipboard" button */
351306
.copy-popup-wrapper {
352-
display: none;
353-
position: absolute;
354-
z-index: 1000;
355-
background: white;
356-
width: max-content;
357-
cursor: default;
358-
border: 1px solid var(--border-light);
359-
box-sizing: border-box;
360-
box-shadow: 0px 5px 10px var(--border-light);
361-
border-radius: 3px;
307+
display: none;
308+
position: absolute;
309+
z-index: 1000;
310+
background: white;
311+
width: max-content;
312+
cursor: default;
313+
border: 1px solid var(--border-light);
314+
box-sizing: border-box;
315+
box-shadow: 0px 5px 10px var(--border-light);
316+
border-radius: 3px;
362317
font-weight: normal;
363318
}
364319
.copy-popup-wrapper.active-popup {
365320
display: flex;
366321
align-items: center;
367322
}
368323
.copy-popup-wrapper.popup-to-left {
369-
left: -14rem;
324+
left: -14rem;
370325
}
371326
.copy-popup-wrapper svg {
372327
padding: 8px;
@@ -404,29 +359,29 @@ dl.attributes > dd {
404359

405360
/* params list documentation */
406361
dl.paramsdesc {
407-
display: flex;
408-
flex-flow: row wrap;
362+
display: flex;
363+
flex-flow: row wrap;
409364
}
410365
dl.paramsdesc dt {
411-
flex-basis: 20%;
412-
padding: 2px 0;
413-
text-align: left;
414-
font-weight: bold;
366+
flex-basis: 20%;
367+
padding: 2px 0;
368+
text-align: left;
369+
font-weight: bold;
415370
}
416371
dl.paramsdesc dd {
417-
flex-basis: 80%;
418-
flex-grow: 1;
419-
margin: 0;
420-
padding: 2px 0;
372+
flex-basis: 80%;
373+
flex-grow: 1;
374+
margin: 0;
375+
padding: 2px 0;
421376
}
422377

423378
.platform-dependent-row dl.attributes > dd {
424379
padding-left: 3em;
425380
}
426381

427-
/* Workaround for dynamically rendered content inside hidden tab.
382+
/* Workaround for dynamically rendered content inside hidden tab.
428383
There's some limitation of css/html that causes wrong width/height property of elements that are rendered dynamically inside element with display:none;
429-
Same solution is already used in Dokka.
384+
Same solution is already used in Dokka.
430385
*/
431386
.platform-hinted[data-togglable="Type hierarchy"] > .content:not([data-active]),
432387
.tabs-section-body > *[data-togglable="Type hierarchy"]:not([data-active]) {
@@ -480,7 +435,7 @@ footer .pull-right {
480435
.documentableElement {
481436
width: 100%;
482437
color: var(--symbol-fg);
483-
white-space: normal;
438+
white-space: normal;
484439
position: relative;
485440
margin: 0;
486441
padding: 5px 4px 5px 4px;
@@ -578,12 +533,6 @@ footer .pull-right {
578533
content: "\e900"; /* clear icon */
579534
}
580535
/* --- */
581-
582-
.search-content {
583-
margin: 0 !important;
584-
top: 9px !important;
585-
right: 12px !important;
586-
}
587536
.cover h1 {
588537
margin-top: 0;
589538
}

scala3doc/src/dotty/dokka/preprocessors/ScalaEmbeddedResourceApppender.scala

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,8 @@ class ScalaEmbeddedResourceAppender extends PageTransformer {
1818
"styles/scalastyle.css",
1919
"styles/dotty-icons.css",
2020
"styles/diagram.css",
21-
"hljs/highlight.pack.js",
22-
"scripts/hljs-scala3.js",
23-
"scripts/ux.js",
21+
"styles/filter-bar.css",
22+
"styles/search-bar.css",
2423
"https://code.jquery.com/jquery-3.5.1.min.js",
2524
"https://d3js.org/d3.v6.min.js",
2625
"https://cdn.jsdelivr.net/npm/graphlib-dot@0.6.2/dist/graphlib-dot.min.js",

0 commit comments

Comments
 (0)