Skip to content

Commit b532688

Browse files
berezinantIgnatBeresnev
authored andcommitted
refactor: improved navigation controls style (#3410)
(cherry picked from commit 32d9815)
1 parent 5324006 commit b532688

File tree

4 files changed

+19
-49
lines changed

4 files changed

+19
-49
lines changed

dokka-subprojects/plugin-base-frontend/src/main/components/search/search.scss

-4
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,6 @@ $secondary-font-color: hsla(0, 0%, 100%, 0.6);
1313
fill: #fff;
1414
fill: var(--dark-mode-and-search-icon-color);
1515

16-
&:focus {
17-
outline: none;
18-
}
19-
2016
&:hover {
2117
background: var(--white-10);
2218
}
Loading

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

+16-40
Original file line numberDiff line numberDiff line change
@@ -355,74 +355,50 @@ td:first-child {
355355
display: none;
356356
}
357357

358-
/* --- Navigation THEME --- */
359-
.navigation-controls--search {
358+
.navigation-controls--btn {
360359
display: inline-flex;
361-
font-size: 0;
362-
line-height: 0;
363-
}
364-
365-
.navigation-controls--theme {
366-
display: block;
360+
align-items: center;
361+
justify-content: center;
362+
width: 40px;
363+
height: 40px;
367364
border-radius: 50%;
368365
background-color: inherit;
366+
background-position: 50% 50%;
369367
padding: 0;
370368
border: none;
371369
cursor: pointer;
372370
font-size: 0;
373371
line-height: 0;
372+
transition: background-color 200ms ease-in-out;
373+
will-change: background-color;
374374
}
375375

376-
.navigation-controls--theme::before {
377-
height: 40px;
378-
width: 40px;
379-
}
380-
381-
.navigation-controls--theme:hover {
382-
background: var(--white-10);
376+
.navigation-controls--btn:hover {
377+
background-color: var(--white-10);
383378
}
384379

385-
.navigation-controls--theme::before {
386-
display: block;
387-
content: url("../images/theme-toggle.svg");
380+
.navigation-controls--theme {
381+
background-image: url("../images/theme-toggle.svg");
382+
background-repeat: no-repeat;
388383
}
389384

390385
@media (max-width: 759px) {
391386
.navigation-controls--theme {
392387
display: none;
393388
}
394389
}
395-
/* /--- Navigation THEME --- */
396390

397-
/* --- Navigation HOMEPAGE --- */
398391
.navigation-controls--homepage {
399-
height: 40px;
400-
width: 40px;
401-
display: block;
402-
border-radius: 50%;
403-
cursor: pointer;
404-
}
405-
406-
.navigation-controls--homepage a::before {
407-
height: 100%;
408-
width: 20px;
409-
margin-left: 10px;
410-
display: block;
411-
content: "";
412-
background: url("../images/homepage.svg");
413-
background-size: 100% 100%;
414-
}
415-
416-
.navigation-controls--homepage:hover {
417-
background: var(--white-10);
392+
background-image: url("../images/homepage.svg");
393+
background-repeat: no-repeat;
394+
background-size: 24px 24px;
418395
}
419396

420397
@media (max-width: 759px) {
421398
.navigation-controls--homepage {
422399
display: none;
423400
}
424401
}
425-
/* /--- Navigation HOMEPAGE --- */
426402

427403
.navigation .platform-selector:not([data-active]) {
428404
color: #fff;

dokka-subprojects/plugin-base/src/main/resources/dokka/templates/includes/header.ftl

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
</div>
2323
<div class="navigation-controls">
2424
<#if homepageLink?has_content>
25-
<div class="navigation-controls--btn navigation-controls--homepage" id="homepage-link" role="button"><a href="${homepageLink}"></a></div>
25+
<a class="navigation-controls--btn navigation-controls--homepage" id="homepage-link" href="${homepageLink}"></a>
2626
</#if>
2727
<button class="navigation-controls--btn navigation-controls--theme" id="theme-toggle-button" type="button">switch theme</button>
2828
<div class="navigation-controls--btn navigation-controls--search" id="searchBar" role="button">search in API</div>

0 commit comments

Comments
 (0)