Skip to content

Commit 620b203

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

File tree

1 file changed

+19
-5
lines changed

1 file changed

+19
-5
lines changed

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

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
padding: 0;
77
height: 16px;
88
width: 16px;
9+
position: relative;
10+
overflow: hidden;
911
}
1012

1113
.icon-button:hover {
@@ -539,18 +541,30 @@
539541
display: none;
540542
}
541543

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

547555
.theme-dark .icon-button.custom-dark{
548556
display: unset;
549557
}
550558

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

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

0 commit comments

Comments
 (0)