Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fixed style of go to top button #3411

Merged
merged 3 commits into from
Jan 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
--background-color: var(--default-white);
--dark-mode-and-search-icon-color: var(--default-white);
--color-dark: #27282c;
--default-font-family: JetBrains Sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI,Roboto, Oxygen, Ubuntu,Cantarell, Droid Sans, Helvetica Neue, Arial, sans-serif;
--default-font-family: JetBrains Sans, Inter, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Droid Sans, Helvetica Neue, Arial, sans-serif;
--default-monospace-font-family: JetBrains Mono, SFMono-Regular, Consolas, Liberation Mono, Menlo, Courier, monospace;
--default-font-size: 15px;
--average-color: var(--color-dark);
Expand Down Expand Up @@ -85,6 +85,7 @@ html, body {
height: 100%;
width: 100%;
}

/* /--- root styles --- */

/* --- global tags styles --- */
Expand Down Expand Up @@ -179,6 +180,7 @@ tbody > tr {
td:first-child {
width: 20vw;
}

/* /--- global tags styles --- */

/* --- utils classes --- */
Expand Down Expand Up @@ -210,6 +212,7 @@ td:first-child {
clear: both;
height: 0;
}

/* /--- utils classes --- */

/* ---dark theme --- */
Expand Down Expand Up @@ -237,6 +240,7 @@ td:first-child {

--sidemenu-section-active-color: var(--color-dark);
}

/* /---dark theme --- */

.root {
Expand Down Expand Up @@ -313,14 +317,15 @@ td:first-child {
height: 28px;
width: 28px;
}

/* /--- Navigation MENU --- */

.library-version {
position: relative;
top: -4px;
margin-left: 3px;

color: rgba(255,255,255,.7);
color: rgba(255, 255, 255, .7);
font-size: 13px;
font-weight: normal;
line-height: 16px;
Expand All @@ -339,6 +344,7 @@ td:first-child {
padding: 5px 0 5px;
}
}

/* --- Navigation controls --- */
.navigation-controls {
display: flex;
Expand Down Expand Up @@ -403,6 +409,7 @@ td:first-child {
.navigation .platform-selector:not([data-active]) {
color: #fff;
}

/* /--- Navigation controls --- */
/* /--- Navigation styles --- */

Expand Down Expand Up @@ -472,6 +479,7 @@ td:first-child {
padding-top: 22px;
padding-bottom: 16px;
}

/* /--- Layout styles --- */

/* --- Main Content styles --- */
Expand All @@ -497,6 +505,7 @@ td:first-child {
.main-content :is(h1, h2) {
font-weight: 530;
}

/* /--- Main Content styles --- */

/* /--- Breadcrumbs styles --- */
Expand All @@ -513,6 +522,7 @@ td:first-child {
.breadcrumbs .current {
color: var(--default-font-color);
}

/* /--- Breadcrumbs styles --- */

.tabs-section,
Expand Down Expand Up @@ -1006,7 +1016,7 @@ h1.cover {
.UnderCoverText table {
display: block;
word-break: normal;
overflow: auto;
overflow: auto;
}
}

Expand Down Expand Up @@ -1038,7 +1048,7 @@ p.paragraph img {

.deprecation-content {
margin: 20px 10px;
border:1px solid var(--border-color);
border: 1px solid var(--border-color);
padding: 13px 15px 16px 15px;
}

Expand Down Expand Up @@ -1357,6 +1367,7 @@ Just in case of possible performance degradation it excluding tabs with briefs o
.keyValue {
grid-template-columns: 20% 80%;
}

.keyValue > div:first-child {
word-break: break-word;
}
Expand Down Expand Up @@ -1428,46 +1439,52 @@ div.runnablesample {
background-color: var(--footer-background);
}

.footer span.go-to-top-icon {
border-radius: 2em;
padding: 11px 10px !important;
.footer--button {
display: flex;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: var(--footer-go-to-top-color);
background-repeat: no-repeat;
background-position: 50% 50%;
padding: 0;
border: none;
cursor: pointer;
font-size: 0;
line-height: 0;
transition: background-color 200ms ease-in-out;
will-change: background-color;
}

.footer span.go-to-top-icon > a::before {
content: url("../images/go-to-top-icon.svg");
.footer--button:hover {
opacity: 0.9;
}

.footer > span:first-child {
.footer--button_go-to-top {
background-image: url("../images/go-to-top-icon.svg");
margin-left: var(--horizontal-spacing-for-content);
padding-left: 0;
}

.footer > span:last-child {
margin-right: var(--horizontal-spacing-for-content);
padding-right: 0;
}

.footer > span {
padding: 0 16px;
margin-right: 8px;
}

.footer a {
.footer--link {
display: inline-flex;
align-items: center;
color: var(--breadcrumb-font-color);
}

.footer span.go-to-top-icon > #go-to-top-link {
padding: 0;
border: none;
}

.footer .padded-icon {
padding-left: 0.5em;
.footer--link_external:after {
content: '';
width: 12px;
height: 12px;
margin-left: 4px;
margin-right: var(--horizontal-spacing-for-content);
background-image: url("../images/footer-go-to-link.svg");
background-repeat: no-repeat;
background-position: 50% 50%;
}

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

/* Logo styles */
Expand Down Expand Up @@ -1498,6 +1515,7 @@ div.runnablesample {
display: none;
}
}

/* / Logo styles */

/*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<#macro display>
<div class="footer">
<span class="go-to-top-icon"><a href="#content" id="go-to-top-link"></a></span><span>${footerMessage}</span><span
class="pull-right"><span>Generated by </span><a
href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span>
</div>
<div class="footer">
<a href="#content" id="go-to-top-link" class="footer--button footer--button_go-to-top"></a>
<span>${footerMessage}</span>
<span class="pull-right">
<span>Generated by </span>
<a class="footer--link footer--link_external" href="https://github.com/Kotlin/dokka">
<span>dokka</span>
</a>
</span>
</div>
</#macro>
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ class CustomFooterTest : HtmlRenderingOnlyTestBase() {
val page = testPage { }
HtmlRenderer(context).render(page)
renderedContent.match(
Span(A()),
A(),
Span(Div("Custom message")),
Span(Span("Generated by "), A(Span("dokka"), Span()))
Span(Span("Generated by "), A(Span("dokka")))
)
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class FooterMessageTest : HtmlRenderingOnlyTestBase() {
val page = testPage { }
HtmlRenderer(context).render(page)
renderedContent.match(
Span(A()),
A(),
Span(defaultFooterMessage),
Span(Span("Generated by "), A(Span("dokka"), Span()))
Span(Span("Generated by "), A(Span("dokka")))
)
}

Expand Down
Loading