/* ==UserStyle== @name MDN Catppuccin @namespace github.com/catppuccin/userstyles/styles/mdn @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/mdn @version 2024.12.31 @updateURL https://github.com/keonly/userstyles/raw/main/styles/mdn/catppuccin.user.less @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Amdn @description Soothing pastel theme for MDN @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== */ #catppuccin(@flavor) { @rosewater: @catppuccin[@@flavor][@rosewater]; @flamingo: @catppuccin[@@flavor][@flamingo]; @pink: @catppuccin[@@flavor][@pink]; @mauve: @catppuccin[@@flavor][@mauve]; @red: @catppuccin[@@flavor][@red]; @maroon: @catppuccin[@@flavor][@maroon]; @peach: @catppuccin[@@flavor][@peach]; @yellow: @catppuccin[@@flavor][@yellow]; @green: @catppuccin[@@flavor][@green]; @teal: @catppuccin[@@flavor][@teal]; @sky: @catppuccin[@@flavor][@sky]; @sapphire: @catppuccin[@@flavor][@sapphire]; @blue: @catppuccin[@@flavor][@blue]; @lavender: @catppuccin[@@flavor][@lavender]; @text: @catppuccin[@@flavor][@text]; @subtext1: @catppuccin[@@flavor][@subtext1]; @subtext0: @catppuccin[@@flavor][@subtext0]; @overlay2: @catppuccin[@@flavor][@overlay2]; @overlay1: @catppuccin[@@flavor][@overlay1]; @overlay0: @catppuccin[@@flavor][@overlay0]; @surface2: @catppuccin[@@flavor][@surface2]; @surface1: @catppuccin[@@flavor][@surface1]; @surface0: @catppuccin[@@flavor][@surface0]; @base: @catppuccin[@@flavor][@base]; @mantle: @catppuccin[@@flavor][@mantle]; @crust: @catppuccin[@@flavor][@crust]; @accent: @catppuccin[@@flavor][@@accentColor]; color-scheme: if(@flavor = latte, light, dark); ::selection { background-color: fade(@accent, 30%); } input, textarea { &::placeholder { color: @subtext0 !important; } } --text-primary: @text; --text-secondary: @subtext0; --text-active: @overlay1; --text-inactive: fade(@subtext0, 60%); --text-link: @accent; --text-visited: lighten(saturate(@accent, -20%), -20%); --text-invert: @base; --background-primary: @base; --background-secondary: @crust; --background-tertiary: @mantle; --background-toc-active: @crust; --background-mark-yellow: fade(@yellow, 40%); --background-mark-green: fade(@green, 40%); --background-information: fade(@blue, 10%); --background-warning: fade(@maroon, 10%); --background-critical: fade(@red, 10%); --background-success: fade(@green, 10%); --border-primary: @surface2; --border-secondary: @surface1; --button-primary-default: @text; --button-primary-hover: @subtext0; --button-primary-active: @overlay0; --button-primary-inactive: @text; --button-secondary-default: @surface2; --button-secondary-hover: @surface1; --button-secondary-active: @overlay0; --button-secondary-inactive: @surface2; --button-secondary-border-focus: @blue; --button-secondary-border-red: @red; --button-secondary-border-red-focus: @maroon; --icon-primary: @text; --icon-secondary: @subtext0; --icon-information: @blue; --icon-warning: @peach; --icon-critical: @maroon; --icon-success: @green; --accent-primary: @accent; --accent-primary-engage: fade(@accent, 10%); --accent-secondary: @accent; --accent-tertiary: fade(saturate(@accent, 10%), 10%); --shadow-01: 0 1px 2px fade(@text, 20%); --shadow-02: 0 1px 6px fade(@text, 20%); --focus-01: 0 0 0 3px fade(@text, 50%); --field-focus-border: @text; --code-token-tag: @mauve; --code-token-punctuation: @overlay2; --code-token-attribute-name: @blue; --code-token-attribute-value: @peach; --code-token-comment: @overlay2; --code-token-default: @text; --code-token-selector: @lavender; --code-token-class-selector: @yellow; --code-token-pseudo-class: @pink; --code-token-variable-2: @rosewater; --code-token-at-rule: @flamingo; --code-token-meta: @overlay1; --code-background-inline: @mantle; --code-background-block: @mantle; --notecard-link-color: @subtext1; --scrollbar-bg: transparent; --scrollbar-color: hsla(0, 0%, 100%, 0.25); --category-color: @sky; --category-color-background: fade(@sky, 40%); --code-color: lighten(@sky, 10%); --mark-color: darken(@sky, 30%); --plus-accent-color: @maroon; --html-accent-color: @red; --css-accent-color: @sapphire; --js-accent-color: @yellow; --http-accent-color: @green; --apis-accent-color: @mauve; --learn-accent-color: @pink; --plus-code-color: saturate(@maroon, 10%); --html-code-color: saturate(@red, 10%); --css-code-color: saturate(@sapphire, 10%); --js-code-color: saturate(@yellow, 10%); --http-code-color: saturate(@green, 10%); --apis-code-color: saturate(@mauve, 10%); --learn-code-color: saturate(@pink, 10%); --plus-mark-color: darken(@maroon, 30%); --html-mark-color: darken(@red, 30%); --css-mark-color: darken(@sapphire, 30%); --js-mark-color: darken(@yellow, 30%); --http-mark-color: darken(@green, 30%); --apis-mark-color: darken(@mauve, 30%); --learn-mark-color: darken(@pink, 30%); --plus-accent-background-color: fade(@maroon, 30%); --html-accent-background-color: fade(@red, 30%); --css-accent-background-color: fade(@sapphire, 30%); --js-accent-background-color: fade(@yellow, 30%); --http-accent-background-color: fade(@green, 30%); --apis-accent-background-color: fade(@mauve, 30%); --learn-accent-background-color: fade(@pink, 30%); --plus-accent-engage: fade(@maroon, 70%); --html-accent-engage: fade(@red, 70%); --css-accent-engage: fade(@sapphire, 70%); --js-accent-engage: fade(@yellow, 70%); --http-accent-engage: fade(@green, 70%); --apis-accent-engage: fade(@mauve, 70%); --learn-accent-engage: fade(@pink, 70%); --modal-backdrop-color: fade(@mantle, 70%); --selection-background-color: fade(@surface2, 60%); --text-primary-red: @red; --text-primary-green: @green; --text-primary-blue: @blue; --text-primary-yellow: @yellow; --collections-link: @flamingo; --collections-header: darken(@red, 30%); --collections-mandala: darken(@red, 20%); --collections-icon: darken(@red, 10%); --updates-link: @sky; --updates-header: @crust; --updates-mandala: lighten(@sky, 10%); --updates-icon: @sky; --ai-help-link: @green; --ai-help-header: @crust; --ai-help-mandala: lighten(@green, 10%); --ai-help-icon: @green; --form-limit-color: @overlay0; --form-limit-color-emphasis: @overlay1; --form-invalid-color: @red; --form-invalid-focus-color: @flamingo; --form-invalid-focus-effect-color: fade(@flamingo, 20%); --baseline-high-bg: hsl( hue(@green), saturation(@green), lightness(@surface0) ); --baseline-high-engine-bg: hsl( hue(@green), saturation(@green), lightness(@base) ); --baseline-high-check: @green; --baseline-low-bg: hsl(hue(@blue), saturation(@blue), lightness(@surface0)); --baseline-low-engine-bg: hsl( hue(@blue), saturation(@blue), lightness(@base) ); --baseline-low-check: @blue; --baseline-low-pill-bg: @sapphire; --baseline-low-pill-color: @base; --baseline-limited-bg: @surface0; --baseline-limited-engine-bg: @base; --baseline-limited-check: @green; --baseline-limited-cross: @peach; } @-moz-document domain("developer.mozilla.org") { .light { #catppuccin(@lightFlavor); } .dark { #catppuccin(@darkFlavor); } /* stylelint-disable selector-not-notation */ :root:not(.light):not(.dark) { @media (prefers-color-scheme: light) { #catppuccin(@lightFlavor); } @media (prefers-color-scheme: dark) { #catppuccin(@darkFlavor); } } /* stylelint-enable selector-not-notation */ } @-moz-document domain("interactive-examples.mdn.mozilla.net") { .theme-light { #catppuccin(@lightFlavor); } .theme-dark { #catppuccin(@darkFlavor); } :root { @media (prefers-color-scheme: light) { #catppuccin(@lightFlavor); } @media (prefers-color-scheme: dark) { #catppuccin(@darkFlavor); } } } /* deno-fmt-ignore */ @catppuccin: { @latte: { @rosewater: #dc8a78; @flamingo: #dd7878; @pink: #ea76cb; @mauve: #8839ef; @red: #d20f39; @maroon: #e64553; @peach: #fe640b; @yellow: #df8e1d; @green: #40a02b; @teal: #179299; @sky: #04a5e5; @sapphire: #209fb5; @blue: #1e66f5; @lavender: #7287fd; @text: #4c4f69; @subtext1: #5c5f77; @subtext0: #6c6f85; @overlay2: #7c7f93; @overlay1: #8c8fa1; @overlay0: #9ca0b0; @surface2: #acb0be; @surface1: #bcc0cc; @surface0: #ccd0da; @base: #eff1f5; @mantle: #e6e9ef; @crust: #dce0e8; }; @frappe: { @rosewater: #f2d5cf; @flamingo: #eebebe; @pink: #f4b8e4; @mauve: #ca9ee6; @red: #e78284; @maroon: #ea999c; @peach: #ef9f76; @yellow: #e5c890; @green: #a6d189; @teal: #81c8be; @sky: #99d1db; @sapphire: #85c1dc; @blue: #8caaee; @lavender: #babbf1; @text: #c6d0f5; @subtext1: #b5bfe2; @subtext0: #a5adce; @overlay2: #949cbb; @overlay1: #838ba7; @overlay0: #737994; @surface2: #626880; @surface1: #51576d; @surface0: #414559; @base: #303446; @mantle: #292c3c; @crust: #232634; }; @macchiato: { @rosewater: #f4dbd6; @flamingo: #f0c6c6; @pink: #f5bde6; @mauve: #c6a0f6; @red: #ed8796; @maroon: #ee99a0; @peach: #f5a97f; @yellow: #eed49f; @green: #a6da95; @teal: #8bd5ca; @sky: #91d7e3; @sapphire: #7dc4e4; @blue: #8aadf4; @lavender: #b7bdf8; @text: #cad3f5; @subtext1: #b8c0e0; @subtext0: #a5adcb; @overlay2: #939ab7; @overlay1: #8087a2; @overlay0: #6e738d; @surface2: #5b6078; @surface1: #494d64; @surface0: #363a4f; @base: #24273a; @mantle: #1e2030; @crust: #181926; }; @mocha: { @rosewater: #f5e0dc; @flamingo: #f2cdcd; @pink: #f5c2e7; @mauve: #cba6f7; @red: #f38ba8; @maroon: #eba0ac; @peach: #fab387; @yellow: #f9e2af; @green: #a6e3a1; @teal: #94e2d5; @sky: #89dceb; @sapphire: #74c7ec; @blue: #89b4fa; @lavender: #b4befe; @text: #f4f4f4; @subtext1: #e0e0e0; @subtext0: #c6c6c6; @overlay2: #a8a8a8; @overlay1: #8d8d8d; @overlay0: #6f6f6f; @surface2: #525252; @surface1: #393939; @surface0: #262626; @base: #161616; @mantle: #0b0b0b; @crust: #000000; }; };