From 87454c84bbf1eb9e4029ba68ef1b7ed7a6c06f93 Mon Sep 17 00:00:00 2001 From: uncenter Date: Sun, 18 May 2025 14:43:17 -0400 Subject: [PATCH] fix(cinny): prism syntax highlighting (#1759) --- styles/cinny/catppuccin.user.less | 47 ++++++++++++++++++++----------- 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/styles/cinny/catppuccin.user.less b/styles/cinny/catppuccin.user.less index 0d1e70b9..7b8af2a1 100644 --- a/styles/cinny/catppuccin.user.less +++ b/styles/cinny/catppuccin.user.less @@ -16,6 +16,9 @@ ==/UserStyle== */ @-moz-document domain("cinny.in") { + @import url("https://prismjs.catppuccin.com/variables.important.css"); + code .token { opacity: 1 !important; } + :root, .silver-theme { #catppuccin(@lightFlavor); @@ -54,6 +57,33 @@ @mantle: @catppuccin[@@flavor][@mantle]; @crust: @catppuccin[@@flavor][@crust]; @accent: @catppuccin[@@flavor][@@accentColor]; + + --ctp-rosewater: @rosewater; + --ctp-flamingo: @flamingo; + --ctp-pink: @pink; + --ctp-mauve: @mauve; + --ctp-red: @red; + --ctp-maroon: @maroon; + --ctp-peach: @peach; + --ctp-yellow: @yellow; + --ctp-green: @green; + --ctp-teal: @teal; + --ctp-sky: @sky; + --ctp-sapphire: @sapphire; + --ctp-blue: @blue; + --ctp-lavender: @lavender; + --ctp-text: @text; + --ctp-subtext1: @subtext1; + --ctp-subtext0: @subtext0; + --ctp-overlay2: @overlay2; + --ctp-overlay1: @overlay1; + --ctp-overlay0: @overlay0; + --ctp-surface2: @surface2; + --ctp-surface1: @surface1; + --ctp-surface0: @surface0; + --ctp-base: @base; + --ctp-mantle: @mantle; + --ctp-crust: @crust; color-scheme: if(@flavor = latte, light, dark); @@ -190,7 +220,7 @@ --oq6d07v: @surface1; --oq6d07w: @surface2; --oq6d07x: @overlay0; - --oq6d07y: @subtext0; + --oq6d07y: @text; --oq6d07z: fade(@green, 90%); --oq6d0710: fade(@green, 95%); @@ -231,21 +261,6 @@ --oq6d071v: fade(@crust, 60%); } - /* Syntax highlighting */ - body.prism-light, - &.prism-light, - &.prism-dark { - --prism-comment: @overlay2; - --prism-punctuation: @overlay2; - --prism-property: @yellow; - --prism-boolean: @peach; - --prism-selector: @green; - --prism-operator: @sky; - --prism-atrule: @mauve; - --prism-keyword: @mauve; - --prism-regex: @pink; - } - /* Search results */ ._1m2qi7rn { background-color: @accent;