/* ==UserStyle== @name mdBook Catppuccin @namespace github.com/Sebagabones/userstyles/styles/mdbook @homepageURL https://github.com/Sebagabones/userstyles/tree/main/styles/mdbook @version 2026.04.09 @updateURL https://github.com/Sebagabones/userstyles/raw/main/styles/mdbook/catppuccin.user.less @supportURL https://github.com/Sebagabones/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Amdbook @description Soothing pastel theme for mdBook @author Catppuccin @license MIT @preprocessor less @var select lightFlavor "Light Flavor" ["latte:Latte*", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha"] @var select darkFlavor "Dark Flavor" ["latte:Latte", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha*"] @var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve*", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray"] ==/UserStyle== */ @import "https://raw.githubusercontent.com/Sebagabones/userstyles/refs/heads/main/lib/lib.less"; @-moz-document domain("rust-lang.github.io"), domain("doc.rust-lang.org"), domain("rust-book.cs.brown.edu"), domain("rustc-dev-guide.rust-lang.org"), domain("forge.rust-lang.org"), domain("lang-team.rust-lang.org"), domain("doc.redox-os.org"), url-prefix("https://lukaswirth.dev/tlborm/") { @import url("https://unpkg.com/@catppuccin/highlightjs@1.0.0/css/catppuccin-variables.css"); :root { @media (prefers-color-scheme: light) { #catppuccin(@lightFlavor); } @media (prefers-color-scheme: dark) { #catppuccin(@darkFlavor); } } #catppuccin(@flavor) { #lib.palette(); #lib.defaults(); #lib.css-variables(); --bg: @base; --fg: @text; --sidebar-bg: @mantle; --sidebar-fg: @text; --sidebar-non-existant: @overlay0; --sidebar-active: @blue; --sidebar-spacer: @overlay0; --scrollbar: @overlay0; --icons: @overlay0; --icons-hover: @overlay2; --links: @blue; --inline-code-color: @text; --theme-popup-bg: @mantle; --theme-popup-border: @overlay0; --theme-hover: @overlay0; --quote-bg: @mantle; --quote-border: @crust; --table-border-color: @surface0; --table-header-bg: mix(@accent, @base, 30%); --table-alternate-bg: @mantle; --searchbar-border-color: @surface0; --searchbar-bg: @mantle; --searchbar-fg: @text; --searchbar-shadow-color: @crust; --searchresults-header-fg: @text; --searchresults-border-color: @surface2; --searchresults-li-bg: @base; --sidebar-header-border-color: @lavender; --search-mark-bg: @peach; --warning-border: @peach; --copy-button-filter: @subtext0-filter; --copy-button-filter-hover: @blue-filter; --blockquote-note-color: @blue; --blockquote-tip-color: @green; --blockquote-important-color: @mauve; --blockquote-warning-color: @yellow; --blockquote-caution-color: @red; /* https://github.com/cognitive-engineering-lab/mdbook-quiz */ --mdbook-incorrect: @red; --mdbook-correct: @green; code.hljs { color: @text; background: @mantle; } blockquote blockquote { border-top-color: @surface2; border-bottom-color: @surface2; } hr { color: @surface2; } del { color: @overlay2; } .ace_gutter { color: @overlay1; background: @mantle; } .ace_gutter-active-line.ace_gutter-cell { color: @pink; background: @mantle; } } }