202 lines
6.8 KiB
Plaintext
202 lines
6.8 KiB
Plaintext
/* ==UserStyle==
|
|
@name MDN Catppuccin
|
|
@namespace github.com/catppuccin/userstyles/styles/mdn
|
|
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/mdn
|
|
@version 2025.09.06
|
|
@updateURL https://github.com/catppuccin/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== */
|
|
|
|
@import "https://userstyles.catppuccin.com/lib/lib.less";
|
|
|
|
#catppuccin(@flavor) {
|
|
#lib.palette();
|
|
#lib.defaults();
|
|
#lib.css-variables();
|
|
|
|
--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-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") {
|
|
@import url("https://prismjs.catppuccin.com/variables.important.css");
|
|
|
|
.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);
|
|
}
|
|
}
|
|
}
|