Skip to content

Commit a05dd9d

Browse files
committed
fix the position of element with id attribute after link click, fix minor h1 cut, fix images urls in mobile view
1 parent 3aee76d commit a05dd9d

File tree

4 files changed

+33
-25
lines changed

4 files changed

+33
-25
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ body {
66
overflow: hidden;
77
}
88

9+
[id] {
10+
scroll-margin-top: calc(10 * var(--base-spacing));
11+
}
12+
913
#container {
1014
--header-height: calc(8 * var(--base-spacing));
1115
}

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@
145145

146146
/* content headers */
147147

148+
#content h1:first-of-type {
149+
line-height: normal;
150+
}
151+
148152
#content h1,
149153
#content h2 {
150154
color: var(--text-primary);

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

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -87,69 +87,69 @@
8787
/* contribute item dark */
8888

8989
.theme-dark .mobile-menu-item.contribute::after {
90-
content: url("../../../../images/icon-buttons/link/dark/default.svg");
90+
content: url("../../../images/icon-buttons/link/dark/default.svg");
9191
margin-left: calc(1 * var(--base-spacing));
9292
height: calc(2 * var(--base-spacing));
9393
height: calc(2 * var(--base-spacing));
9494
}
9595

9696
.theme-dark .mobile-menu-item.contribute:hover::after {
97-
content: url("../../../../images/icon-buttons/link/dark/hover.svg");
97+
content: url("../../../images/icon-buttons/link/dark/hover.svg");
9898
}
9999

100100
.theme-dark .mobile-menu-item.contribute:active::after {
101-
content: url("../../../../images/icon-buttons/link/dark/active.svg");
101+
content: url("../../../images/icon-buttons/link/dark/active.svg");
102102
}
103103

104104
/* contribute item light */
105105

106106
.mobile-menu-item.contribute::after {
107-
content: url("../../../../images/icon-buttons/link/light/default.svg");
107+
content: url("../../../images/icon-buttons/link/light/default.svg");
108108
margin-left: calc(1 * var(--base-spacing));
109109
height: calc(2 * var(--base-spacing));
110110
height: calc(2 * var(--base-spacing));
111111
}
112112

113113
.mobile-menu-item.contribute:hover::after {
114-
content: url("../../../../images/icon-buttons/link/light/hover.svg");
114+
content: url("../../../images/icon-buttons/link/light/hover.svg");
115115
}
116116

117117
.mobile-menu-item.contribute:active::after {
118-
content: url("../../../../images/icon-buttons/link/light/active.svg");
118+
content: url("../../../images/icon-buttons/link/light/active.svg");
119119
}
120120

121121
/* mode item dark*/
122122

123123
.theme-dark .mobile-menu-item.mode::before {
124-
content: url("../../../../images/icon-buttons/sun/dark/default.svg");
124+
content: url("../../../images/icon-buttons/sun/dark/default.svg");
125125
margin-right: calc(1 * var(--base-spacing));
126126
height: calc(2 * var(--base-spacing));
127127
height: calc(2 * var(--base-spacing));
128128
}
129129

130130
.theme-dark .mobile-menu-item.mode:hover::before {
131-
content: url("../../../../images/icon-buttons/sun/dark/hover.svg");
131+
content: url("../../../images/icon-buttons/sun/dark/hover.svg");
132132
}
133133

134134
.theme-dark .mobile-menu-item.mode:active::before {
135-
content: url("../../../../images/icon-buttons/sun/dark/active.svg");
135+
content: url("../../../images/icon-buttons/sun/dark/active.svg");
136136
}
137137

138138
/* mode item light*/
139139

140140
.mobile-menu-item.mode::before {
141-
content: url("../../../../images/icon-buttons/moon/light/default.svg");
141+
content: url("../../../images/icon-buttons/moon/light/default.svg");
142142
margin-right: calc(1 * var(--base-spacing));
143143
height: calc(2 * var(--base-spacing));
144144
height: calc(2 * var(--base-spacing));
145145
}
146146

