Skip to content

Commit

Permalink
feat(hacker-news): split flavor variable into light and dark (#415)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Kardyne authored Dec 27, 2023
1 parent 8ecebb6 commit 72147c0
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions styles/hacker-news/catppuccin.user.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@
@name Hacker News Catppuccin
@namespace github.com/catppuccin/userstyles/styles/hacker-news
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/hacker-news
@version 0.1.1
@version 0.1.2
@description Soothing pastel theme for HackerNews
@author Catppuccin
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/hacker-news/catppuccin.user.css
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Ahacker-news
@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 domain("news.ycombinator.com") {
Expand All @@ -22,7 +23,12 @@
@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: #cdd6f4; @subtext1: #bac2de; @subtext0: #a6adc8; @overlay2: #9399b2; @overlay1: #7f849c; @overlay0: #6c7086; @surface2: #585b70; @surface1: #45475a; @surface0: #313244; @base: #1e1e2e; @mantle: #181825; @crust: #11111b; };
}

#catppuccin(@flavor);
@media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor);
}
@media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor);
}

#catppuccin(@lookup) {
@rosewater: @catppuccin[@@lookup][@rosewater];
Expand Down

0 comments on commit 72147c0

Please sign in to comment.