Skip to content

Commit ea65ae0

Browse files
authored
Port scrollbar to language reference stable (#17334)
2 parents 5e7bfb2 + 38bb524 commit ea65ae0

File tree

2 files changed

+23
-6
lines changed

2 files changed

+23
-6
lines changed

compiler/test-coursier/dotty/tools/coursier/CoursierScalaTests.scala

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,11 +148,11 @@ class CoursierScalaTests:
148148

149149
object CoursierScalaTests:
150150

151-
def execCmd(command: String, options: String*): List[String] =
151+
def execCmd(command: String, options: String*): (Int, List[String]) =
152152
val cmd = (command :: options.toList).toSeq.mkString(" ")
153153
val out = new ListBuffer[String]
154-
cmd.!(ProcessLogger(out += _, out += _))
155-
out.toList
154+
val code = cmd.!(ProcessLogger(out += _, out += _))
155+
(code, out.toList)
156156

157157
def csScalaCmd(options: String*): List[String] =
158158
csCmd("dotty.tools.MainGenericRunner", options*)
@@ -166,10 +166,16 @@ object CoursierScalaTests:
166166
case Nil => args
167167
case _ => "--" +: args
168168
val newJOpts = jOpts.map(s => s"--java-opt ${s.stripPrefix("-J")}").mkString(" ")
169-
execCmd("./cs", (s"""launch "org.scala-lang:scala3-compiler_3:${sys.env("DOTTY_BOOTSTRAPPED_VERSION")}" $newJOpts --main-class "$entry" --property "scala.usejavacp=true"""" +: newOptions)*)
169+
execCmd("./cs", (s"""launch "org.scala-lang:scala3-compiler_3:${sys.env("DOTTY_BOOTSTRAPPED_VERSION")}" $newJOpts --main-class "$entry" --property "scala.usejavacp=true"""" +: newOptions)*)._2
170170

171171
/** Get coursier script */
172172
@BeforeClass def setup(): Unit =
173-
val ver = execCmd("uname").head.replace('L', 'l').replace('D', 'd')
174-
execCmd("curl", s"-fLo cs https://git.io/coursier-cli-$ver") #&& execCmd("chmod", "+x cs")
173+
val ver = execCmd("uname")._2.head.replace('L', 'l').replace('D', 'd')
175174

175+
def runAndCheckCmd(cmd: String, options: String*): Unit =
176+
val (code, out) = execCmd(cmd, options*)
177+
if code != 0 then
178+
fail(s"Failed to run $cmd ${options.mkString(" ")}, exit code: $code, output: ${out.mkString("\n")}")
179+
180+
runAndCheckCmd("curl", s"-fLo cs https://git.io/coursier-cli-$ver")
181+
runAndCheckCmd("chmod", "+x cs")

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,18 @@ p {
1919
--header-height: calc(8 * var(--base-spacing));
2020
}
2121

22+
/* Scrollbar */
23+
2224
::-webkit-scrollbar {
2325
width: 0;
2426
background: transparent;
2527
}
28+
29+
#leftColumn ::-webkit-scrollbar{
30+
width: 5px;
31+
}
32+
33+
#leftColumn ::-webkit-scrollbar-thumb {
34+
background: var(--code-syntax-highlighting-scrollbar);
35+
border-radius: 2px;
36+
}

0 commit comments

Comments
 (0)