Skip to content

Commit 181c515

Browse files
Merge pull request #12 from szymon-rd/scaladoc-fixes-part2
2nd part of layout fixes
2 parents ac76cae + 1874d23 commit 181c515

File tree

12 files changed

+33
-23
lines changed

12 files changed

+33
-23
lines changed

docs/_layouts/static-site-main.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
</div>
2929
{% endif %} {% if page.next %}
3030
<div>
31-
<span class="body-small">Next</span>
31+
<span class="body-small arrow-navigation--next">Next</span>
3232
<a
3333
rel="next"
3434
href="{{ page.next.url }}"

scaladoc/resources/dotty_res/styles/theme/color-tokens.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848

4949
/* code */
5050
--code-props-content: var(--grey12);
51-
--code-props-background: var(--grey3);
51+
--code-props-background: var(--grey2);
5252
--code-props-border: var(--grey5);
5353

5454
--code-syntax-highlighting-comment: var(--grey11);
@@ -136,7 +136,7 @@
136136

137137
/* code */
138138
--code-props-content: var(--grey12);
139-
--code-props-background: var(--grey2);
139+
--code-props-background: var(--grey3);
140140
--code-props-border: var(--grey6);
141141

142142
--code-syntax-highlighting-comment: var(--grey11);

scaladoc/resources/dotty_res/styles/theme/components/dropdown-menu.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323
/* version dropdown */
2424
#version-dropdown {
2525
top: calc(6 * var(--base-spacing));
26-
left: calc(34.25 * var(--base-spacing));
26+
left: calc(19 * var(--base-spacing));
2727
}

scaladoc/resources/dotty_res/styles/theme/components/pill.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@
5454
display: block;
5555
}
5656

57+
.pill-container {
58+
display: flex;
59+
align-items: center;
60+
}
61+
5762
.pill-container ul {
5863
display: none;
5964
background-color: var(--action-primary-background-default-solid);

scaladoc/resources/dotty_res/styles/theme/components/subtypes.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
padding-bottom: calc(1.5 * var(--base-spacing));
55
overflow-x: scroll;
66
position: relative;
7+
border-radius: 4px;
78
}
89

910
.subtypes > span {

scaladoc/resources/dotty_res/styles/theme/components/supertypes.css

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
padding-bottom: calc(1.5 * var(--base-spacing));
55
overflow-x: scroll;
66
position: relative;
7+
border-radius: 4px;
78
}
89

910
.supertypes > span {

scaladoc/resources/dotty_res/styles/theme/layout/arrowNavigation.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,7 @@
1313
margin-bottom: calc(1 * var(--base-spacing));
1414
color: var(--text-secondary);
1515
}
16+
17+
.arrow-navigation--next {
18+
text-align: right;
19+
}

scaladoc/resources/dotty_res/styles/theme/layout/content.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,11 @@
172172
/* content link */
173173
#content a {
174174
color: var(--text-primary);
175-
border-bottom: 1px solid var(--grey8);
175+
text-decoration: underline var(--grey8) solid 1px;
176176
}
177177

178178
#content a:hover {
179-
border-bottom: 1px solid var(--text-secondary);
179+
text-decoration: underline var(--text-secondary) solid 1px;
180180
}
181181

182182
#content .cover-header a,
@@ -195,6 +195,10 @@
195195
font-size: 13px;
196196
}
197197

198+
#content .body-large code {
199+
font-size: 16px;
200+
}
201+
198202
.breadcrumbs {
199203
display: none;
200204
}

scaladoc/resources/dotty_res/styles/theme/layout/header.css

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,14 @@
6868
overflow: hidden;
6969
white-space: nowrap;
7070
text-overflow: ellipsis;
71+
width: calc(9 * var(--base-spacing));
7172
}
7273

73-
@media (max-width: 950px) {
74-
.projectVersion {
75-
width: calc(6 * var(--base-spacing));
76-
}
74+
.single {
75+
padding-left: 16px;
76+
}
7777

78+
@media (max-width: 950px) {
7879
.header-container-right .text-button {
7980
margin-left: calc(2 * var(--base-spacing));
8081
}
@@ -86,10 +87,6 @@
8687
display: block;
8788
}
8889

89-
.projectVersion {
90-
width: auto;
91-
}
92-
9390
.header-container-right .text-button {
9491
display: none;
9592
}
@@ -102,9 +99,3 @@
10299
display: none;
103100
}
104101
}
105-
106-
@media (max-width: 500px) {
107-
.projectVersion {
108-
width: calc(6 * var(--base-spacing));
109-
}
110-
}

scaladoc/resources/dotty_res/styles/theme/layout/mobileMenu.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
margin-left: calc(2 * var(--base-spacing));
3232
}
3333

34-
@media (min-width: 768px) {
34+
@media (min-width: 769px) {
3535
#mobile-menu {
3636
display: none;
3737
}

scaladoc/resources/dotty_res/styles/theme/typography.css

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
font-family: "Inter-SemiBold";
4040
}
4141

42+
.h600 .single {
43+
padding-left: 16px;
44+
}
45+
4246
.h500 {
4347
font-size: 28px;
4448
line-height: 32px;
@@ -77,7 +81,7 @@
7781

7882
.body-large {
7983
font-size: 20px;
80-
line-height: 24px;
84+
line-height: 32px;
8185
font-family: "Inter-Regular";
8286
}
8387

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ class MemberRenderer(signatureRenderer: SignatureRenderer)(using DocContext) ext
443443
}
444444

445445
def fullMember(m: Member): PageContent =
446-
val wideClass = m.companion.map(_ => "cover-header-wide").getOrElse("")
446+
val wideClass = m.companion.map(_ => "multi").getOrElse("single")
447447
val intro = m.kind match
448448
case Kind.RootPackage =>Seq(h1(summon[DocContext].args.name))
449449
case _ =>

0 commit comments

Comments
 (0)