/* ==UserStyle== @name Catppuccin @namespace github.com/catppuccin/userstyles/styles/ @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/ @version 2000.01.01 @updateURL https://github.com/catppuccin/userstyles/raw/main/styles//catppuccin.user.less @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3A @description Soothing pastel theme for @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/std/v1.less"; @-moz-document domain("") { /* This section applies the light/dark themes automatically based on the user's system theme. Use the below example CSS to start if the website you are theming doesn't have a light/dark mode toggle. For an actual example of this, see https://github.com/catppuccin/userstyles/blob/39288b593278e5efa48007d5fc001292cf910672/styles/brave-search/catppuccin.user.css#L16-L29. */ :root { @media (prefers-color-scheme: light) { #catppuccin(@lightFlavor); } @media (prefers-color-scheme: dark) { #catppuccin(@darkFlavor); } } /* If the website you are theming *does* have a light/dark mode toggle, you can conditionally enable light/dark flavors by targeting whatever attribute that website uses to indicate the theme. *The example below gives you an idea of what to look for. The website you are theming may use a class-based approach (e.g. :root.theme-dark), or any of the myriad of other methods like this.* Use the below example CSS to start if this is the case. For an actual example of this, see https://github.com/catppuccin/userstyles/blob/39288b593278e5efa48007d5fc001292cf910672/styles/youtube/catppuccin.user.css#L21-L30. */ :root[data-theme="dark"] { #catppuccin(@darkFlavor); } :root[data-theme="light"] { #catppuccin(@lightFlavor); } #catppuccin(@flavor) { #lib.palette(); #lib.defaults(); /* Start styling your website here: */ background-color: @base; /* If you need to specify an overwrite specific to a flavor * (e.g. only when the flavor is set to latte), you can use a `when` guard clause. */ & when (@flavor = latte) { /* ... */ } /* You can also negate the statement above by using * a `when not` guard clause. */ & when not(@flavor = latte) { /* ... */ } } }