Skip to content

Instantly share code, notes, and snippets.

@joshellington
Last active October 23, 2024 18:29
Show Gist options
  • Save joshellington/51765a15d8f780089619b638fc6aea6b to your computer and use it in GitHub Desktop.
Save joshellington/51765a15d8f780089619b638fc6aea6b to your computer and use it in GitHub Desktop.
A slightly refined, dark-focused, mobile-supported Kagi theme. Works best using Dark Theme, and either Moon Dark or Royal Blue.
:root {
--font-main: "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
--font-lufga: "Inter", system-ui, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
}
.theme_dark, .theme_moon_dark, .theme_moon_dark_conditional {
--app-bg: #181715;
--page-text: #F2E6D7;
--app-text: #F2E6D7;
--primary: #F2E6D7;
--primary-hover: #181715;
--header-bg: #181715;
--header-border: #2B2621;
--app-sidebar-bg: #181715;
--input-bg: #1E1E1E;
--color-search-input: #181715;
--search-result-title: #F2E6D7;
--search-result-title-hover: #BBB2A8;
--search-result-content-text: #BBB2A8;
--search-result-url-link: #BBB2A8;
--search-result-date-bg: #2B2621;
--search-result-date-new-bg: #603C12;
--domain-rank-icon-color-trackers: #C97E26;
--color_link: #C97E26;
--primary-hover: #BBB2A8;
--primary-visited: #766B5E;
--related-item-bg: #2B2621;
--inline-domain-tag-bg: #2B2621;
--inline-header-border: #2B2621;
--inline-header-title: #F2E6D7;
--inline-widget-bg: #2B2621;
--primary-700: #766B5E;
--primary-800: #BBB2A8;
--resultsummary-highlight: #C97E26;
--resultsummary-highlight_text: #2B2621;
--wiki-title: #F2E6D7;
--wiki-content-links: #C97E26;
--wiki-nw-links: #C97E26;
--result-item-title-border: transparent;
--site_info_bg: #2B2621;
--site_info_bottom_bg: #1E1E1E;
--btn-group-bg: #1E1E1E;
--dd-hover-bg: #2B2621;
--dd-list-input-bg: #2B2621;
--kagi-accent: #2B2621;
--filter-dd-bg: #2B2621;
/* mobile */
--m_sri_gap_color: #2B2621;
}
/* disable horizontal scrollbars */
body {
overflow-x: hidden;
}
::selection {
background-color: var(--color_link);
color: #2B2621;
}
/* header, logo */
.app-logo.--kagi {
top: 26px;
}
/* container-level */
.results-box {
margin-top: 10px;
}
/* update color borders for serp tabs */
.serp-nav .nav_item.--active:after, .serp-nav .nav_item:hover:after, ._0_lenses .k_ui_dropdown.--active .k_ui_dropdown_first_item span:after {
border-color: var(--primary);
}
/* disable links borders */
#layout-v2 a, .__sri-title .__sri_title_link, .__sri-title .__sri_title_link:hover, .wikipediaResult a:hover {
border-bottom: 0;
}
/* general input focus */
:focus-visible {
outline-color: var(--color_link);
}
/* result tweaks */
.__sri-title-box, .__sri-title, .__sri-url-box, .__sri-body {
padding-left: 0;
}
.__sri-title .__domain-favicon {
margin-left: -25px;
}
.__sri-preview {
left: 0;
}
.__sri-url-box {
margin-bottom: 4px;
}
.__sri-url {
font-size: 0.75rem;
}
.__sri-time {
background-color: transparent;
color: #948677;
padding: 0;
}
.__sri-time::after {
content: "—";
display: inline-block;
padding: 0 4px;
}
.__sri-time.--new {
background: transparent;
color: var(--color_link);
}
.__sri-desc {
line-height: 1.57;
}
.newsResultItem .newsResultBody {
margin-top: 0;
}
.top_podcasts_box:empty {
display: none;
}
.freeScroller {
overflow-x: auto !important;
}
/* domain info popover */
#domainInfoModal .d-info-box-title-header {
background: transparent;
}
#domainInfoModal .d-info-domain-title {
text-shadow: none;
color: var(--color-primary);
}
#domainInfoModal .rakned-box-close {
color: var(--color-primary);
}
/* wolfram-alpha/"smart" things specific */
.widget_holder .wasb, .wasb, .wasb-ans {
font-family: var(--font-main);
}
.widget_holder .wasb {
border: 1px solid var(--color-primary-dim_3);
}
.suggestions_area {
border-bottom: 1px solid var(--color-primary-dim_3);
}
/* misc */
.wikipediaResult .wiki-title a:hover {
color: var(--color-primary_hover);
border-bottom: 0;
}
.wiki-desc-box {
font-size: 14px;
}
.k_ui_toggle_switch {
--active-bg-color: var(--color_link);
}
.footer .footerInner ul li, footer .footerInner ul li {
color: inherit;
}
/* mobile specific */
@media screen and (max-width: 767px) {
/* header */
.m-h {
padding: 0;
}
.m-h .m-h-i {
height: auto;
}
.m-h .control-center-btn {
top: 32px;
z-index: 51;
}
.m-h .m-app-logo {
display: none;
}
/* search box */
.search-form {
height: auto;
}
.search_form_box {
width: 100%;
}
.search-form .search-input-container {
padding-inline: 0;
border: 0;
}
.search-form .search_area {
min-height: auto;
}
.search-form .search-input-box {
border: 1px solid var(--header-border);
border-radius: 24px;
padding: 0 14px;
}
.s-f-w .search-form-container {
padding: 10px 46px 5px 10px;
}
.s-f-w.--active {
margin: 0;
}
.s-f-w.--active .search-input-container {
border: 0;
min-height: 64px;
}
.s-f-w.--active .search-form-container {
margin: 0;
padding: 0 10px;
height: 64px;
}
.s-f-w.--active .search-form {
padding-top: 0;
}
.s-f-w.--active .search-input-box {
margin-left: 4px;
padding-right: 0;
max-width: 100%;
}
.s-f-w.--active .search-form-icons {
margin-right: 0;
}
.s-f-w.--active .auto_suggestions {
top: 64px;
}
.s-f-w.--active .m-b-arrow {
position: relative;
width: auto;
height: auto;
left: 0;
}
#searchFormSubmit {
display: none;
}
.m-h .search-form-icons .clear-search {
margin-right: 4px;
}
.m-b-arrow {
width: 35px;
top: 0;
}
.search-form .auto_suggestions {
margin: 0;
border: 0;
}
.widgetContent {
margin-bottom: 0;
}
/* remove top/bottom border between results */
.search-result, .sri-group, .inline-content+.search-result, .inline-content+.sri-group {
border-top: 0;
border-bottom: 0;
}
/* tighten line-height */
.__sri-title .__sri_title_link {
line-height: 1.65rem;
}
/* hide inline image preview */
.__sri-body.--img .__sri-preview {
display: none;
}
.__sri-body.--img .__sri-desc:before {
display: none;
}
/* tighten up secondary results to match rhythm */
.sri-group .sr-group {
margin-top: 15px;
}
/* disable bottom-right distracting button on scroll up */
.quick-search-btn {
display: none;
}
/* fix video results spacing */
#newsHeader, .headerVideos {
margin-right: 0;
}
/* clean up page 2 results spacing */
._0_page-separator {
margin-bottom: 15px;
}
/* give the page 2 button more bottom room */
.main-footer {
padding-bottom: 40px;
}
/* light-specific */
.theme_light .search-form .search-form-icons {
/* background: linear-gradient(90deg, transparent 0%, rgb(255, 255, 255) 50%); */
}
}
@maique
Copy link

maique commented Oct 19, 2023

Thank you for this one. Loving it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment