diff --git a/scripts/userstyles.yml b/scripts/userstyles.yml index bd121664..f1e305b7 100644 --- a/scripts/userstyles.yml +++ b/scripts/userstyles.yml @@ -479,6 +479,14 @@ userstyles: readme: app-link: "https://nixos.wiki" current-maintainers: [*winston] + npm: + name: npm + category: development + icon: npm + color: red + readme: + app-link: "https://www.npmjs.com/" + current-maintainers: [*uncenter] openmediavault: name: OpenMediaVault category: productivity diff --git a/styles/npm/assets/catwalk.webp b/styles/npm/assets/catwalk.webp new file mode 100644 index 00000000..9b1ce4c7 Binary files /dev/null and b/styles/npm/assets/catwalk.webp differ diff --git a/styles/npm/assets/frappe.webp b/styles/npm/assets/frappe.webp new file mode 100644 index 00000000..8a792b42 Binary files /dev/null and b/styles/npm/assets/frappe.webp differ diff --git a/styles/npm/assets/latte.webp b/styles/npm/assets/latte.webp new file mode 100644 index 00000000..b1c59142 Binary files /dev/null and b/styles/npm/assets/latte.webp differ diff --git a/styles/npm/assets/macchiato.webp b/styles/npm/assets/macchiato.webp new file mode 100644 index 00000000..c69fe68b Binary files /dev/null and b/styles/npm/assets/macchiato.webp differ diff --git a/styles/npm/assets/mocha.webp b/styles/npm/assets/mocha.webp new file mode 100644 index 00000000..294548a4 Binary files /dev/null and b/styles/npm/assets/mocha.webp differ diff --git a/styles/npm/catppuccin.user.css b/styles/npm/catppuccin.user.css new file mode 100644 index 00000000..0adfce9e --- /dev/null +++ b/styles/npm/catppuccin.user.css @@ -0,0 +1,1124 @@ +/* ==UserStyle== +@name npm Catppuccin +@namespace github.com/catppuccin/userstyles/styles/npm +@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/npm +@version 0.0.1 +@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/npm/catppuccin.user.css +@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== */ + +@-moz-document domain("www.npmjs.com") { + /* prettier-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: #cdd6f4; @subtext1: #bac2de; @subtext0: #a6adc8; @overlay2: #9399b2; @overlay1: #7f849c; @overlay0: #6c7086; @surface2: #585b70; @surface1: #45475a; @surface0: #313244; @base: #1e1e2e; @mantle: #181825; @crust: #11111b; }; + } + + #catppuccin(@lookup, @accent) { + @rosewater: @catppuccin[@@lookup][@rosewater]; + @flamingo: @catppuccin[@@lookup][@flamingo]; + @pink: @catppuccin[@@lookup][@pink]; + @mauve: @catppuccin[@@lookup][@mauve]; + @red: @catppuccin[@@lookup][@red]; + @maroon: @catppuccin[@@lookup][@maroon]; + @peach: @catppuccin[@@lookup][@peach]; + @yellow: @catppuccin[@@lookup][@yellow]; + @green: @catppuccin[@@lookup][@green]; + @teal: @catppuccin[@@lookup][@teal]; + @sky: @catppuccin[@@lookup][@sky]; + @sapphire: @catppuccin[@@lookup][@sapphire]; + @blue: @catppuccin[@@lookup][@blue]; + @lavender: @catppuccin[@@lookup][@lavender]; + @text: @catppuccin[@@lookup][@text]; + @subtext1: @catppuccin[@@lookup][@subtext1]; + @subtext0: @catppuccin[@@lookup][@subtext0]; + @overlay2: @catppuccin[@@lookup][@overlay2]; + @overlay1: @catppuccin[@@lookup][@overlay1]; + @overlay0: @catppuccin[@@lookup][@overlay0]; + @surface2: @catppuccin[@@lookup][@surface2]; + @surface1: @catppuccin[@@lookup][@surface1]; + @surface0: @catppuccin[@@lookup][@surface0]; + @base: @catppuccin[@@lookup][@base]; + @mantle: @catppuccin[@@lookup][@mantle]; + @crust: @catppuccin[@@lookup][@crust]; + @accent-color: @catppuccin[@@lookup][@@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: @red; + --color-fg-accent: @blue; + --color-fg-success: @green; + --color-fg-attention: @yellow; + --color-fg-danger: @red; + --color-border-strong: @surface0; + + &, + main { + background-color: @base !important; + } + + color-scheme: if(@lookup=latte, light, dark); + accent-color: @accent-color; + + /* Primary background */ + .bg-white, + ._4ea0e50d { + background-color: @base; + } + + /* Background layer background */ + ._7eb68a55, + .e9998f88 { + background-color: @mantle; + } + + /* Primary text */ + ._99e3854f, + .black, + .black-90, + .black-80, + ._0b9b6c57, + ._1b8c0a9f, + p, + a { + color: @text; + } + + /* Secondary text */ + .black-70, + .black-60, + .cd2827bb a { + color: @subtext0; + } + ._66c2abad { + color: @overlay0; + } + + /* 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: @red; + } + + /* 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( + @lookup = latte, + desaturate(lighten(@green, 30%), 5%), + desaturate(darken(@green, 5%), 5%) + ); + border-color: @green; + + #notification, + button[aria-label="Close notification"] { + color: if(@lookup = 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 { + button[type="submit"] { + background-color: @subtext1; + } + + & > div { + border-color: @crust; + + &:focus-within { + border-color: @subtext1; + } + + & > div { + background-color: @crust; + + input[type="search"] { + color: @text; + + &::placeholder { + color: @overlay1; + } + + &::-webkit-search-cancel-button { + display: none; + } + } + } + + /* Floating live results */ + ul li { + border-bottom-color: @surface0; + color: @text; + } + } + } + + /* Profile picture nvigation */ + #signup { + border-color: @surface0; + } + nav > button[aria-label="Profile menu"] { + /* Dropdown arrow */ + img[alt="avatar"] { + border-color: @text; + + & + div > svg { + fill: @text; + } + } + + /* Popup */ + + span > div { + border-color: @surface0; + + /* Popup triangle */ + &::after { + border-bottom-color: @base; + } + &::before { + border-bottom-color: @surface0; + } + + /* Username */ + h2 { + border-bottom-color: @surface1; + } + + /* Navigation options */ + ul li a { + &:hover, + &:focus { + background-color: @crust; + } + + /* Red "Add Organization" button */ + &[href="/org/create"] { + border-color: @surface0; + color: @red; + svg { + fill: @red; + } + } + } + } + } + } + + /* --- HOME PAGE --- */ + + article > section:nth-of-type(1) { + 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: @red; + } + 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: @red; + } + + /* --- PACKAGE PAGES --- */ + + /* "public" text */ + ._813b53b2 { + color: @green; + } + /* TypeScript logo */ + img[alt="TypeScript icon, indicating that this package has built-in type declarations"] { + @svg: escape( + '' + ); + height: 0 !important; + width: 0 !important; + padding-left: 20px; + margin-left: 1rem; + padding-top: 20px; + background: url("data:image/svg+xml,@{svg}") no-repeat; + } + + /* Navigation tabs */ + ul[aria-owns*="package-tab-"] { + li { + &:has(#package-tab-readme) { + border-color: @yellow; + + &:has(> a[aria-selected="false"]):hover { + background-color: fade(@yellow, 20%); + } + + a { + color: @yellow; + } + } + &:has(#package-tab-code), + &:has(#package-tab-admin) { + border-color: @red; + + &:has(> a[aria-selected="false"]):hover { + background-color: fade(@red, 20%); + } + + a { + color: @red; + } + } + &:has(#package-tab-dependents), + &:has(#package-tab-packages) { + border-color: @mauve; + + &:has(> a[aria-selected="false"]):hover { + background-color: fade(@mauve, 20%); + } + + a { + color: @mauve; + } + } + &:has(#package-tab-dependencies) { + border-color: @pink; + + &:has(> a[aria-selected="false"]):hover { + background-color: fade(@pink, 20%); + } + + a { + color: @pink; + } + } + &:has(#package-tab-versions) { + border-color: @sapphire; + + &:has(> a[aria-selected="false"]):hover { + background-color: fade(@sapphire, 20%); + } + + a { + color: @sapphire; + } + } + &:has(#package-tab-orgs) { + border-color: @green; + + &:has(> a[aria-selected="false"]):hover { + background-color: fade(@green, 20%); + } + + a { + color: @green; + } + } + } + } + + /* Sidebar icons */ + ._5cfc0900 svg, + .b5be2af6 svg, + button[aria-label="Copy install command line"] svg, + [aria-labelledby="repository repository-link"] svg g { + 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-color, 20%); + + svg { + stroke: @accent-color; + fill: fade(@accent-color, 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 { + height: 0 !important; + width: 0 !important; + padding-top: 16px; + padding-left: 12px; + @svg: escape( + '' + ); + background: url("data:image/svg+xml,@{svg}") no-repeat; + } + + ul li { + border-bottom-color: @surface0; + + &:hover { + background-color: @surface0; + } + + img { + height: 0 !important; + width: 0 !important; + @folder: escape( + '' + ); + @file: escape( + '' + ); + &._1528cda6 { + padding-top: 25px; + padding-left: 20px; + background: url("data:image/svg+xml,@{folder}") no-repeat; + } + &._7ec1ed32 { + padding-top: 22.5px; + padding-left: 18px; + background: url("data:image/svg+xml,@{file}") no-repeat; + } + } + } + + /* 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; + } + .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: @red; + + &:hover { + color: @text; + } + } + } + + /* Readme tab */ + #tabpanel-readme #readme { + color: @text; + a { + color: @red; + } + 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: darken(@base, 2.5%); + color: @text; + } + 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: @red; + + &:hover { + color: @text; + } + } + } + /* Share provenance feedback link */ + #user-content-provenance a[href=" https://github.com/npm/feedback"] + { + color: @text; + } + + /* --- 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-color; + background-color: fade(@accent-color, 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( + '' + ); + height: 0 !important; + width: 0 !important; + padding-left: 42px; + padding-top: 42px; + background: url("data:image/svg+xml,@{svg}") no-repeat; + } + /* Step 2: invite members */ + img[src="https://static-production.npmjs.com/d6654c911c7cf2159948148754c95bb6.svg"] + { + @svg: escape( + '' + ); + height: 0 !important; + width: 0 !important; + padding-left: 42px; + padding-top: 42px; + background: url("data:image/svg+xml,@{svg}") no-repeat; + } + 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(@lookup = latte, 50%, 100%) + ); + } + .b--light-green { + border-color: @teal; + } + + /* --- 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 (@lookup = latte) { + background-color: lighten(@red, 30%); + + &:hover { + background-color: lighten(@red, 25%); + } + } + + & when not (@lookup = latte) { + background-color: @red; + color: @surface1; + + &:hover { + background-color: lighten(@red, 5%); + } + } + } + + /* Success */ + &.c37751f6 { + & when (@lookup = latte) { + background-color: lighten(@green, 30%); + + &:hover { + background-color: lighten(@green, 25%); + } + } + + & when not (@lookup = latte) { + background-color: @green; + color: @surface1; + + &:hover { + background-color: lighten(@green, 5%); + } + } + } + } + + /* Input elements */ + input, + textarea { + background-color: transparent; + + &:focus { + box-shadow: 0 0 0 2px @accent-color; + } + } + #signup_email_error_message { + color: @red; + } + 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 --- */ + + [aria-labelledby="search_ranking_radiogroup_label"] { + & > div:focus-within { + outline-style: none; + } + + label { + color: @subtext0; + + &[for="search_ranking_optimal"] { + border-bottom-color: @surface1; + } + + &[for="search_ranking_popularity"] { + border-bottom-color: @sky; + } + + &[for="search_ranking_quality"] { + border-bottom-color: @mauve; + } + + &[for="search_ranking_maintenance"] { + border-bottom-color: @red; + } + } + } + /* Results header, results count, pagination buttons */ + .a9b7335e { + background-color: @mantle; + } + nav[aria-label="Pagination Navigation"] { + div > a { + background-color: @base; + border-color: @surface0; + + &:hover { + background-color: @mantle; + } + } + } + #pkg-list-exact-match { + color: @base; + & when (@lookup = latte) { + background-color: lighten(@mauve, 20%); + } + & when not (@lookup = latte) { + background-color: @mauve; + } + } + div:has(#search_ranking_radiogroup_label) { + a[href^="/search?q=keywords"] { + background-color: @mantle; + + &:hover { + background-color: @crust; + } + } + } + /* Username links */ + a[aria-label^="publisher"]:hover { + color: @red; + } + /* PQM text */ + ._89d0b3e5 { + color: @text; + } + /* PQM bars */ + ._464c07bf { + background-color: @sky; + } + ._625ca439 { + background-color: @mauve; + } + ._9a8a65f4 { + background-color: @red; + } + + /* --- FOOTER --- */ + + footer { + 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: @overlay1; + --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: fadeout(@red, 85%); + --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: fadeout(@red, 60%); + --color-prettylights-syntax-markup-inserted-text: @text; + --color-prettylights-syntax-markup-inserted-bg: fadeout(@green, 60%); + --color-prettylights-syntax-markup-changed-text: @text; + --color-prettylights-syntax-markup-changed-bg: fadeout(@yellow, 60%); + --color-prettylights-syntax-markup-ignored-text: @text; + + /* stylelint-disable declaration-block-single-line-max-declarations */ + /* prettier-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 */ + } + + @media (prefers-color-scheme: light) { + :root { + #catppuccin(@lightFlavor, @accentColor); + } + } + @media (prefers-color-scheme: dark) { + :root { + #catppuccin(@darkFlavor, @accentColor); + } + } +} + +/* Todos: +- https://www.npmjs.com/org/create +- https://www.npmjs.com/products/pro +- https://www.npmjs.com/products/teams +- https://www.npmjs.com/products +*/