/* ==UserStyle== @name Chess.com Catppuccin @namespace github.com/catppuccin/userstyles/styles/chess.com @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/chess.com @version 2024.12.28 @updateURL https://github.com/catppuccin/userstyles/raw/main/styles/chess.com/catppuccin.user.css @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Achess.com @description Soothing pastel theme for Chess.com @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"] @var select highlightColor "Highlight" ["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("chess.com") { :root { #catppuccin(@lightFlavor, @accentColor); } :root.dark-mode { #catppuccin(@darkFlavor, @accentColor); } #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]; @highlight-color: @catppuccin[@@lookup][@@highlightColor]; color-scheme: if(@lookup = latte, light, dark); ::selection { background-color: fade(@accent-color, 30%); } input, textarea { &::placeholder { color: @subtext0 !important; } } --color-bg-opaque: @mantle; --color-bg-opaque-lighter: @base; --color-bg-subtle: @surface1; --color-bg-subtler: @surface0; --color-bg-input: @mantle; --color-bg-speech: @surface0; --color-bg-secondary: @surface0; --color-bg-tertiary: @surface1; --color-bg-quaternary: @surface2; --color-gray-100: @overlay1; --color-text-speech: @text; --color-icon-default: @subtext0; --color-icon-default-hovered: @subtext1; --color-icon-bolder: @subtext1; --color-icon-boldest: @text; --color-text-boldest: @text; --color-text-bolder: @text; --color-text-default: @text; --color-text-default-hovered: @subtext1; --color-text-subtle: @subtext1; --color-text-placeholder: @subtext0; --color-text-inverse: @crust; --color-text-link: @blue; --color-text-link-hovered: @sky; --color-border-default: @surface1; --color-border-subtle: @overlay2; --color-border-selected: @accent-color; --color-green-300: @accent-color; --color-red-300: @red; /* Danger */ --color-red-400: @red; /* Danger */ --color-green-400: @green; /* Success */ /* Links */ --color-blue-200: @sapphire; --color-blue-300: @sky; --color-blue-400: @blue; --color-classification-blunder: @red; --color-classification-miss: @maroon; --color-classification-mistake: @peach; --color-classification-inaccuracy: @yellow; --color-classification-best: @green; --color-classification-excellent: @green; --color-classification-good: @teal; --color-classification-great: @blue; --color-classification-brilliant: @sapphire; --color-classification-book: @rosewater; --color-icon-win: @green; --color-text-win: @green; --color-icon-draw: @subtext0; --color-text-draw: @subtext0; --color-bg-draw: @subtext0; --color-border-draw: var(--color-transparent-white-10); --color-icon-loss: @red; --color-text-loss: @red; --color-border-loss: @red; --color-icon-bullet: @peach; --color-icon-blitz: @yellow; body { --theme-background-color: @base !important; --theme-background-image: none; --globalBackground: @mantle !important; --globalBackgroundOpaque: @mantle !important; --globalSecondaryBackground: @crust !important; --globalTertiaryBackground: @surface0 !important; --globalAccentBackground: @accent-color !important; --globalSecondaryAccentBackground: @surface0 !important; --globalSiteBackground: @base !important; --globalBorder: @surface0 !important; --globalColorThemeFull: @text !important; --globalColorThemeHigh: @text; --globalColorThemeMid: @overlay2 !important; --globalColorThemeLow: @overlay0 !important; --globalColorThemeLower: @base !important; --globalColorThemeLink: @sapphire !important; --globalColorThemeBlueToMid: @text; --globalOverlayBackground: @base !important; --globalColorWin: @green !important; --globalColorDraw: @accent-color !important; --globalColorLoss: @red !important; --labelBgColor: @surface1; --activeLabelColor: @accent-color; --buttonBgColor: @text; --nodeColor: @text; --nodeBackground: @yellow; } /* Home page */ .index-title, .index-info-item-counter { color: @text !important; } .index-info-item { color: @subtext0 !important; } .index-suggestion-title, .index-posts-title, .index-post-name { color: @text; } .index-quote-author, .index-quote-body, .index-post-author { color: @subtext1; } .promo-title, .promo-rank { color: @text; } .promo-subtitle { color: @subtext1; } .home-username-link { color: @text; } /* Lessons page */ .level-title { color: @text; } .level-desc, .course-header-description strong { color: @subtext1; } .lessons-search-filter { .form-dropdown-chevron, .form-dropdown-control-label, .form-dropdown-value { color: @subtext1; } } /* Play lesson video */ .lesson-status { background-color: @text; } /* More page */ .landing-header { color: @text; } /* UI */ .v5-title-label { color: @text; } .v5-tabs-list, .v5-tabs-list-dark { --borderColor: @surface2; --tabTitleColor: @subtext0; --tabHoverTitleColor: @subtext1; --tabSelectedBorderColor: @subtext1; --tabSelectedTitleColor: @text; } .ui_v5-input-component { --borderColor: @surface0; --borderFocus: @surface1; --bgColor: @base; --textColor: @text; --secondaryTextColor: @subtext1; } .ui_v5-input-group-component { --inputIconColor: @subtext0; } .ui_v5-button-component { --boxShadow: none; --boxShadowHover: none; box-shadow: none; &.ui_v5-button-basic { --basicColor: @text !important; --basicHoverColor: @text !important; --basicBgColor: @surface1 !important; --basicBghover: @surface2 !important; --borderColor: @surface0 !important; } &.ui_v5-button-primary { color: @crust !important; background-color: @accent-color; &:hover { background-color: darken(@accent-color, 5%); box-shadow: none; } } } .ui_v5-select-component { --borderColor: @surface0; --borderFocus: @surface1; --bgColor: @base; --textColor: @text; --arrowColor: @subtext0; } .ui_pagination-item-component { --paginationColor: @text; --paginationBgColor: @surface1; --paginationBgHover: @surface2; --paginationColorMuted: @base; --paginationBgColorMuted: @overlay1; } .nav-link-text { color: @text !important; } .nav-menu-area:last-of-type .icon-font-chess { color: @mantle !important; } .nav-link-main-design, .nav-link-main-link { color: @text !important; &:hover { color: @subtext1 !important; } } #tb { .toolbar-action-icon { color: @subtext1; } .toolbar-action-wrapper:hover .toolbar-action-icon { color: @text !important; } } #sb { color: @subtext0; &.open { background-color: @mantle; } .nav-action:hover { background-color: @surface0; color: @text; } .nav-panel-shade, .nav-panel-theme-bg, .nav-action.has-popover + .nav-popover { background: @mantle !important; } .nav-popover.dark .btn-link { color: @text; } .nav-menu-area:last-of-type { color: @text !important; } .nav-popover.nav-search { --search-bg-color: @surface0; } } .nav-popover.dark { background: @mantle; } .section-heading-component .back-link-component { color: currentcolor; } .section-heading-black { background-color: @surface1; color: @text; } .nav-section-header-component { background-color: @base; color: @text; } .popover-friends-header, .popover-friends-content, .popover-messages-header, .popover-messages-content, .popover-settings-header, .popover-settings-content { background: @mantle; } /* Buttons */ .selector-button-button, .time-selector-button-button { background: @surface0; &:hover { background: @surface1; } } .cc-switch-checkbox:not(.cc-switch-readonly):checked + .cc-switch-label .cc-switch-button { background-color: @surface1; } .cc-button-component, .cc-button-primary { --bgColor: @accent-color; --bgColorHover: darken(@accent-color, 5%); --textColor: @crust; --textColorHover: @crust; box-shadow: none; } .cc-button-primary, .cc-button-monetization { --borderBottomLine: darken(@accent-color, 2%); --borderBottomLineHover: darken(@accent-color, 4%); } .cc-button-secondary { --bgColor: @surface0; --bgColorHover: darken(@surface0, 5%); --iconColor: @text; --iconColorHover: @text; --textColor: @text; --textColorHover: @text; } .cc-button-danger { --bgColor: @red; --bgColorHover: darken(@red, 5%); color: @crust; } .v5-section-shadow, .v5-section-shadow-hover { --linkHoverBackground: @surface1; --linkBoxShadow: 0 0.5rem 0 0 @surface2; } /* Game */ .user-username-component, .cc-user-username-white, .cc-user-rating-white { color: @text; text-shadow: none; } .user-tagline-rating.user-tagline-white { color: @overlay1; } .clock-component.clock-black { background: @surface0; } .clock-component.clock-white { background: @text; } .highlight { background: @highlight-color !important; opacity: 1 !important; } .hover-square rect { stroke: @overlay1 !important; } .hint { background-color: @overlay1; filter: drop-shadow(0 0 1px @crust); } .capture-hint { background-color: @overlay1; filter: drop-shadow(0 0 1px @crust); z-index: -1; } /* Review/evaluation */ .evaluation-bar-bar { .evaluation-bar-black { background-color: @surface2; } .evaluation-bar-draw { background-color: @overlay1; } .evaluation-bar-white { background-color: @text; } } .review-rating-white { background-color: @text; } .review-rating-black { background-color: @surface0; color: @text; } .overview-view-new-game-button { background-color: @surface1; } .arrow { fill: @overlay0 !important; } g#winner [fill="#dbac16"] { fill: @yellow !important; } /* Game over */ .modal-game-over-header-grey, .modal-game-over-header-black-win, .game-over-header-component { background-color: @base; color: @text; } .modal-game-over-user-winner-active, .modal-game-over-user-crown { background: @lavender; } .game-over-review-button-label { color: @crust; text-shadow: none; } /* Ads */ .placeholder-ad-upgrade { background-color: @accent-color; } .placeholder-ad-link { color: @crust; } .modal-trial-component.modal-trial-special-offer { .modal-trial-header-background { background-color: @accent-color; } } .coach-nudges-modal-component { background: @mantle; } .ready-to-play-banner-component { background-color: @mantle; .ready-to-play-banner-title, .ready-to-play-banner-list { color: @text; } } .notifications-links-trial .nav-link-text { color: @crust !important; } /* Misc */ /* GM/IM/etc badge */ --color-bg-chesstitle: @accent-color; .course-author-title, .course-header-author-title, .form-dropdown-short-title, .index-chess-title, .leaderboard-index-chess-title, .player-header-title, .category-headline-chess-title { color: @crust !important; } .tooltip-body { background: @surface0; color: @text; &::after { border-top-color: @surface0 !important; } } .popup-component { background-color: @surface0; color: @text; &.popup-left .popup-arrow { border-left-color: @surface0; } &.popup-right .popup-arrow { border-right-color: @surface0; } } /* Error banner */ .alerts-alert { color: @crust; } div.mode-selection-button-selected { > .mode-selection-button-description { color: @surface1; } > .mode-selection-button-mode { color: @mantle; } } .status-component { background-color: @accent-color; color: @crust; } .navigation-footer-page-component, .navigation-footer-platform-icon { color: @subtext1; text-shadow: none; } .download-button-button { color: @crust !important; } .table-hover tbody tr:hover { background-color: @surface2; } /* Board */ @board: escape( '' ); #board-play-computer, .fade-in-overlay { background-image: url("data:image/svg+xml,@{board}"); } .coordinate-light { fill: @accent-color; } .coordinate-dark { fill: @surface0; } /* The "Tatiana" piece set. Author: sadsnake1 License: CC BY-NC-SA 4.0 (https://creativecommons.org/licenses/by-nc-sa/4.0/) Source: https://github.com/sharechess/sharechess/tree/4f2f54c1340df59556f0f1d67e7b788c3322229c/public/pieces/tatiana */ @bishop: ''; @king: ''; @knight: ''; @rook: ''; @pawn: ''; @queen: ''; #piece(@piece, @type) { @raw: if( @type = "white", replace( replace( replace(replace(@piece, "%BORDER%", @mantle), "%BG%", @text), "#fff", @mantle ), "#000", @text ), replace( replace( replace(replace(@piece, "%BORDER%", @mantle), "%BG%", @surface2), "#fff", @text ), "#000", @mantle ) ); @svg: escape(@raw); @result: url("data:image/svg+xml,@{svg}"); } --theme-board-style-image: url("data:image/svg+xml,@{board}"); --theme-board-style-highlight-color: @highlight-color; --theme-piece-set-wp: #piece(@pawn, "white") []; --theme-piece-set-wn: #piece(@knight, "white") []; --theme-piece-set-wr: #piece(@rook, "white") []; --theme-piece-set-wb: #piece(@bishop, "white") []; --theme-piece-set-wq: #piece(@queen, "white") []; --theme-piece-set-wk: #piece(@king, "white") []; --theme-piece-set-bp: #piece(@pawn, "black") []; --theme-piece-set-bn: #piece(@knight, "black") []; --theme-piece-set-bb: #piece(@bishop, "black") []; --theme-piece-set-br: #piece(@rook, "black") []; --theme-piece-set-bq: #piece(@queen, "black") []; --theme-piece-set-bk: #piece(@king, "black") []; .board-popover-component { background-color: @surface0; } .piece { /* Black */ &.bp { background-image: #piece(@pawn, "black") [] !important; } &.bn { background-image: #piece(@knight, "black") [] !important; } &.bb { background-image: #piece(@bishop, "black") [] !important; } &.br { background-image: #piece(@rook, "black") [] !important; } &.bk { background-image: #piece(@king, "black") [] !important; } &.bq { background-image: #piece(@queen, "black") [] !important; } /* White */ &.wp { background-image: #piece(@pawn, "white") [] !important; } &.wn { background-image: #piece(@knight, "white") [] !important; } &.wb { background-image: #piece(@bishop, "white") [] !important; } &.wr { background-image: #piece(@rook, "white") [] !important; } &.wk { background-image: #piece(@king, "white") [] !important; } &.wq { background-image: #piece(@queen, "white") [] !important; } } .chessboard-pkg-move-list-component .dark-row { background-color: @surface1; } } } /* 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; }; } // vim:ft=less