Skip to content

Commit 27b0f60

Browse files
Lucas LeblancLucas Leblanc
Lucas Leblanc
authored and
Lucas Leblanc
committed
Add resizing to png images
1 parent 5911c9f commit 27b0f60

File tree

3 files changed

+17
-18
lines changed

3 files changed

+17
-18
lines changed

scaladoc/resources/dotty_res/styles/theme/components/button/icon-button.css

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -539,18 +539,30 @@
539539
display: none;
540540
}
541541

542-
.icon-button.custom::after{
543-
content: var(--bgimage);
544-
max-width: fit-content;
542+
.icon-button.custom::after {
543+
content: "";
544+
background-image: var(--bgimage);
545+
background-repeat: no-repeat;
546+
background-position: center;
547+
background-size: contain; /* Adjust this value to control the size */
548+
display: block;
549+
max-width: 100%;
550+
max-height: 100%;
545551
}
546552

547553
.theme-dark .icon-button.custom-dark{
548554
display: unset;
549555
}
550556

551557
.theme-dark .icon-button.custom-dark::after{
552-
content: var(--bgimage-dark);
553-
max-width: fit-content;
558+
content: "";
559+
background-image: var(--bgimage-dark);
560+
background-repeat: no-repeat;
561+
background-position: center;
562+
background-size: contain; /* Adjust this value to control the size */
563+
display: block;
564+
max-width: 100%;
565+
max-height: 100%;
554566
}
555567

556568
.theme-dark .icon-button.custom{

scaladoc/src/dotty/tools/scaladoc/SocialLinks.scala

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
package dotty.tools.scaladoc
22

3-
import java.nio.file.Path
4-
import java.nio.file.Paths
5-
import dotty.tools.dotc.core.Contexts.Context
6-
73
enum SocialLinks(val url: String, val className: String):
84
case Github(ghUrl: String) extends SocialLinks(ghUrl, "gh")
95
case Twitter(tUrl: String) extends SocialLinks(tUrl, "twitter")

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

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,9 @@ package dotty.tools.scaladoc
22
package renderers
33

44
import util.HTML._
5-
import scala.jdk.CollectionConverters._
6-
import java.net.URI
7-
import java.net.URL
85
import dotty.tools.scaladoc.site._
9-
import scala.util.Try
106
import org.jsoup.Jsoup
11-
import java.nio.file.Paths
12-
import java.nio.file.Path
137
import java.nio.file.Files
14-
import java.nio.file.FileVisitOption
15-
import java.io.File
16-
import dotty.tools.scaladoc.staticFileSymbolUUID
178

189
class HtmlRenderer(rootPackage: Member, members: Map[DRI, Member])(using ctx: DocContext)
1910
extends Renderer(rootPackage, members, extension = "html"):

0 commit comments

Comments
 (0)