/* ==UserStyle== @name npm Catppuccin @namespace github.com/catppuccin/userstyles/styles/npm @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/npm @version 2025.09.06 @updateURL https://github.com/catppuccin/userstyles/raw/main/styles/npm/catppuccin.user.less @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Anpm @description Soothing pastel theme for npm @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://userstyles.catppuccin.com/lib/lib.less"; @-moz-document domain("www.npmjs.com") { :root { @media (prefers-color-scheme: light) { #catppuccin(@lightFlavor); } @media (prefers-color-scheme: dark) { #catppuccin(@darkFlavor); } } #catppuccin(@flavor) { #lib.palette(); #lib.defaults(); input, textarea { background-color: transparent; &:focus { box-shadow: 0 0 0 2px @accent; } } // TODO: Should accent-color be set in defaults? accent-color: @accent; @npmGradient: linear-gradient(139deg, @peach, @maroon, @red, @pink); --color-fg-default: @text; --color-fg-muted: @subtext1; --color-fg-subtle: @subtext0; --color-fg-on-emphasis: @base; --color-fg-brand: @accent; --color-fg-accent: @blue; --color-fg-success: @green; --color-fg-attention: @yellow; --color-fg-danger: @red; --color-border-strong: @surface0; --header-color: @text; /* Used on deprecation confirmation page */ --wombat-red: @maroon; --wombat-red-hover: @red; --search-fg-muted: @subtext1; --search-border: @surface0; --search-bg-subtle: @surface0; &, main { background-color: @base !important; color: @text; } /* Primary background */ .bg-white, ._4ea0e50d { background-color: @base; } /* Background layer background */ .bg-black-05, ._7eb68a55, .e9998f88 { background-color: @mantle; } /* Primary text */ .black, .black-90, .black-80, a { color: @text; } /* Secondary text */ .black-70, .black-60, .dim:focus, .dim:hover { color: @subtext0; } /* Inverse text */ .white { color: @base; } /* Border colors */ .b--black-10, .b--black-20 { border-color: @surface0; } /* --- ARBITRARY --- */ /* Top loading bar */ div.fixed.top-0.left-0.z-999 { background-color: @accent; } /* Magnifying glass icon (search box, discover packages) */ svg g[stroke="#777777"] { stroke: @subtext0; } /* "Beta" pill */ .a17280e0 { color: @green; border-color: @green; } /* Green checkmark */ [fill="#107010"] { fill: @green; } /* --- HEADER --- */ [data-test-id="notification-banner"] { background-color: if( @flavor = latte, desaturate(lighten(@green, 30%), 5%), desaturate(darken(@green, 5%), 5%) ); border-color: @green; #notification, button[aria-label="Close notification"] { color: if(@flavor = latte, @text, @base); } } header { border-bottom-color: @surface0; /* Top bar gradient */ .e7070742 { border-image: @npmGradient 3; } /* Heart icon */ ._0edb515f { color: @text; } /* Logo */ a[href="/"] > svg > path { fill: @text; } /* Search box */ form#search { /* Search button */ button[type="submit"] { background-color: @subtext1; } /* Search input wrapper */ > div { border-color: @surface0; &:focus-within { border-color: @subtext1; } /* Search input */ div:has(input[type="search"]) { background-color: @mantle; input[type="search"] { color: @text; &:focus { box-shadow: none; } &::-webkit-search-cancel-button { display: none; } } } /* Search results (floating box) */ div.list { background-color: @base; ul[aria-label="Search results"] li { border-bottom-color: @surface0; &:hover { background-color: @surface1; } } } } } /* Profile picture navigation */ nav:has(> button[aria-label="Profile menu"]) { > button { /* Dropdown arrow */ img[alt="avatar"] { border-color: @text; + div > svg { fill: @text; } } } /* Popup */ > div > div { border-color: @surface0; /* Popup triangle */ &::after { border-bottom-color: @base; } &::before { border-bottom-color: @surface0; } /* Username */ h2 { border-bottom-color: @surface1; span { color: @text; } } /* Navigation options */ ul li a { &:hover, &:focus { background-color: @crust; } /* Red "Add Organization" button */ &[href="/org/create"] { border-color: @surface0; color: @accent; svg { fill: @accent; } } } } } } /* --- HOME PAGE --- */ ._8c1ee087 { background-image: linear-gradient( 270deg, fade(@red, 16%) 0%, fade(@red, 56%) 18.45%, fade(@red, 80%) 49.67%, fade(@red, 56%) 82.52%, fade(@red, 19%) 99.7%, fade(@red, 0%) 99.71%, fade(@red, 0%) 99.72%, fade(@red, 16%) 99.73% ), url("https://static-production.npmjs.com/abf53a31b2da4657a1a004ee9358551c.png"); a[href="/signup"] { background-color: @yellow; } a[href="/products/pro"] { background-color: @red; border-color: @text; } } article > section:nth-of-type(2) { color: @text; } /* Popular libraries section */ #popular-libraries-header + hr { border-color: @accent; } ul[aria-labelledby="popular-libraries-header"] { li a { border-bottom-color: @surface0; } } /* Discover packages section */ #discover-packages-header + hr { border-color: mix(@red, @yellow); } ul[aria-labelledby="discover-packages-header"] li { a { color: @text; border-color: @surface0; } &:nth-of-type(6n+1):hover a { color: @mauve; border-bottom-color: @mauve; } &:nth-of-type(6n+2):hover a { color: @green; border-bottom-color: @green; } &:nth-of-type(6n+3):hover a { color: @sky; border-bottom-color: @sky; } &:nth-of-type(6n+4):hover a { color: @red; border-bottom-color: @red; } &:nth-of-type(6n+5):hover a { color: @yellow; border-bottom-color: @yellow; } &:nth-of-type(6n+6):hover a { color: @pink; border-bottom-color: @pink; } } /* By the numbers section */ ._8f26e3fd { border-color: @yellow; } /* Recently updated packages section */ #recently-updated-packages-header + hr { border-color: @accent; } /* --- PACKAGE PAGES --- */ /* Deprecation warning */ .bg-washed-red { background-color: fade(@red, 30%); code { background-color: @mantle; color: @text; } } .red { color: @red !important; } /* "public" text */ ._813b53b2 { color: @green; } /* TypeScript logo */ img[alt="TypeScript icon, indicating that this package has built-in type declarations"] { @svg: escape( '' ); content: url("data:image/svg+xml,@{svg}"); } /* DefinitelyTyped logo */ img[alt="DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/bootstrap package"] { @svg: escape( '' ); content: url("data:image/svg+xml,@{svg}"); } /* Navigation tabs */ #package-tab(@color) { border-color: @color; &:has(> a[aria-selected="false"]):hover, &:has(> a[aria-selected="true"]) { background-color: fade(@color, 20%); } a { color: @color; } } ul[aria-owns*="package-tab-"] { li { &:has(#package-tab-readme), &:has(#package-tab-members) { #package-tab(@yellow); } &:has(#package-tab-code), &:has(#package-tab-admin), &:has(#package-tab-packages) { #package-tab(@red); } &:has(#package-tab-dependents), &:has(#package-tab-billing) { #package-tab(@mauve); } &:has(#package-tab-dependencies) { #package-tab(@pink); } &:has(#package-tab-versions) { #package-tab(@sapphire); } &:has(#package-tab-orgs), &:has(#package-tab-teams) { #package-tab(@green); } } } /* Sidebar icons */ svg:has(+ p > [aria-label="Copy install command line"]), button[aria-label="Copy install command line"] svg path, [aria-labelledby="repository repository-link"] svg g, [aria-labelledby="homePage homePage-link"] svg path, [aria-label="Showing weekly downloads"] svg { fill: @text; } /* Copy install command box */ p:has(button[aria-label="Copy install command line"]) { border-color: @surface0; } /* Weekly downloads chart */ div:has(> svg > [class^="sparkline--"]) { border-bottom-color: fade(@accent, 20%); svg { stroke: @accent; fill: fade(@accent, 20%); } } /* Sidebar provenance popup */ button[aria-label="View more provenance details"] { + div > div > div { background-color: @base; border-color: @surface0; &::after { border-bottom-color: @base; } &::before { border-bottom-color: @surface0; } > div { div:nth-of-type(2) { border-color: @surface0; } } } } ._1e07caeb { color: @text; } ._9666fddd, ._861fb12a, ._2160593e { color: @subtext0; } /* Provenance icon */ .f97c6116 { fill: @green; } /* Provenance section at bottom */ #provenance-details-header + div { border-color: @surface0; } /* Sidebar text */ .c84e15be { color: @subtext0; } /* Tab headings */ [id^="tabpanel-"] h2 { color: @text; } /* File explorer tab */ #tabpanel-explore > div > div { border-color: @surface0; > div:has(h2), div:has(+ pre) { border-bottom-color: @surface0; } /* Back button inside file */ ._450b46e9 { @svg: escape( '' ); content: url("data:image/svg+xml,@{svg}"); } ul li { border-bottom-color: @surface0; &:hover { background-color: @surface0; } img { @folder: escape( '' ); @file: escape( '' ); &._1528cda6 { content: url("data:image/svg+xml,@{folder}"); } &._7ec1ed32 { content: url("data:image/svg+xml,@{file}"); } } } /* File paths/link */ button, /* Loading spinner */ svg:has(> circle) { color: @text !important; } div:has(+ pre) { background-color: @mantle; } pre { background-color: @base !important; color: @text !important; .react-syntax-highlighter-line-number { color: @subtext1 !important; } [style="color: rgb(102, 102, 102);"] { color: var(--color-prettylights-syntax-comment) !important; } [style="color: rgb(150, 152, 150);"] { color: @overlay0 !important; } [style="color: rgb(0, 92, 197);"] { color: var(--color-prettylights-syntax-constant) !important; } [style="color: rgb(215, 58, 73);"], [style="color: rgb(0, 134, 179);"] { color: var(--color-prettylights-syntax-keyword) !important; } [style="color: rgb(3, 47, 98);"] { color: var(--color-prettylights-syntax-string) !important; } [style="color: rgb(111, 66, 193);"] { color: var(--color-prettylights-syntax-entity) !important; } [style*="color: rgb(223, 80, 0);"] { color: @peach !important; } [style*="color: rgb(99, 163, 92);"] { color: @green !important; } .hljs-subst, .hljs-built_in { color: var(--color-prettylights-syntax-storage-modifier-import) !important; } } } /* Versions tab */ #tabpanel-versions { ul li[class] div { border-bottom-color: @surface0; } } /* Dependencies/dependents tab */ #tabpanel-dependencies, #tabpanel-dependents { ul a { color: @accent; &:hover { color: @text; } } } /* Readme tab */ #tabpanel-readme #readme { color: @text; a { color: @accent; } h1, h2, h3, h4, h5, h6 { color: @text; a, svg { color: @text; fill: @text; } } p, li { color: @subtext0; } strong { color: @text; } pre, code { background-color: @mantle; color: @text; } pre.editor.editor-colors { .keyword, .storage.type { color: var(--color-prettylights-syntax-keyword); font-weight: normal; // stylelint-disable-line property-disallowed-list } .string { color: var(--color-prettylights-syntax-string); } .variable { color: var(--color-prettylights-syntax-variable); } .entity, .function { color: var(--color-prettylights-syntax-entity); } .comment { color: var(--color-prettylights-syntax-comment); } .storage.type.function { color: var(--color-prettylights-syntax-keyword); } .punctuation.definition:not(.string) { color: @text; } .constant { color: var(--color-prettylights-syntax-constant); } } h1, h2 { border-bottom-color: @surface1; } h4 { border-bottom-color: @surface0; } blockquote { background-color: lighten(@surface0, 2%); border-left-color: @surface2; } table { color: @text; border-bottom-style: none; td, th { background-color: @base; border-color: @surface0; } } } /* Keyword links */ #user-content-keywords { color: @text; + ul a { color: @accent; &:hover { color: @text; } } } /* Share provenance feedback link */ #user-content-provenance a[href=" https://github.com/npm/feedback"] { color: @text; } /* Settings */ div[role="listitem"], div[role="radiogroup"] { background: @base; } /* --- PROFILE PAGES --- */ .eaac77a6 { color: @surface2; } ._34da67ba { @svg: escape( '' ); background-image: url("data:image/svg+xml,@{svg}"); } ._69ab2ca0 { border-color: @surface0; background-color: @mantle; } /* --- SETTINGS PAGES --- */ /* Headings */ ._7fb5e603 h1 { color: @text; } /* Left panel */ aside.e9998f88 { box-shadow: none; ul.c63ae7fc li:hover { background-color: @crust; } /* Create organization button */ #organizationsHeader + a[href="/org/create"] { color: @green; border-color: @green; &:hover { color: @mantle; background-color: @green; } } } /* Linked accounts & recovery option settings */ .b49405c7 { color: @text; } /* Email and password settings */ p:has( + div > a[href^="/settings/"][href$="/email"] + a[href^="/settings/"][href$="/password"] ), /* Delete account */ p:has(+ a[href^="/settings/"][href$="/delete-account"]) { color: @text; } /* Access tokens settings */ form#tokens { table { td { span { color: @subtext1; &:hover { color: @text; } } code { color: @subtext0; } } + div { color: @text; } } } ._305a9f55 ._038c0473 { border-color: @accent; background-color: fade(@accent, 20%); } button[aria-label^="Delete token ending in"] { ._305a9f55 ._038c0473 & { border-color: @surface2; } &.b55db0e2:hover { border-color: @red; background-color: @red; color: @base; } } /* 2FA authentication page */ ._75ce47e7 { background-color: @base; ._71252860, .d7eb966d { color: @text; } [fill="#65C6C9"], [fill="url(#paint1_linear_449_428)"], [fill="url(#paint0_linear_110_3043)"] { fill: @blue; } [fill="url(#paint2_linear_449_428)"], [fill="url(#paint1_linear_110_3043)"] { fill: @base; } &::before { background-image: @npmGradient; } } ._320f7a67 { background-color: @base; &::before { background-image: @npmGradient; } section { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.6); } div[role="radiogroup"] { color: @text; background-color: @surface0; } #gat-banner span { color: @yellow; } } /* Create organization page */ .acb78000::before { background-image: @npmGradient; } /* Step 1: create an org */ .e99f3f5d { color: @green; } img[src="https://static-production.npmjs.com/28dd82ec6e5fe3cfbb4d2c4ec492076b.svg"] { @svg: escape( '' ); content: url("data:image/svg+xml,@{svg}"); } /* Step 2: invite members */ img[src="https://static-production.npmjs.com/d6654c911c7cf2159948148754c95bb6.svg"] { @svg: escape( '' ); content: url("data:image/svg+xml,@{svg}"); } div:has(> form[action="/org/create"]) { color: @text; &, + div { border-color: @surface0; } } /* Billing information page */ .bg-washed-green { background-color: fade( lighten(@teal, 10%), if(@flavor = latte, 50%, 100%) ); } .b--light-green { border-color: @teal; } /* Pricing page */ .dark-gray { color: @text !important; } .light-silver { color: @subtext1; } .npm-red { color: @accent; } .a11y-light-gray, .bg-gray { background-color: @subtext0 !important; } .bg-dark-gray { background-color: @text; } .bg-light-gray, .bg-near-white { background-color: @surface0 !important; } .npm-bg-hero, .npm-bg-teams { background: none; > .white { color: @text; } } .npm-bg-gradient { background-image: @npmGradient; } .npm-rainbow-circle { background-image: linear-gradient(@crust, @crust), @npmGradient; } .npm-btn-red { background-color: @red; border-bottom-color: @yellow; } a[href="/products/teams"].npm-title { background-color: @red; color: @crust; border-color: @text; } ul.featureComparisonList img[alt="feature included"] { filter: @red-filter; } /* --- GENERIC --- */ /* Buttons/button links */ ._24a1e9c7 { background-image: none; background-color: @surface0; color: @text; border-color: @surface1; &:not([disabled]):hover { background-color: @surface1; } &[disabled] { background-color: @mantle; color: @subtext0; } /* Danger */ &._4a3f8f21 { & when (@flavor = latte) { background-color: lighten(@red, 30%); &:hover { background-color: lighten(@red, 25%); } } & when not(@flavor = latte) { background-color: @red; color: @surface1; &:hover { background-color: lighten(@red, 5%); } } } /* Success */ &.c37751f6 { & when (@flavor = latte) { background-color: lighten(@green, 30%); &:hover { background-color: lighten(@green, 25%); } } & when not(@flavor = latte) { background-color: @green; color: @surface1; &:hover { background-color: lighten(@green, 5%); } } } } /* Signup form */ #signup { /* Logged out signup button in header */ &[href="/signup"] { border-color: @surface0; } #signup_email_error_message, #signup_password_error_message { color: @red; } fieldset { color: @text; } } button[name="show-hide-password"] { background-color: transparent; color: @text; &:hover { background-color: @mantle; } &::before { background-color: @surface0; } } /* Dropdowns */ details ul[class*="Dropdown__DropdownMenu"] { background-color: @base; border-color: @surface0; li a:hover { background-color: @mantle !important; color: @text !important; } } /* Select menus */ select { background-color: @surface0; border-color: @surface2; color: @text; } /* --- SEARCH RESULTS --- */ nav[aria-label="Pagination Navigation"] { div > a { background-color: @base; border-color: @surface0; &:hover { background-color: @mantle; } } } #pkg-list-exact-match { color: @base; background-color: @accent; } /* Username links */ a[aria-label^="publisher"]:hover { color: @accent; } /* --- FOOTER --- */ footer { h3 { color: @text; } ul a:hover { color: @accent; } a[href="https://github.com/npm"] svg { > polygon { fill: @base; } > rect { fill: @text; } } a[href="https://github.com"] svg { fill: @text; } &::after { background-image: @npmGradient; } } --color-prettylights-syntax-comment: @overlay2; --color-prettylights-syntax-constant: @teal; --color-prettylights-syntax-entity: @blue; --color-prettylights-syntax-storage-modifier-import: @peach; --color-prettylights-syntax-entity-tag: @teal; --color-prettylights-syntax-keyword: @mauve; --color-prettylights-syntax-string: @green; --color-prettylights-syntax-variable: @peach; --color-prettylights-syntax-invalid-illegal-text: @red; --color-prettylights-syntax-invalid-illegal-bg: fade(@red, 15%); --color-prettylights-syntax-markup-heading: @teal; --color-prettylights-syntax-markup-italic: @yellow; --color-prettylights-syntax-markup-bold: @yellow; --color-prettylights-syntax-markup-deleted-text: @text; --color-prettylights-syntax-markup-deleted-bg: fade(@red, 40%); --color-prettylights-syntax-markup-inserted-text: @text; --color-prettylights-syntax-markup-inserted-bg: fade(@green, 40%); --color-prettylights-syntax-markup-changed-text: @text; --color-prettylights-syntax-markup-changed-bg: fade(@yellow, 40%); --color-prettylights-syntax-markup-ignored-text: @text; /* stylelint-disable declaration-block-single-line-max-declarations */ /* deno-fmt-ignore */ div.highlight pre {.pl-mb,.pl-mdr,.pl-c{color:var(--color-prettylights-syntax-comment)}.pl-c1,.pl-s .pl-v{color:var(--color-prettylights-syntax-constant)}.pl-e,.pl-en{color:var(--color-prettylights-syntax-entity)}.pl-s .pl-s1,.pl-smi{color:var(--color-prettylights-syntax-storage-modifier-import)}.pl-ent{color:var(--color-prettylights-syntax-entity-tag)}.pl-k{color:var(--color-prettylights-syntax-keyword)}.pl-pds,.pl-s,.pl-s .pl-pse .pl-s1,.pl-sr,.pl-sr .pl-cce,.pl-sr .pl-sra,.pl-sr .pl-sre{color:var(--color-prettylights-syntax-string)}.pl-smw,.pl-v{color:var(--color-prettylights-syntax-variable)}.pl-bu{color:var(--color-prettylights-syntax-brackethighlighter-unmatched)}.pl-ii{color:var(--color-prettylights-syntax-invalid-illegal-text);background-color:var(--color-prettylights-syntax-invalid-illegal-bg)}.pl-c2{color:var(--color-prettylights-syntax-carriage-return-text);background-color:var(--color-prettylights-syntax-carriage-return-bg)}.pl-sr .pl-cce{color:var(--color-prettylights-syntax-string-regexp)}.pl-ml{color:var(--color-prettylights-syntax-markup-list)}.pl-mh,.pl-mh .pl-en,.pl-ms{color:var(--color-prettylights-syntax-markup-heading)}.pl-mi{color:var(--color-prettylights-syntax-markup-italic)}.pl-mb{color:var(--color-prettylights-syntax-markup-bold)}.pl-md{color:var(--color-prettylights-syntax-markup-deleted-text);background-color:var(--color-prettylights-syntax-markup-deleted-bg)}.pl-mi1{color:var(--color-prettylights-syntax-markup-inserted-text);background-color:var(--color-prettylights-syntax-markup-inserted-bg)}.pl-mc{color:var(--color-prettylights-syntax-markup-changed-text);background-color:var(--color-prettylights-syntax-markup-changed-bg)}.pl-mi2{color:var(--color-prettylights-syntax-markup-ignored-text);background-color:var(--color-prettylights-syntax-markup-ignored-bg)}.pl-mdr{color:var(--color-prettylights-syntax-meta-diff-range)}.pl-ba{color:var(--color-prettylights-syntax-brackethighlighter-angle)}.pl-sg{color:var(--color-prettylights-syntax-sublimelinter-gutter-mark)}.pl-corl{text-decoration:underline;color:var(--color-prettylights-syntax-constant-other-reference-link)}} /* stylelint-enable declaration-block-single-line-max-declarations */ } }