/* ==UserStyle==
@name Stack Overflow Catppuccin
@namespace github.com/Sebagabones/userstyles/styles/stack-overflow
@homepageURL https://github.com/Sebagabones/userstyles/tree/main/styles/stack-overflow
@version 2025.09.06
@updateURL https://github.com/Sebagabones/userstyles/raw/main/styles/stack-overflow/catppuccin.user.less
@supportURL https://github.com/Sebagabones/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== */
@import "https://raw.githubusercontent.com/Sebagabones/userstyles/refs/heads/main/lib/lib.less";
@-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) {
#lib.palette();
#lib.defaults();
#lib.css-variables();
&,
* {
--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;
}
}
}
}