sweeten 0.14.0

`sweeten` your daily `iced` brew
Documentation
/* Sweeten brand colors for docs.rs */

@import url('https://fonts.googleapis.com/css2?family=Lato:wght@400;700;900&family=Lekton:wght@400;700&display=swap');

/* Shared palette */
:root {
    /* Green */
    --green-900: #085e16;
    --green-700: #2a9d3d;
    --green-500: #38b24d;
    --green-300: #3dc754;

    /* Lime */
    --lime-900: #55931f;
    --lime-700: #76c431;
    --lime-500: #88cb4d;
    --lime-300: #9cdf62;

    /* Blue */
    --blue-900: #19318f;
    --blue-700: #2740a5;
    --blue-500: #3350c1;
    --blue-300: #5971cf;

    /* Cobalt */
    --cobalt-900: #1c4359;
    --cobalt-700: #2d5b76;
    --cobalt-500: #4682a4;
    --cobalt-300: #5abaf2;

    /* Neutral */
    --black: #000000;
    --gray-950: #0d0f11;
    --gray-900: #1a1d21;
    --gray-600: #3d4249;
    --gray-400: #6b7280;
    --gray-200: #d1d5db;
    --gray-100: #e2e8f0;
    --gray-50: #f1f5f9;
    --white: #f8fafc;

    --font-family: 'Lato', ui-sans-serif, system-ui, sans-serif;
    --font-family-code: 'Lekton', ui-monospace, monospace;
}

/* Dark theme */
:root[data-theme="dark"] {
    --sweeten-bg: var(--gray-900);
    --sweeten-bg-code: var(--gray-950);
    --sweeten-active: var(--lime-500);
    --sweeten-muted: var(--gray-400);
    --sweeten-text: var(--gray-200);
    --sweeten-text-heading: var(--white);
    --sweeten-link: var(--cobalt-300);
    --sweeten-sidebar-hover-bg: var(--gray-600);
    --sweeten-search-bg: var(--gray-600);
    --sweeten-search-text: var(--white);
    --sweeten-target-bg: rgba(255, 255, 255, 0.05);
    --sweeten-border: var(--gray-600);
    --sweeten-mod: var(--green-500);
    --sweeten-mod-hover: var(--green-300);
    --sweeten-fn: var(--lime-500);
    --sweeten-fn-hover: var(--lime-300);
    --sweeten-type: var(--cobalt-300);
    --sweeten-type-hover: var(--cobalt-300);

    /* Override rustdoc dark theme variables */
    --main-background-color: var(--sweeten-bg);
    --main-color: var(--sweeten-text);
    --sidebar-background-color: var(--sweeten-bg);
    --sidebar-background-color-hover: var(--sweeten-sidebar-hover-bg);
    --link-color: var(--sweeten-link);
    --sidebar-link-color: var(--sweeten-muted);
    --sidebar-current-link-background-color: transparent;
    --search-input-focused-border-color: var(--sweeten-active);
    --headings-border-bottom-color: var(--sweeten-border);
    --settings-button-border-focus: var(--sweeten-active);
}

/* Light theme */
:root[data-theme="light"] {
    --sweeten-bg: var(--white);
    --sweeten-bg-code: var(--gray-50);
    --sweeten-active: var(--lime-700);
    --sweeten-muted: var(--gray-400);
    --sweeten-text: var(--gray-900);
    --sweeten-text-heading: var(--black);
    --sweeten-link: var(--cobalt-700);
    --sweeten-sidebar-hover-bg: var(--gray-100);
    --sweeten-search-bg: var(--gray-100);
    --sweeten-search-text: var(--gray-900);
    --sweeten-target-bg: rgba(0, 0, 0, 0.05);
    --sweeten-border: var(--gray-200);
    --sweeten-mod: var(--green-700);
    --sweeten-mod-hover: var(--green-900);
    --sweeten-fn: var(--lime-900);
    --sweeten-fn-hover: var(--lime-700);
    --sweeten-type: var(--cobalt-700);
    --sweeten-type-hover: var(--cobalt-500);

    /* Override rustdoc light theme variables */
    --main-background-color: var(--sweeten-bg);
    --main-color: var(--sweeten-text);
    --sidebar-background-color: var(--sweeten-bg);
    --sidebar-background-color-hover: var(--sweeten-sidebar-hover-bg);
    --link-color: var(--sweeten-link);
    --sidebar-link-color: var(--sweeten-muted);
    --sidebar-current-link-background-color: transparent;
    --search-input-focused-border-color: var(--sweeten-active);
    --headings-border-bottom-color: var(--sweeten-border);
    --settings-button-border-focus: var(--sweeten-active);
}

