diff --git a/scripts/userstyles.yml b/scripts/userstyles.yml index 797fd47b..71a83bc1 100644 --- a/scripts/userstyles.yml +++ b/scripts/userstyles.yml @@ -65,6 +65,7 @@ collaborators: - &WalkQuackBack WalkQuackBack - &gradylink gradylink - &ashish0kumar ashish0kumar + - &shnjd shnjd userstyles: advent-of-code: @@ -219,6 +220,13 @@ userstyles: color: green note: "This userstyle is currently incompatible with DesModder's Visual>Syntax Highlighting plugin." current-maintainers: [*gradylink] + dev.to: + name: DEV Community + link: https://dev.to + categories: [discussion_forum] + icon: devdotto + color: text + current-maintainers: [*shnjd] devdocs: name: DevDocs link: https://devdocs.io diff --git a/styles/dev.to/catppuccin.user.less b/styles/dev.to/catppuccin.user.less new file mode 100644 index 00000000..1404fed0 --- /dev/null +++ b/styles/dev.to/catppuccin.user.less @@ -0,0 +1,320 @@ +/* ==UserStyle== +@name DEV Community Catppuccin +@namespace github.com/catppuccin/userstyles/styles/dev.to +@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/dev.to +@version 2000.01.01 +@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/dev.to/catppuccin.user.less +@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Adev.to +@description Soothing pastel theme for DEV Community +@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== */ + +@-moz-document domain("dev.to") { + @import url("https://python.catppuccin.com/pygments/catppuccin-variables.important.css"); + + body.dark-theme { + #catppuccin(@darkFlavor); + } + body.light-theme { + #catppuccin(@lightFlavor); + } + + #catppuccin(@flavor) { + @rosewater: @catppuccin[@@flavor][@rosewater]; + @flamingo: @catppuccin[@@flavor][@flamingo]; + @pink: @catppuccin[@@flavor][@pink]; + @mauve: @catppuccin[@@flavor][@mauve]; + @red: @catppuccin[@@flavor][@red]; + @maroon: @catppuccin[@@flavor][@maroon]; + @peach: @catppuccin[@@flavor][@peach]; + @yellow: @catppuccin[@@flavor][@yellow]; + @green: @catppuccin[@@flavor][@green]; + @teal: @catppuccin[@@flavor][@teal]; + @sky: @catppuccin[@@flavor][@sky]; + @sapphire: @catppuccin[@@flavor][@sapphire]; + @blue: @catppuccin[@@flavor][@blue]; + @lavender: @catppuccin[@@flavor][@lavender]; + @text: @catppuccin[@@flavor][@text]; + @subtext1: @catppuccin[@@flavor][@subtext1]; + @subtext0: @catppuccin[@@flavor][@subtext0]; + @overlay2: @catppuccin[@@flavor][@overlay2]; + @overlay1: @catppuccin[@@flavor][@overlay1]; + @overlay0: @catppuccin[@@flavor][@overlay0]; + @surface2: @catppuccin[@@flavor][@surface2]; + @surface1: @catppuccin[@@flavor][@surface1]; + @surface0: @catppuccin[@@flavor][@surface0]; + @base: @catppuccin[@@flavor][@base]; + @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); + + ::selection { + background-color: fade(@accent, 30%); + } + + input, + textarea { + &::placeholder { + color: @subtext0 !important; + } + } + + --body-bg: @mantle; + --black: if(@flavor = latte, @text, @crust); + --body-color: @text; + + --header-bg: @base; + --header-shadow: @crust; + + --footer-bg: @crust; + --footer-color: @subtext0; + + --form-bg: @crust; + --form-bg-focus: @base; + --form-border: @surface0; + --form-border-hover: @surface1; + --form-border-focus: @accent; + --focus: @accent !important; + + --base-100: @text; + --base-90: @subtext1; + --base-80: @subtext1; + --base-70: @subtext0; + --base-60: @overlay2; + --base-50: @overlay1; + --base-20: @base; + --base-0: @crust; + --base-inverted: @surface0; + + --tab-color-current: @accent; + --tab-color: @text; + --tab-color-hover: @base; + --tab-bg-hover: fade(@accent, 70%); + + --link-branded-color: @accent; + --link-branded-color-hover: @accent; + --link-color: @text; + --link-color-hover: @blue; + --link-bg-hover: @mantle; + --link-color-secondary: @subtext1; + --link-color-secondary-hover: @text; + --link-bg-current: @mantle; + --link-color-current: @accent; + --link-current-bg: @surface0; + --link-current-color: @accent; + + --btn-bg-hover: @surface0; + --btn-color: @text; + --btn-color-hover: @accent; + --btn-primary-bg: @accent; + --btn-primary-bg-hover: fade(@accent, 90%); + --btn-primary-color: @base; + --btn-primary-color-hover: @crust; + + --button-primary-color: @base; + --button-primary-color-hover: @base; + --button-primary-bg: @accent; + --button-primary-bg-hover: fade(@accent, 90%); + --button-secondary-bg: @surface1; + --button-secondary-bg-hover: fade(@surface1, 90%); + --button-secondary-color: @subtext1; + --button-secondary-color-hover: @text; + --button-outlined-bg-hover: @mantle; + --button-outlined-color: @subtext1; + --button-outlined-color-hover: @text; + --button-outlined-border: @surface0; + --button-outlined-border-hover: @surface1; + --button-ghost-bg-hover: @base; + --button-ghost-color: @text; + --button-ghost-color-hover: @text; + --button-ghost-dimmed-color: @subtext0; + --button-ghost-dimmed-color-hover: @subtext1; + + --reaction-like-bg: fade(@red, 10%); + --reaction-like-color: @red; + --reaction-comment-color: @yellow; + --reaction-save-color: @blue; + // Article like button when liked. + img[src^="https://assets.dev.to/assets/heart-plus-active-"] { + @svg: escape( + '' + ); + content: url("data:image/svg+xml,@{svg}"); + } + + --divider: @surface0; + + --label-primary: @text; + --label-secondary: @subtext1; + + --accent-brand: @accent; + --accent-danger-darker: @red; + --accent-danger: @red; + --accent-warning: @yellow; + --accent-warning-a10: fade(@yellow, 10%); + --accent-success-a10: fade( + @green, + 20% + ); // Share article link "copied to clipboard" confirmation. + + --card-bg: @base; + --card-color: @text; + --card-border: @mantle; + --card-secondary-bg: @surface0; + --card-secondary-bg-hover: fade(@surface0, 90%); + --card-secondary-color: @subtext1; + --card-secondary-border: @surface0; + --card-tertiary-bg: @surface0; + --card-tertiary-bg-hover: fade(@surface0, 90%); + --card-color-tertiary: @text; + + --cta-branded-bg-hover: @accent; + --cta-branded-color: @accent; + --cta-branded-color-hover: @base; + --cta-branded-border: @accent; + --cta-branded-border-hover: @accent; + + --tooltip-bg: @surface2; + --tooltip-color: @text; + + --modal-bg: @surface0; + + --tag-bg: fade(@blue, 10%); + --tag-bg-hover: fade(@blue, 20%); + --tag-color: @blue; + --tag-color-hover: @blue; + --tag-prefix: @blue; + --tag-prefix-hover: @blue; + + --indicator-bg: @blue; + --indicator-color: @base; + --indicator-subtle-bg: fade(@blue, 20%); + --indicator-subtle-color: @subtext1; + + --syntax-background-color: @mantle; + + // popular colors have accent colors. These colors are dynamically assigned, + // whereas other tags fallback color is not overrided by root variables. + .crayons-tag__prefix { + --tag-prefix: @blue; + } + + // danger button + .crayons-btn--danger { + --color: @base; + --color-hover: @crust; + } + + // like and reply button icons in comments + .crayons-btn--ghost .reaction-icon { + filter: none; + } + + // billboard cards on right column has statically coded borders + .text-styles--billboard { + > div { + border-color: @surface0 !important; + } + } + + // dev.to doesn't provide style for