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

refactor: improved navigation controls style #3410

Merged
merged 1 commit into from
Jan 12, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -13,10 +13,6 @@ $secondary-font-color: hsla(0, 0%, 100%, 0.6);
fill: #fff;
fill: var(--dark-mode-and-search-icon-color);

&:focus {
outline: none;
}

&:hover {
background: var(--white-10);
}
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Expand Up @@ -355,74 +355,50 @@ td:first-child {
display: none;
}

/* --- Navigation THEME --- */
.navigation-controls--search {
.navigation-controls--btn {
display: inline-flex;
font-size: 0;
line-height: 0;
}

.navigation-controls--theme {
display: block;
align-items: center;
justify-content: center;
width: 40px;
height: 40px;
border-radius: 50%;
background-color: inherit;
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;
}

.navigation-controls--theme::before {
height: 40px;
width: 40px;
}

.navigation-controls--theme:hover {
background: var(--white-10);
.navigation-controls--btn:hover {
background-color: var(--white-10);
}

.navigation-controls--theme::before {
display: block;
content: url("../images/theme-toggle.svg");
.navigation-controls--theme {
background-image: url("../images/theme-toggle.svg");
background-repeat: no-repeat;
}

@media (max-width: 759px) {
.navigation-controls--theme {
display: none;
}
}
/* /--- Navigation THEME --- */

/* --- Navigation HOMEPAGE --- */
.navigation-controls--homepage {
height: 40px;
width: 40px;
display: block;
border-radius: 50%;
cursor: pointer;
}

.navigation-controls--homepage a::before {
height: 100%;
width: 20px;
margin-left: 10px;
display: block;
content: "";
background: url("../images/homepage.svg");
background-size: 100% 100%;
}

.navigation-controls--homepage:hover {
background: var(--white-10);
background-image: url("../images/homepage.svg");
background-repeat: no-repeat;
background-size: 24px 24px;
}

@media (max-width: 759px) {
.navigation-controls--homepage {
display: none;
}
}
/* /--- Navigation HOMEPAGE --- */

.navigation .platform-selector:not([data-active]) {
color: #fff;
Expand Down
Expand Up @@ -22,7 +22,7 @@
</div>
<div class="navigation-controls">
<#if homepageLink?has_content>
<div class="navigation-controls--btn navigation-controls--homepage" id="homepage-link" role="button"><a href="${homepageLink}"></a></div>
<a class="navigation-controls--btn navigation-controls--homepage" id="homepage-link" href="${homepageLink}"></a>
</#if>
<button class="navigation-controls--btn navigation-controls--theme" id="theme-toggle-button" type="button">switch theme</button>
<div class="navigation-controls--btn navigation-controls--search" id="searchBar" role="button">search in API</div>
Expand Down