147147
.mobile-menu-item.mode:hover::before {
148-
content: url("../../../../images/icon-buttons/moon/light/hover.svg");
148+
content: url("../../../images/icon-buttons/moon/light/hover.svg");
149149
}
150150

151151
.mobile-menu-item.mode:active::before {
152-
content: url("../../../../images/icon-buttons/moon/light/active.svg");
152+
content: url("../../../images/icon-buttons/moon/light/active.svg");
153153
}
154154

155155
#mobile-menu-close {
@@ -161,51 +161,51 @@
161161
}
162162

163163
#mobile-menu-close::after {
164-
content: url("../../../../images/icon-buttons/close/light/default.svg");
164+
content: url("../../../images/icon-buttons/close/light/default.svg");
165165
}
166166

167167
#mobile-menu-close:hover::after {
168-
content: url("../../../../images/icon-buttons/close/light/hover.svg");
168+
content: url("../../../images/icon-buttons/close/light/hover.svg");
169169
}
170170

171171
#mobile-menu-close:active::after {
172-
content: url("../../../../images/icon-buttons/close/light/active.svg");
172+
content: url("../../../images/icon-buttons/close/light/active.svg");
173173
}
174174

175175
#mobile-menu-close:disabled::after {
176-
content: url("../../../../images/icon-buttons/close/light/disabled.svg");
176+
content: url("../../../images/icon-buttons/close/light/disabled.svg");
177177
}
178178

179179
#mobile-menu-close:focus::after {
180-
content: url("../../../../images/icon-buttons/close/light/focus.svg");
180+
content: url("../../../images/icon-buttons/close/light/focus.svg");
181181
}
182182

183183
#mobile-menu-close.selected::after {
184-
content: url("../../../../images/icon-buttons/close/light/selected.svg");
184+
content: url("../../../images/icon-buttons/close/light/selected.svg");
185185
}
186186

187187
.theme-dark #mobile-menu-close::after {
188-
content: url("../../../../images/icon-buttons/close/dark/default.svg");
188+
content: url("../../../images/icon-buttons/close/dark/default.svg");
189189
}
190190

191191
.theme-dark #mobile-menu-close:hover::after {
192-
content: url("../../../../images/icon-buttons/close/dark/hover.svg");
192+
content: url("../../../images/icon-buttons/close/dark/hover.svg");
193193
}
194194

195195
.theme-dark #mobile-menu-close:active::after {
196-
content: url("../../../../images/icon-buttons/close/dark/active.svg");
196+
content: url("../../../images/icon-buttons/close/dark/active.svg");
197197
}
198198

199199
.theme-dark #mobile-menu-close:disabled::after {
200-
content: url("../../../../images/icon-buttons/close/dark/disabled.svg");
200+
content: url("../../../images/icon-buttons/close/dark/disabled.svg");
201201
}
202202

203203
.theme-dark #mobile-menu-close:focus::after {
204-
content: url("../../../../images/icon-buttons/close/dark/focus.svg");
204+
content: url("../../../images/icon-buttons/close/dark/focus.svg");
205205
}
206206

207207
.theme-dark #mobile-menu-close.selected::after {
208-
content: url("../../../../images/icon-buttons/close/dark/selected.svg");
208+
content: url("../../../images/icon-buttons/close/dark/selected.svg");
209209
}
210210

211211
/* search */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ class MemberRenderer(signatureRenderer: SignatureRenderer)(using DocContext) ext
179179
def member(member: Member) =
180180
val filterAttributes = FilterAttributes.attributesFor(member)
181181
val anchor = if member.dri.anchor.isEmpty then Nil else Seq(id := member.dri.anchor)
182-
def topLevelAttr = Seq(cls := "documentableElement mono-small-inline")
182+
def topLevelAttr = Seq(cls := "documentableElement")
183183
++ anchor
184184
++ filterAttributes.map{ case (n, v) => Attr(s"data-f-$n") := v }
185185

0 commit comments

Comments
 (0)