From e0ca5cc95ade311c5b9fda042d56ef93ba6ea805 Mon Sep 17 00:00:00 2001 From: Kardyne Date: Tue, 26 Dec 2023 06:34:48 +0100 Subject: [PATCH] feat(google): split flavor variable into light and dark (#412) * feat(google): split flavor variable into light and dark This splits the flavor variable into light and dark flavors that can be selected independently by the user. The userstyle version is also bumped to 0.1.2. * Update catppuccin.user.css --------- Co-authored-by: Muslim <42213155+GitMuslim@users.noreply.github.com> --- styles/google/catppuccin.user.css | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) diff --git a/styles/google/catppuccin.user.css b/styles/google/catppuccin.user.css index a6010f53..fb3081c5 100644 --- a/styles/google/catppuccin.user.css +++ b/styles/google/catppuccin.user.css @@ -2,7 +2,7 @@ @name Google Catppuccin @namespace github.com/catppuccin/userstyles/styles/google @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/google -@version 0.1.1 +@version 0.1.2 @updateURL https://github.com/catppuccin/userstyles/raw/main/styles/google/catppuccin.user.css @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Agoogle @description Soothing pastel theme for Google @@ -10,7 +10,8 @@ @license MIT @preprocessor less -@var select flavor "Flavor" ["latte:Latte", "frappe:Frappe", "macchiato:Macchiato", "mocha:Mocha*"] +@var select lightFlavor "Light Flavor" ["latte:Latte*", "frappe:Frappe", "macchiato:Macchiato", "mocha:Mocha"] +@var select darkFlavor "Dark Flavor" ["latte:Latte", "frappe:Frappe", "macchiato:Macchiato", "mocha:Mocha*"] ==/UserStyle== */ @-moz-document regexp("^https?://(www\\.|images\\.)?google\\..*") @@ -1215,8 +1216,15 @@ } color: @subtext0; } - body { - #catppuccin(@flavor); + @media (prefers-color-scheme: light) { + body { + #catppuccin(@lightFlavor); + } + } + @media (prefers-color-scheme: dark) { + body { + #catppuccin(@darkFlavor); + } } } @@ -1347,8 +1355,15 @@ background-color: @surface0; } } - body { - #catppuccin(@flavor); + @media (prefers-color-scheme: light) { + body { + #catppuccin(@lightFlavor); + } + } + @media (prefers-color-scheme: dark) { + body { + #catppuccin(@darkFlavor); + } } }