Skip to content

Commit ed7e95f

Browse files
committed
Minor CSS changes
1 parent 1711ab6 commit ed7e95f

File tree

3 files changed

+64
-17
lines changed

3 files changed

+64
-17
lines changed

scaladoc/resources/dotty_res/styles/colors.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
--leftbar-current-fg: var(--blue500);
7676
--leftbar-hover-bg: var(--blue100);
7777
--leftbar-hover-fg: var(--grey900);
78-
--leftbar-border: var(--grey200);
78+
--leftbar-border: var(--grey300);
7979

8080
--footer-bg: var(--white);
8181
--footer-fg: var(--grey700);
@@ -94,7 +94,7 @@
9494
color-scheme: dark;
9595

9696
--border-light: var(--grey800);
97-
--border-medium: var(--grey700);
97+
--border-medium: var(--grey600);
9898

9999
--body-bg: var(--grey930);
100100
--body-fg: var(--grey300);

scaladoc/resources/dotty_res/styles/scalastyle.css

Lines changed: 61 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ body, button, input {
4040
z-index: 5;
4141
border-right: solid 1px var(--leftbar-border);
4242
}
43-
main {
43+
#main-content {
4444
min-height: calc(100vh - var(--footer-height) - 24px);
4545
margin-left: var(--side-width);
4646
padding: var(--content-padding);
@@ -176,17 +176,12 @@ th {
176176

177177
/* Navigation */
178178
#sideMenu2 {
179-
overflow: auto;
179+
overflow-y: scroll;
180180
overflow-x: hidden;
181+
181182
height: 100%;
182183
font-size: var(--leftbar-font-size);
183184
margin-top: 8px;
184-
-ms-overflow-style: none; /* IE and Edge */
185-
scrollbar-width: none;
186-
}
187-
188-
#sideMenu2::-webkit-scrollbar {
189-
display: none;
190185
}
191186

192187
/* divs in sidebar represent entry and its children */
@@ -247,6 +242,10 @@ th {
247242
box-sizing: border-box;
248243
}
249244

245+
#sideMenu2 a:hover {
246+
color: var(--link-hover-fg);
247+
}
248+
250249
#sideMenu2 a span:not(.micon) {
251250
margin-right: 0.75ex;
252251
text-indent: -1.5em;
@@ -274,7 +273,7 @@ span.ar {
274273
}
275274

276275
span.ar::before {
277-
content: "\e903"; /* arrow down */
276+
content: "\e904"; /* arrow right */
278277
font-family: "dotty-icons" !important;
279278
font-size: 20px;
280279
color: var(--icon-color);
@@ -283,8 +282,8 @@ span.ar::before {
283282
align-items: center;
284283
justify-content: center;
285284
}
286-
.expanded>span.ar::before {
287-
content: "\e905"; /* arrow up */
285+
.nav-item.expanded > .nav-header > span.ar::before {
286+
content: "\e903"; /* arrow down */
288287
}
289288

290289
.div:hover>span.ar::before {
@@ -599,7 +598,7 @@ footer .mode {
599598

600599
.documentableElement .signature {
601600
color: var(--code-fg);
602-
display: table-cell;
601+
display: table-row;
603602
white-space: pre-wrap;
604603
}
605604

@@ -623,7 +622,7 @@ footer .mode {
623622
}
624623

625624
.expand .signature {
626-
display: table-cell;
625+
display: table-row;
627626
}
628627

629628
.documentableFilter {
@@ -685,10 +684,23 @@ footer .mode {
685684
display: none;
686685
}
687686

687+
.documentableElement:before {
688+
content: ' ';
689+
position: absolute;
690+
width: 32px;
691+
height: 100%;
692+
top: 0px;
693+
left: -32px;
694+
}
695+
688696
.documentableElement:hover .documentableAnchor:before {
689697
display: flex;
690698
}
691699

700+
.documentableElement::before:hover .documentableAnchor:before {
701+
display: flex;
702+
}
703+
692704
.documentableAnchor:before {
693705
content: "\e901"; /* arrow down */
694706
font-family: "dotty-icons" !important;
@@ -701,7 +713,7 @@ footer .mode {
701713
justify-content: center;
702714
position: absolute;
703715
top: 6px;
704-
margin-left: 0.2em;
716+
left: -32px;
705717
}
706718

707719
.memberDocumentation {
@@ -838,6 +850,41 @@ footer .socials {
838850
align-items: center;
839851
}
840852

853+
/* Scrollbars */
854+
855+
:root {
856+
--scrollbar-bg-color: var(--border-light);
857+
--scrollbar-fg-color: var(--border-medium);
858+
--scrollbar-fg-hover-color: var(--grey500);
859+
}
860+
861+
/* For Firefox */
862+
#sideMenu2 {
863+
scrollbar-color: var(--scrollbar-fg-color) var(--scrollbar-bg-color);
864+
scrollbar-width: thin;
865+
}
866+
867+
/* For Chrome */
868+
869+
#sideMenu2::-webkit-scrollbar-track {
870+
background-color: var(--scrollbar-bg-color);
871+
border-radius: 3px;
872+
}
873+
874+
#sideMenu2::-webkit-scrollbar-thumb {
875+
background-color: var(--scrollbar-fg-color);
876+
border-radius: 3px;
877+
}
878+
879+
#sideMenu2::-webkit-scrollbar-thumb:hover {
880+
background-color: var(--scrollbar-fg-hover-color);
881+
}
882+
883+
#sideMenu2::-webkit-scrollbar {
884+
width: 8px;
885+
height: 8px;
886+
}
887+
841888
/* Large Screens */
842889
@media(min-width: 1100px) {
843890
:root {

scaladoc/src/dotty/tools/scaladoc/renderers/HtmlRenderer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ class HtmlRenderer(rootPackage: Member, val members: Map[DRI, Member])(using ctx
299299
span(cls := "icon-toggler")
300300
),
301301
div(id := "scaladoc-searchBar"),
302-
main(
302+
main(id := "main-content")(
303303
parentsHtml,
304304
div(id := "content")(content),
305305
),

0 commit comments

Comments
 (0)