/* ==UserStyle==
@name Stack Overflow Catppuccin
@namespace github.com/catppuccin/userstyles/styles/stack-overflow
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/stack-overflow
@version 2025.04.18
@updateURL https://github.com/keonly/userstyles/raw/main/styles/stack-overflow/catppuccin.user.less
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Astack-overflow
@description Soothing pastel theme for Stack Overflow
@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("stackoverflow.com"),
domain("stackexchange.com"),
domain("serverfault.com"),
domain("superuser.com"),
domain("mathoverflow.net"),
domain("askubuntu.com"),
domain("stackapps.com") {
@import url("https://unpkg.com/@catppuccin/highlightjs@1.0.0/css/catppuccin-variables.important.css");
code.hljs {
background: none !important;
}
body:not(.theme-highcontrast, .theme-dark).unified-theme {
&,
.themed {
#catppuccin(@lightFlavor);
}
}
body:not(.theme-highcontrast).unified-theme.theme-dark {
&,
.themed {
#catppuccin(@darkFlavor);
}
}
body:not(.theme-highcontrast).unified-theme.theme-system {
@media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor);
}
@media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor);
}
}
#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;
}
}
&,
* {
--theme-background-color: @mantle;
--theme-content-background-color: @base;
--theme-content-border-color: @surface0;
--theme-topbar-background-color: @mantle;
--theme-topbar-search-background: @mantle;
--theme-topbar-search-border: @surface2;
--theme-topbar-search-placeholder: @subtext0;
--theme-topbar-item-color: @text;
--theme-topbar-item-color-hover: @text;
--theme-topbar-item-background-hover: @surface0;
--theme-button-primary-background-color: @accent;
--theme-button-primary-hover-background-color: darken(@accent, 5%);
--theme-button-primary-active-background-color: @text;
--theme-link-color: @blue;
--theme-link-color-hover: @sky;
--theme-link-color-visited: @lavender;
--theme-footer-title-color: @text;
--theme-footer-text-color: @subtext0;
--theme-footer-link-color: @subtext0;
--theme-footer-link-color-hover: @subtext1;
--theme-footer-background-color: @mantle;
--theme-header-background-color: transparent;
--theme-tag-background-color: @accent;
--theme-tag-border-color: @accent;
--theme-tag-color: @mantle;
--theme-tag-hover-background-color: darken(@accent, 5%);
--theme-tag-hover-border-color: darken(@accent, 5%);
--theme-tag-hover-color: @mantle;
--theme-post-title-color: @text;
--theme-post-title-color-hover: @subtext1;
--theme-post-title-color-visited: @lavender;
--highlight-bg: @mantle;
--theme-primary: @accent;
--theme-primary-100: fade(@accent, 20%);
--theme-primary-200: fade(@accent, 30%);
--theme-primary-300: fade(@accent, 40%);
--theme-primary-400: @accent;
--theme-primary-500: fade(@accent, 90%);
--theme-primary-600: @accent;
--translucent-secondary: fade(@accent, 10%);
--theme-secondary-100: fade(@accent, 20%);
--theme-secondary-200: fade(@accent, 30%);
--theme-secondary-300: fade(@accent, 40%);
--theme-secondary-400: fade(@accent, 50%);
--theme-secondary-500: fade(@accent, 60%);
--theme-secondary-600: fade(@accent, 70%);
--white: @mantle;
--black: @text;
--black-100: @base;
--black-150: @surface0;
--black-200: @surface1;
--black-225: @surface1;
--black-250: @surface2;
--black-300: @overlay0;
--black-350: @overlay2;
--black-400: @subtext0;
--black-500: @subtext1;
--black-600: @text;
--purple-100: fade(@mauve, 30%);
--purple-200: fade(@mauve, 40%);
--purple-400: fade(@mauve, 60%);
--green-100: @green;
--green-400: @green;
--green-500: @green;
--blue-200: fade(@blue, 30%);
--blue-300: fade(@blue, 40%);
--blue-400: @sky;
--blue-500: @blue;
--orange-400: fade(@peach, 80%);
--orange-500: fade(@peach, 90%);
--orange-600: @peach;
--bronze-100: fade(@rosewater, 20%);
--bronze-200: fade(@rosewater, 30%);
--bronze-300: fade(@rosewater, 40%);
--bronze-400: fade(@rosewater, 50%);
--yellow-100: fade(@yellow, 20%);
--yellow-200: fade(@yellow, 30%);
--yellow-300: @yellow;
--yellow-400: fade(@yellow, 70%);
--yellow-500: fade(@yellow, 90%);
--red-200: fade(@red, 40%);
--red-400: fade(@red, 70%);
--red-500: fade(@red, 80%);
--scrollbar: @surface1;
}
.wmd-button > span {
@svg: escape(
''
);
background-image: url("data:image/svg+xml,@{svg}");
}
.s-topbar .s-topbar--logo .-img,
.envelope-on,
.envelope-off,
.vote-up-off,
.vote-up-on,
.vote-down-off,
.vote-down-on,
.feed-icon,
.vote-accepted-off,
.vote-accepted-on,
.vote-accepted-bounty,
.badge-earned-check,
.delete-tag,
.grippie,
.expander-arrow-hide,
.expander-arrow-show,
.expander-arrow-small-hide,
.expander-arrow-small-show,
.anonymous-gravatar,
.badge1,
.badge2,
.badge3 {
@svg: escape(
''
);
background-image: url("data:image/svg+xml,@{svg}");
}
.s-avatar {
&.subcommunity-topic-mobile-dev {
@svg: escape(
''
);
background-image: url("data:image/svg+xml,@{svg}");
}
&.subcommunity-topic-r-language {
@svg: escape(
''
);
background-image: url("data:image/svg+xml,@{svg}");
}
}
[fill="#BCBBBB"] {
fill: @overlay2 !important;
}
[fill="#F48024"] {
fill: @peach !important;
}
.s-topbar .s-topbar--logo .-img {
filter: none;
}
.s-sidebarwidget {
background-color: @base;
border-color: @surface0;
.s-sidebarwidget--header {
background-color: @surface0;
border-color: @surface1;
}
&::after,
.s-sidebarwidget--content,
.s-sidebarwidget--header {
border-color: @surface1;
}
}
.s-prose kbd {
border-top-color: transparent;
box-shadow: 0 1px 1px @crust, inset 0 1px 0 0 @overlay2;
}
.s-pagination .s-pagination--item {
border-color: @surface2;
}
.s-badge {
color: @crust;
background-color: @mauve;
}
.s-notice {
&,
.s-notice--btn {
color: @text !important;
}
}
.badge,
.badge-tag {
background-color: @surface0;
color: @text;
}
#onetrust-consent-sdk {
#onetrust-banner-sdk {
background-color: @mantle;
&:focus {
outline-color: @surface1;
}
#onetrust-accept-btn-handler,
#onetrust-reject-all-handler {
background-color: @accent;
color: @crust;
}
#onetrust-button-group button#onetrust-pc-btn-handler {
background-color: @crust !important;
border-color: @accent !important;
color: @accent !important;
}
#onetrust-policy-title,
#onetrust-policy-text,
.ot-b-addl-desc,
.ot-dpd-desc,
.ot-dpd-title,
#onetrust-policy-text :not(.onetrust-vendors-list-handler),
.ot-dpd-desc :not(.onetrust-vendors-list-handler),
#banner-options *,
.ot-cat-header,
.ot-optout-signal,
a {
color: @text !important;
}
}
/* Manage cookies popup */
#onetrust-pc-sdk {
background-color: @base;
h3,
h4,
h5,
h6,
p,
#ot-ven-lst .ot-ven-opts p,
#ot-pc-desc,
#ot-pc-title,
.ot-li-title,
.ot-sel-all-hdr span,
#ot-host-lst .ot-host-info,
#ot-fltr-modal #modal-header,
.ot-checkbox label span,
#ot-pc-lst #ot-sel-blk p,
#ot-pc-lst #ot-lst-title h3,
#ot-pc-lst .back-btn-handler p,
#ot-pc-lst .ot-ven-name,
#ot-pc-lst #ot-ven-lst .consent-category,
.ot-leg-btn-container .ot-inactive-leg-btn,
.ot-label-status,
.ot-chkbox label span,
#clear-filters-handler,
.ot-optout-signal {
color: @text;
}
.ot-pc-header {
background-color: @mantle !important;
border-bottom-color: @surface1;
}
.ot-accordion-layout.ot-cat-item {
border-color: @surface1;
}
.ot-pc-footer {
border-top-color: @surface2 !important;
}
button:not(
#clear-filters-handler,
.ot-close-icon,
#filter-btn-handler,
.ot-remove-objection-handler,
.ot-obj-leg-btn-handler,
[aria-expanded],
.ot-link-btn
),
.ot-leg-btn-container .ot-active-leg-btn {
background-color: @accent !important;
border-color: @accent;
color: @mantle;
}
}
}
.sunset-background {
background-color: @base !important;
color: @text !important;
}
.disabled-link {
color: @overlay2;
}
/* Stack Exchange logo */
[fill="#FEFEFE"] {
fill: @text !important;
}
[fill="#2F96E8"],
[fill="#2D6DB5"] {
fill: @blue !important;
}
[fill="#8FD8F7"] {
fill: lighten(@sky, 10%);
}
[fill="#46A2D9"] {
fill: lighten(@blue, 5%);
}
[fill="#155397"] {
fill: darken(@blue, 10%) !important;
}
/* Other Stack Exchange site logos */
[alt="Server Fault"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
[alt="Super User"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
[alt="MathOverflow"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
[alt="Ask Ubuntu"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
&:has([alt="Ask Ubuntu"]) {
background-image: none;
.site-header {
background: @accent;
}
}
[alt="Stack Apps"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
[alt="Unix & Linux"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
&:has([alt="Unix & Linux"]) {
@svg: escape(
''
);
background-image: url("data:image/svg+xml,@{svg}");
}
[alt="Cryptography"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
&:has([alt="Cryptography"]) {
@svg: escape(
''
);
background-image: url("data:image/svg+xml,@{svg}");
.site-header {
background-image: none;
}
}
}
}
#rgbify(@color) {
@rgb: red(@color), green(@color), blue(@color);
}
/* deno-fmt-ignore */
@catppuccin: {
@latte: { @rosewater: #dc8a78; @flamingo: #dd7878; @pink: #ea76cb; @mauve: #8839ef; @red: #d20f39; @maroon: #e64553; @peach: #fe640b; @yellow: #df8e1d; @green: #40a02b; @teal: #179299; @sky: #04a5e5; @sapphire: #209fb5; @blue: #1e66f5; @lavender: #7287fd; @text: #4c4f69; @subtext1: #5c5f77; @subtext0: #6c6f85; @overlay2: #7c7f93; @overlay1: #8c8fa1; @overlay0: #9ca0b0; @surface2: #acb0be; @surface1: #bcc0cc; @surface0: #ccd0da; @base: #eff1f5; @mantle: #e6e9ef; @crust: #dce0e8; };
@frappe: { @rosewater: #f2d5cf; @flamingo: #eebebe; @pink: #f4b8e4; @mauve: #ca9ee6; @red: #e78284; @maroon: #ea999c; @peach: #ef9f76; @yellow: #e5c890; @green: #a6d189; @teal: #81c8be; @sky: #99d1db; @sapphire: #85c1dc; @blue: #8caaee; @lavender: #babbf1; @text: #c6d0f5; @subtext1: #b5bfe2; @subtext0: #a5adce; @overlay2: #949cbb; @overlay1: #838ba7; @overlay0: #737994; @surface2: #626880; @surface1: #51576d; @surface0: #414559; @base: #303446; @mantle: #292c3c; @crust: #232634; };
@macchiato: { @rosewater: #f4dbd6; @flamingo: #f0c6c6; @pink: #f5bde6; @mauve: #c6a0f6; @red: #ed8796; @maroon: #ee99a0; @peach: #f5a97f; @yellow: #eed49f; @green: #a6da95; @teal: #8bd5ca; @sky: #91d7e3; @sapphire: #7dc4e4; @blue: #8aadf4; @lavender: #b7bdf8; @text: #cad3f5; @subtext1: #b8c0e0; @subtext0: #a5adcb; @overlay2: #939ab7; @overlay1: #8087a2; @overlay0: #6e738d; @surface2: #5b6078; @surface1: #494d64; @surface0: #363a4f; @base: #24273a; @mantle: #1e2030; @crust: #181926; };
@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: #f4f4f4; @subtext1: #e0e0e0; @subtext0: #c6c6c6; @overlay2: #a8a8a8; @overlay1: #8d8d8d; @overlay0: #6f6f6f; @surface2: #525252; @surface1: #393939; @surface0: #262626; @base: #161616; @mantle: #0b0b0b; @crust: #000000; };
};