#crate-search,
h1,
h2,
h3,
h4,
h5,
h6,
.sidebar,
.mobile-topbar,
.search-input,
.search-results .result-name,
.out-of-band,
.sub-heading,
span.since,
a.src,
rustdoc-toolbar,
summary.hideme,
.scraped-example-list,
.rustdoc-breadcrumbs,
ul.all-items {
    font-family: var(--font-family);
}

/* Code uses Lekton */
pre, code, .rustdoc code, .docblock code, .docblock pre {
    font-family: var(--font-family-code);
}

/* Inline code in prose should match surrounding text size */
.docblock p code,
.docblock li code,
.docblock td code {
    font-size: inherit;
    padding: 0.1em 0.3em;
}

/* Item table descriptions: inline code gets background */
.item-table dd code {
    background-color: var(--sweeten-bg-code);
    padding: 0.1em 0.4em;
    border-radius: 3px;
}

/* Semantic colors for different item types */
/* Modules - green */
.item-table .mod a {
    color: var(--sweeten-mod);
}
.item-table .mod a:hover {
    color: var(--sweeten-mod-hover);
}

/* Functions - lime */
.item-table .fn a {
    color: var(--sweeten-fn);
}
.item-table .fn a:hover {
    color: var(--sweeten-fn-hover);
}

/* Enums/Types - cobalt */
.item-table .enum a,
.item-table .struct a,
.item-table .type a {
    color: var(--sweeten-type);
}
.item-table .enum a:hover,
.item-table .struct a:hover,
.item-table .type a:hover {
    color: var(--sweeten-type-hover);
}

/* Override theme background */
body {
    background-color: var(--sweeten-bg);
    font-family: var(--font-family);
}

/* Ensure bold text uses proper weight */
strong, b, h1, h2, h3, .sidebar .logo-container {
    font-weight: 700;
}

.sidebar,
.sidebar-elems,
nav.sub {
    background-color: var(--sweeten-bg);
}

/* Main content area */
.content,
main {
    background-color: var(--sweeten-bg);
    color: var(--sweeten-text);
}

/* Links - cobalt by default, lime on hover */
a {
    color: var(--sweeten-link);
    text-decoration: none;
}

a:hover {
    color: var(--sweeten-active);
}

/* Headers */
h1,
h2,
h3 {
    color: var(--sweeten-text-heading);
}

h4,
h5,
h6 {
    color: var(--sweeten-text);
}

/* Sidebar section headers */
.sidebar .block h3,
.sidebar-elems .block h3,
.sidebar .block h3 a,
.sidebar-elems .block h3 a {
    color: var(--sweeten-text-heading);
}

/* Sidebar active item */
.sidebar .current {
    background-color: var(--sweeten-bg) !important;
    color: var(--sweeten-active);
}

.sidebar a {
    color: var(--sweeten-muted);
}

.sidebar-elems a:hover,
.sidebar a:hover,
.sidebar .current a {
    color: var(--sweeten-text-heading);
    background-color: var(--sweeten-sidebar-hover-bg) !important;
}

:target:not([data-nosnippet]) {
    background-color: var(--sweeten-target-bg);
    color: var(--sweeten-active);
    border-right: 1px solid var(--sweeten-active);
}

/* Search box */
.search-input {
    background-color: var(--sweeten-search-bg);
    border: none;
    border-radius: 0;
    color: var(--sweeten-search-text);
}

.search-input:focus {
    border: 1px solid var(--sweeten-active);
}

/* Muted text */
.since,
.stability,
.out-of-band,
.docblock .warning {
    color: var(--sweeten-muted);
}

/* Function/type signatures */
.item-decl {
    background-color: var(--sweeten-bg-code);
}

/* All code blocks */
.docblock pre,
.docblock .example-wrap,
.rustdoc .example-wrap,
pre.rust,
.item-decl pre {
    background-color: var(--sweeten-bg-code);
}

/* Inline code in prose */
.docblock code,
.docblock p code,
.docblock li code {
    background-color: var(--sweeten-bg-code);
}

.docblock li code {
    display: inline-block;
}

/* Top bar */
.top-doc .docblock,
.search-container {
    background-color: var(--sweeten-bg);
}