/* ==UserStyle==
@name PyPI Catppuccin
@namespace github.com/catppuccin/userstyles/styles/pypi
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/pypi
@version 2025.09.06
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/pypi/catppuccin.user.less
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Apypi
@description Soothing pastel theme for PyPI
@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("pypi.org") {
@import url("https://python.catppuccin.com/pygments/catppuccin-variables.important.css");
:root {
@media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor);
}
@media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor);
}
}
#catppuccin(@flavor) {
#lib.palette();
#lib.defaults();
#lib.css-variables();
::selection {
color: unset; // TODO: Basically another case of setting the text color in the selection, but unsetting it here.
}
body {
background-color: @base !important;
color: @text !important;
}
input,
select,
textarea {
background-color: @mantle !important;
border-color: @surface0 !important;
color: @text !important;
&:active,
&:focus,
&:hover {
border-color: @accent !important;
box-shadow: inset 0 0 0 1px @accent !important;
}
}
input:disabled,
select:disabled {
&,
&:active,
&:focus,
&:hover {
background-color: @mantle !important;
}
}
hr {
background-color: @surface0 !important;
background-image: linear-gradient(90deg, @surface0, @surface0) !important;
}
.project-description blockquote {
color: @subtext0 !important;
}
.project-description table {
tr {
background-color: @base !important;
}
tr:nth-child(odd) {
background-color: @mantle !important;
}
&, tr, th, td {
border-color: @surface0 !important;
}
}
.verified .check {
color: @green;
}
.banner,
.footer {
background-color: @mantle !important;
color: @text !important;
}
.accordion__link {
color: @accent !important;
}
.password-strength {
border-color: @surface2 !important;
}
.accordion__link:active,
.accordion__link:focus {
outline-color: @accent !important;
outline-style: solid;
}
@media (max-width: 1000px) {
.accordion__link {
color: @text !important;
}
.accordion__link:active,
.accordion__link:focus {
outline-color: @text !important;
}
}
.footer__divider {
border-color: @surface0 !important;
}
a,
.footer__menu li a {
&:active,
&:focus {
outline-color: @accent !important;
}
}
.skip-to-content:focus {
background-color: @base !important;
color: @text !important;
}
a:not(.site-header__logo, .button, .dropdown__link, .badge, .release__card),
a:hover:not(
.site-header__logo,
.button,
.dropdown__link,
.badge,
.release__card
),
.footer__menu li a,
.footer__text a,
.language-switcher ul button {
color: @accent !important;
}
.footer__text a,
.language-switcher ul button {
&:active,
&:focus {
outline-color: @accent !important;
}
}
.footer__menu h2,
.footer__text,
.language-switcher ul button.language-switcher__selected::before {
color: @text !important;
}
.language-switcher {
background-color: @crust !important;
border-top-color: @crust !important;
color: @text !important;
}
.horizontal-section--grey {
background-color: @base !important;
border-bottom-color: @base !important;
border-top-color: @base !important;
}
.statistics-bar__statistic {
color: @subtext0 !important;
}
.lede-paragraph {
color: @subtext1 !important;
}
.site-header {
background-color: @crust !important;
border-bottom-color: @crust !important;
}
.site-header__logo:active,
.site-header__logo:focus {
outline-color: @text !important;
}
.dropdown__content {
border-color: @accent !important;
box-shadow: none !important;
}
.dropdown__content li:hover {
background-color: @base !important;
}
.dropdown button.dropdown__link:not(:hover),
.dropdown__link {
background-color: @crust !important;
border-bottom-color: @crust !important;
color: @text !important;
}
.dropdown__link:hover {
background-color: @base !important;
}
a.dropdown__link,
a.dropdown__link:hover {
background-image: none !important;
color: @text !important;
}
.horizontal-menu__link:active,
.horizontal-menu__link:focus {
outline-color: @accent !important;
}
.horizontal-menu--light .horizontal-menu__link {
color: @accent !important;
}
.horizontal-menu--light .horizontal-menu__link:hover {
text-decoration-color: @accent !important;
}
.sponsors,
.sidebar-section.loaded {
display: none;
}
.package-snippet {
background-color: @crust !important;
border-color: @surface0 !important;
box-shadow: none !important;
}
.package-snippet__created {
color: @subtext0 !important;
}
.package-snippet__description {
color: @subtext1 !important;
}
.search-form__search {
background-color: @surface0 !important;
}
.search-form__button {
color: @subtext0;
}
.button {
border-color: @subtext0 !important;
color: @text !important;
&:active,
&:focus,
&:hover {
border-color: @subtext1 !important;
color: @text !important;
}
}
.button--primary,
.button--primary:active,
.button--primary:focus,
.button--primary:hover {
background-color: @accent !important;
border-color: @accent !important;
color: @base !important;
outline-color: @accent !important;
}
.danger {
color: @red !important;
}
.notification-bar {
background-color: @accent !important;
border-bottom-color: @accent !important;
color: @base !important;
}
.notification-bar--danger {
background-color: @red !important;
}
.notification-bar--success {
background-color: @green !important;
}
.notification-bar--banner .button {
color: @base !important;
}
.badge--warning {
background-color: @yellow !important;
border-color: @yellow !important;
color: @base !important;
&:hover {
color: @base !important;
}
}
.badge--warning:active,
.badge--warning:focus {
outline-color: invisible !important;
}
.callout-block--warning {
border-color: @yellow !important;
}
.callout-block--warning > :not(.modal, .button, a) {
color: @text !important;
}
.callout-block--warning::before {
background-color: @yellow !important;
}
.callout-block--warning .callout-block__dismiss:active,
.callout-block--warning .callout-block__dismiss:focus {
outline-color: @yellow !important;
}
.callout-block {
border-color: @accent !important;
}
.callout-block::before {
background-color: @accent !important;
}
.callout-block--danger {
border-color: @red !important;
}
.callout-block--danger > :not(.modal, .button) {
color: @text !important;
}
.callout-block--danger::before {
background-color: @red !important;
}
.callout-block--danger .callout-block__dismiss:active,
.callout-block--danger .callout-block__dismiss:focus {
outline-color: @red !important;
}
.callout-block--success {
border-color: @green !important;
}
.callout-block--success > :not(.modal, .button) {
color: @text !important;
}
.callout-block--success::before {
background-color: @green !important;
}
.callout-block--success .callout-block__dismiss:active,
.callout-block--success .callout-block__dismiss:focus {
outline-color: @green !important;
}
.faq-group h3::before {
color: @accent !important;
}
.badge {
background-color: @accent !important;
border-color: @accent !important;
color: @base !important;
}
.badge:hover {
color: @base !important;
}
.badge:active,
.badge:focus {
border-color: @base !important;
outline-color: @accent !important;
}
.badge--success {
background-color: @green !important;
border-color: @green !important;
}
.badge--success:active,
.badge--success:focus {
outline-color: @green !important;
}
.notification-bar--warning {
background-color: @yellow !important;
color: @base !important;
}
.notification-bar--warning .notification-bar__dismiss:active,
.notification-bar--warning .notification-bar__dismiss:focus {
outline-color: @yellow !important;
}
.table td,
.table th {
border-bottom-color: @surface0 !important;
}
.table--collaborators .table__user-text > * {
background-image: linear-gradient(
90deg,
@accent,
@accent
) !important;
color: @accent !important;
}
.table--collaborators .table__user-text > :hover {
background-image: linear-gradient(
90deg,
@accent,
@accent
) !important;
color: @accent !important;
}
.table--collaborators .table__user-text > :active,
.table--collaborators .table__user-text > :focus {
outline-color: @accent !important;
}
@media (max-width: 600px) {
.table--security-logs,
.table--collaborators,
.table--releases,
.table--emails,
.table--2fa,
.table--api-tokens,
.table--publisher-list {
border-bottom-color: @surface0 !important;
}
.table--security-logs tbody tr td:first-child,
.table--security-logs tbody tr th:first-child,
.table--collaborators tbody tr td:first-child,
.table--collaborators tbody tr th:first-child,
.table--releases tbody tr td:first-child,
.table--releases tbody tr th:first-child,
.table--emails tbody tr td:first-child,
.table--emails tbody tr th:first-child,
.table--2fa tbody tr td:first-child,
.table--2fa tbody tr th:first-child,
.table--api-tokens tbody tr td:first-child,
.table--api-tokens tbody tr th:first-child,
.table--publisher-list tbody tr td:first-child,
.table--publisher-list tbody tr th:first-child {
border-top-color: @surface0 !important;
}
}
@media (max-width: 800px) {
.table--files,
.table--history,
.table--downloads {
border-bottom-color: @subtext0 !important;
}
.table--files tbody tr td:first-child,
.table--files tbody tr th:first-child,
.table--history tbody tr td:first-child,
.table--history tbody tr th:first-child,
.table--downloads tbody tr td:first-child,
.table--downloads tbody tr th:first-child {
border-top-color: @subtext0 !important;
}
}
@media (max-width: 400px) {
.table--hashes {
border-bottom-color: @subtext0 !important;
}
.table--hashes tbody tr td:first-child,
.table--hashes tbody tr th:first-child {
border-top-color: @subtext0 !important;
}
.table--hashes td .button::before {
border-color: transparent !important;
}
}
.sponsor-grid__sponsor {
background-color: @mantle !important;
border-color: @subtext0 !important;
}
.sponsor-grid__sponsor:active,
.sponsor-grid__sponsor:hover {
border-color: @subtext0 !important;
}
.sponsor-grid__sponsor--invitation,
.sponsor-grid__sponsor--invitation:hover {
border-color: @accent !important;
}
.sponsor-grid__sponsor-activity {
color: @subtext0 !important;
}
.sponsor-package {
border-color: @accent !important;
}
.sponsor-package__header {
background-color: @accent !important;
color: @base !important;
}
.sponsor-package__icon {
background-color: @accent !important;
}
.mobile-search {
background-color: @crust !important;
}
.hooray-list {
border-top-color: @subtext0 !important;
}
.hooray-list li {
border-bottom-color: @subtext0 !important;
}
.hooray-list li::before {
color: @text !important;
}
.button--tertiary {
background-color: @crust !important;
border-color: @subtext0 !important;
}
.button--danger {
background-color: @red !important;
border-color: @red !important;
color: @base !important;
}
.button--danger:active,
.button--danger:focus,
.button--danger:hover {
background-color: @red !important;
border-color: @red !important;
color: @base !important;
text-decoration-color: @red !important;
}
.button--danger:active,
.button--danger:focus {
border-color: @red !important;
}
.button--danger:active:active,
.button--danger:active:focus,
.button--danger:focus:active,
.button--danger:focus:focus {
outline-color: @red !important;
}
.button--warning {
background-color: @yellow !important;
border-color: @yellow !important;
color: @base !important;
}
.button--warning:active,
.button--warning:focus,
.button--warning:hover {
background-color: @yellow !important;
border-color: @yellow !important;
color: @base !important;
text-decoration-color: @yellow !important;
}
.button--warning:active,
.button--warning:focus {
border-color: @yellow !important;
}
.button--disabled,
.button--disabled:active,
.button--disabled:focus,
.button--disabled:hover,
.button[disabled],
.button[disabled]:active,
.button[disabled]:focus,
.button[disabled]:hover {
background-color: @base !important;
border-color: @subtext0 !important;
color: @subtext0 !important;
}
.button--switch-to-desktop,
.button--switch-to-desktop:active,
.button--switch-to-desktop:focus,
.button--switch-to-desktop:hover {
border-color: @text !important;
color: @text !important;
}
.password-strength .password-strength__gauge--0 {
background-color: @red !important;
}
.password-strength .password-strength__gauge--1 {
background-color: @peach !important;
}
.password-strength .password-strength__gauge--2 {
background-color: @yellow !important;
}
.password-strength .password-strength__gauge--3 {
background-color: @blue !important;
}
.password-strength .password-strength__gauge--4 {
background-color: @green !important;
}
.package-header__pip-instructions span {
background-color: @crust !important;
border-color: @subtext0 !important;
}
.package-header__pip-instructions button {
background-color: @crust !important;
border-color: @subtext0 !important;
color: @text !important;
}
.package-header__pip-instructions button:hover {
background-color: @base !important;
}
.package-header__pip-instructions button:active,
.package-header__pip-instructions button:focus {
outline-color: @base !important;
}
.docutils.literal,
code,
kbd,
pre,
samp,
tt {
background-color: @mantle !important;
border-color: @mantle !important;
color: @subtext1 !important;
}
.vertical-tabs__tab:hover {
color: @accent !important;
}
.vertical-tabs__tab:active,
.vertical-tabs__tab:focus {
box-shadow: 0 0 0 2px @crust !important;
outline-color: @accent !important;
}
@media (max-width: 800px) {
.vertical-tabs__tab--mobile,
.vertical-tabs__tab--mobile:last-of-type {
border-bottom-color: @surface0 !important;
}
}
.vertical-tabs__tab--is-active,
.vertical-tabs__tab--is-active:hover {
background: @crust !important;
color: @accent !important;
}
.vertical-tabs__content:focus {
outline-color: @accent !important;
}
.verified,
.unverified {
small {
color: @subtext0 !important;
}
}
.sidebar-section .sidebar-section__user-gravatar:active,
.sidebar-section .sidebar-section__user-gravatar:focus {
outline-color: @accent !important;
}
.sidebar-section__user-gravatar-text,
.sidebar-section__user-gravatar-text:hover {
background-image: linear-gradient(
90deg,
@accent,
@accent
) !important;
color: @accent !important;
}
.sidebar-section__user-gravatar-text:active,
.sidebar-section__user-gravatar-text:focus {
outline-color: @accent !important;
}
.sidebar-section {
border-bottom-color: @surface0;
}
.status-badge {
background-color: @crust !important;
border-color: @mantle !important;
}
.status-badge span {
color: @base !important;
text-decoration: none !important;
}
.status-badge:active,
.status-badge:focus {
outline-color: @mantle !important;
}
.status-badge::before {
color: @base !important;
border-right-color: @mantle !important;
}
.status-badge--good {
background-color: @green !important;
color: @base !important;
}
.status-badge--warn {
background-color: @yellow !important;
}
.status-badge--bad {
background-color: @red !important;
color: @base !important;
}
.viewport-section__rule {
background-color: @base !important;
}
.viewport-section--dark {
background-color: @base !important;
color: @text !important;
}
.viewport-section--ee .viewport-section__heading {
background-color: @base !important;
color: @accent !important;
}
.viewport-section--ee
.viewport-section__video
.viewport-section__video-container {
border-color: @crust !important;
outline-color: invisible !important;
}
.form-errors,
.form-errors li::before {
color: @red !important;
}
.form-errors .form-error--valid,
.form-errors .form-error--valid::before {
color: @green !important;
}
.breadcrumbs__breadcrumb {
color: @text !important;
}
.breadcrumbs__breadcrumb:first-child {
color: @text !important;
}
.breadcrumbs__breadcrumb:not(:last-child)::after {
color: @text !important;
}
.horizontal-menu__link--with-icon:hover .fa,
.horizontal-menu__link--with-icon:hover .user-image {
opacity: 100% !important;
}
.release__line {
@svg: escape(
''
);
background-image: url("data:image/svg+xml;utf8,@{svg}") !important;
}
.release__node[src*="white"] {
background-color: @base !important;
}
.release__card {
background-color: @crust !important;
border-color: @surface0 !important;
color: @text !important;
}
.release__version-date {
color: @subtext0 !important;
}
.release--current {
background-color: @mantle !important;
border-color: @surface0 !important;
}
.release {
border-left-color: @mantle !important;
}
.checkbox-tree li {
&::before,
&::after {
border-color: @surface2;
}
}
.filter-badge {
background-color: @accent;
&,
.filter-badge__remove-button,
.filter-badge__icon {
color: @crust;
}
.filter-badge__remove-button {
border-left-color: if(
@flavor = latte,
lighten(@accent, 10%),
darken(@accent, 5%)
);
&:hover {
background-color: darken(@accent, 10%);
}
}
}
@media (min-width: 801px) {
.package-snippet,
.package-snippet:hover {
@svg: escape(
''
);
background-image: url("data:image/svg+xml;utf8,@{svg}") !important;
}
}
.site-header__logo img {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
.about-pypi__logo img {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
.-js-white-cube,
.release__node[src*="white"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
}
.release__node[src*="blue"] {
@svg: escape(
''
);
content: url("data:image/svg+xml,@{svg}");
background-color: @mantle !important;
}
}
}