Skip to content

Commit 9d98afe

Browse files
committed
fix: fixed style of go to top button
1 parent f4510a2 commit 9d98afe

File tree

2 files changed

+61
-36
lines changed
  • dokka-subprojects/plugin-base/src/main/resources/dokka

2 files changed

+61
-36
lines changed

dokka-subprojects/plugin-base/src/main/resources/dokka/styles/style.css

Lines changed: 50 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
--background-color: var(--default-white);
3030
--dark-mode-and-search-icon-color: var(--default-white);
3131
--color-dark: #27282c;
32-
--default-font-family: JetBrains Sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI,Roboto, Oxygen, Ubuntu,Cantarell, Droid Sans, Helvetica Neue, Arial, sans-serif;
32+
--default-font-family: JetBrains Sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Arial, sans-serif;
3333
--default-monospace-font-family: JetBrains Mono, SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
3434
--default-font-size: 15px;
3535
--average-color: var(--color-dark);
@@ -85,6 +85,7 @@ html, body {
8585
height: 100%;
8686
width: 100%;
8787
}
88+
8889
/* /--- root styles --- */
8990

9091
/* --- global tags styles --- */
@@ -179,6 +180,7 @@ tbody > tr {
179180
td:first-child {
180181
width: 20vw;
181182
}
183+
182184
/* /--- global tags styles --- */
183185

184186
/* --- utils classes --- */
@@ -210,6 +212,7 @@ td:first-child {
210212
clear: both;
211213
height: 0;
212214
}
215+
213216
/* /--- utils classes --- */
214217

215218
/* ---dark theme --- */
@@ -237,6 +240,7 @@ td:first-child {
237240

238241
--sidemenu-section-active-color: var(--color-dark);
239242
}
243+
240244
/* /---dark theme --- */
241245

242246
.root {
@@ -313,14 +317,15 @@ td:first-child {
313317
height: 28px;
314318
width: 28px;
315319
}
320+
316321
/* /--- Navigation MENU --- */
317322

318323
.library-version {
319324
position: relative;
320325
top: -4px;
321326
margin-left: 3px;
322327

323-
color: rgba(255,255,255,.7);
328+
color: rgba(255, 255, 255, .7);
324329
font-size: 13px;
325330
font-weight: normal;
326331
line-height: 16px;
@@ -339,6 +344,7 @@ td:first-child {
339344
padding: 5px 0 5px;
340345
}
341346
}
347+
342348
/* --- Navigation controls --- */
343349
.navigation-controls {
344350
display: flex;
@@ -392,6 +398,7 @@ td:first-child {
392398
display: none;
393399
}
394400
}
401+
395402
/* /--- Navigation THEME --- */
396403

397404
/* --- Navigation HOMEPAGE --- */
@@ -422,11 +429,13 @@ td:first-child {
422429
display: none;
423430
}
424431
}
432+
425433
/* /--- Navigation HOMEPAGE --- */
426434

427435
.navigation .platform-selector:not([data-active]) {
428436
color: #fff;
429437
}
438+
430439
/* /--- Navigation controls --- */
431440
/* /--- Navigation styles --- */
432441

@@ -496,6 +505,7 @@ td:first-child {
496505
padding-top: 22px;
497506
padding-bottom: 16px;
498507
}
508+
499509
/* /--- Layout styles --- */
500510

501511
/* --- Main Content styles --- */
@@ -521,6 +531,7 @@ td:first-child {
521531
.main-content :is(h1, h2) {
522532
font-weight: 530;
523533
}
534+
524535
/* /--- Main Content styles --- */
525536

526537
/* /--- Breadcrumbs styles --- */
@@ -537,6 +548,7 @@ td:first-child {
537548
.breadcrumbs .current {
538549
color: var(--default-font-color);
539550
}
551+
540552
/* /--- Breadcrumbs styles --- */
541553

542554
.tabs-section,
@@ -1010,7 +1022,7 @@ h1.cover {
10101022
.UnderCoverText table {
10111023
display: block;
10121024
word-break: normal;
1013-
overflow: auto;
1025+
overflow: auto;
10141026
}
10151027
}
10161028

@@ -1042,7 +1054,7 @@ p.paragraph img {
10421054

10431055
.deprecation-content {
10441056
margin: 20px 10px;
1045-
border:1px solid var(--border-color);
1057+
border: 1px solid var(--border-color);
10461058
padding: 13px 15px 16px 15px;
10471059
}
10481060

@@ -1361,6 +1373,7 @@ Just in case of possible performance degradation it excluding tabs with briefs o
13611373
.keyValue {
13621374
grid-template-columns: 20% 80%;
13631375
}
1376+
13641377
.keyValue > div:first-child {
13651378
word-break: break-word;
13661379
}
@@ -1432,46 +1445,51 @@ div.runnablesample {
14321445
background-color: var(--footer-background);
14331446
}
14341447

1435-
.footer span.go-to-top-icon {
1436-
border-radius: 2em;
1437-
padding: 11px 10px !important;
1448+
.footer--button {
1449+
display: flex;
1450+
align-items: center;
1451+
justify-content: center;
1452+
width: 40px;
1453+
height: 40px;
1454+
border-radius: 50%;
14381455
background-color: var(--footer-go-to-top-color);
1456+
background-repeat: no-repeat;
1457+
background-position: 50% 50%;
1458+
padding: 0;
1459+
border: none;
1460+
cursor: pointer;
1461+
font-size: 0;
1462+
line-height: 0;
1463+
transition: background-color 200ms ease-in-out;
1464+
will-change: background-color;
14391465
}
14401466

1441-
.footer span.go-to-top-icon > a::before {
1442-
content: url("../images/go-to-top-icon.svg");
1467+
.footer--button:hover {
1468+
opacity: 0.9;
14431469
}
14441470

1445-
.footer > span:first-child {
1471+
.footer--button_go-to-top {
1472+
background-image: url("../images/go-to-top-icon.svg");
14461473
margin-left: var(--horizontal-spacing-for-content);
1447-
padding-left: 0;
1448-
}
1449-
1450-
.footer > span:last-child {
1451-
margin-right: var(--horizontal-spacing-for-content);
1452-
padding-right: 0;
1453-
}
1454-
1455-
.footer > span {
1456-
padding: 0 16px;
1474+
margin-right: 8px;
14571475
}
14581476

1459-
.footer a {
1477+
.footer--link {
1478+
display: inline-flex;
1479+
align-items: center; ;
14601480
color: var(--breadcrumb-font-color);
14611481
}
14621482

1463-
.footer span.go-to-top-icon > #go-to-top-link {
1464-
padding: 0;
1465-
border: none;
1466-
}
1467-
1468-
.footer .padded-icon {
1469-
padding-left: 0.5em;
1483+
.footer--external-link-icon {
1484+
width: 12px;
1485+
height: 12px;
1486+
margin-left: 4px;
1487+
margin-right: var(--horizontal-spacing-for-content);
1488+
background-image: url("../images/footer-go-to-link.svg");
1489+
background-repeat: no-repeat;
1490+
background-position: 50% 50%;
14701491
}
14711492

1472-
.footer .padded-icon::before {
1473-
content: url("../images/footer-go-to-link.svg");
1474-
}
14751493
/* /--- footer --- */
14761494

14771495
/* Logo styles */
@@ -1502,6 +1520,7 @@ div.runnablesample {
15021520
display: none;
15031521
}
15041522
}
1523+
15051524
/* / Logo styles */
15061525

15071526
/*
Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
<#macro display>
2-
<div class="footer">
3-
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>${footerMessage}</span><span
4-
class="pull-right"><span>Generated by </span><a
5-
href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
6-
</div>
2+
<div class="footer">
3+
<a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
4+
<span>${footerMessage}</span>
5+
<span class="pull-right">
6+
<span>Generated by </span>
7+
<a class="footer--link" href="https://github.com/Kotlin/dokka">
8+
<span>dokka</span>
9+
<span class="footer--external-link-icon"></span>
10+
</a>
11+
</span>
12+
</div>
713
</#macro>

0 commit comments

Comments
 (0)