From 5aa468acc8a2811933e4ac22cfdfae488517407f Mon Sep 17 00:00:00 2001 From: nuexq <145666753+nuexq@users.noreply.github.com> Date: Wed, 12 Mar 2025 16:01:52 +0000 Subject: [PATCH] fix(pinterest): misc (#1581) * fix(pinterest): adding messing --color-background-box-info-weak variable * fix(pinterest): messing --color-text-formfield-default variable * fix(pinterest): --color-background-tabs base and hover variables * fix(pinterest): remove the @text style for pin hover icons * fix(pinterest): change --color-background-box-light from @mantle to @base * fix(pinterest): Pins icon bg color doesn't match icons color * refactor: update version * fix(pinterest): adding messing switch variables * fix(pinterest): adding messing checkbox variables * fix(pinterest): adding messing button-white variables * fix(pinterest): revert version number update * fix(pinterest): color-text-icon-(light/dark) fix light color icon begin white in latte theme * fix(pinterest): pins comments input right text color * fix(pinterest): drag-behavior-container color fix * fix(pinterest): fix color-text-(light/dark) & drop down menu * fix(pinterest): add `--color-background-button-selected-default` variable * fix(pinterest): fix react-button begin black & adding some messing variables i just invert(1) and did difference mix-blend-mode that's what best I can do to make it visible since the icon is actually a background-image of an svg so I can't change it's color * fix(pinterest): image-container bg match theme * fix(pinterest): remove custom created and saved button bg for profiles * fix(pinterest): adding background-button-semitransparentwhite variables * style(pinterest): better tabs hover color, @surface1 -> @surface0 * style(pinterest): change search box container line color * fix(pinterest): messages textarea white bg * fix(pinterest): checkbox border color * style(pinterest): disabled button better color * style(pinterest): backgroun-formfield-primary color change * fix(pinterest): @red as error color * fix(pinterest): adding semitransparentdefault variables * fix(pinterest): more-description-container bg gradient white fix * fix(pinterest): one-bar-pill text color * fix(pinterest): one-bar-navigation-arrows white color fix * fix(pinterest): one-bar-module-0 bg and icon colors * refactor(pintrest): transparent Co-authored-by: uncenter <47499684+uncenter@users.noreply.github.com> * refactor(pintrest): transparent Co-authored-by: uncenter <47499684+uncenter@users.noreply.github.com> * fix(pinterest): using attribute instead of classes for pin icons * style(pinterest): formfield primary color to base instead of faded surface * fix(pinterest): react-button icon fix * fix(pinterest): one-bar-pill (search categories) background color match theme * fix(pinterest): remove the lighting for latte colors * fix(pinterest): no border for suggestion icons * fix(pinterest): new UI search bar bg fix * fix(pinterest): icon colors for the new nav * refactor(pinterest): optimise SVGs * fix(pinterest): optimizing SVGs with svgo * fix(pinterest): fixing svg after I broke them * chore(pinterest) adding nuexq to collaborators and current-maintainers * fix(pinterest): more option button * fix(pinterest): notification clicked * fix(pinterest): messages button clicked fix * fix(pinterest): more option button clicked fix * fix(pinterest): active create-tab * fix(pinterest): active home-tab fix * fix(pinterest): catppuccin/no-redundant-parent-selector and declaration-block-no-duplicate-custom-properties * fix(pinterest): border-color: transparent instead of border: none * fix(pinterest): grey loading screen fix * fix(pinterest): adding messing variable `--color-background-box-info-base` * fix(pinterest): Explore nav icon fix * fix(pinterest): explore suggested-articles-link & shopping-spotlight-article fix * fix(pinterest): today article page header subtitle & title color * fix(pinterest): fixing top and bottom gradient for peek-variant * fix(pinterest): adding messing variables for button-shopping * fix(pinterest): border-color of divider in shopping pin * fix(pinterest): product-sticky-container gradient * fix(pinterest): product-sticky-container outline-box colors * fix(pinterest): gradient for top of product-sticky-container * fix(pinterest): resolve unread notification causing icon to lose style * fix(pinterest): pin discover bubble text visibility * fix(pinterest): length-zero-no-unit fix * fix(pinterest): notification/updates nav icon selector changes * fix(pinterest): svg unoptimized * fix(pinterest): run deno task lint:fix * fix(pinterest): change notification nav icon selectors because of the change * fix(pinterest): better selectors for loading screen * fix(pinterest): right way to use SVG's on nav icons * fix(pinterest): deno task lint:fix * fix(pinterest): new Notification icon selectors change they keep changing it --------- Co-authored-by: No0ne <145666753+No0ne003@users.noreply.github.com> Co-authored-by: uncenter <47499684+uncenter@users.noreply.github.com> --- scripts/userstyles.yml | 5 +- styles/pinterest/catppuccin.user.less | 317 +++++++++++++++++++++++--- 2 files changed, 290 insertions(+), 32 deletions(-) diff --git a/scripts/userstyles.yml b/scripts/userstyles.yml index ca76d23a..2a4edfae 100644 --- a/scripts/userstyles.yml +++ b/scripts/userstyles.yml @@ -161,6 +161,9 @@ collaborators: url: https://github.com/RaiderHCPlay - &pynappo url: https://github.com/pynappo + - &nuexq + name: nuexq + url: https://github.com/nuexq userstyles: advent-of-code: @@ -836,7 +839,7 @@ userstyles: color: red readme: app-link: https://www.pinterest.com - current-maintainers: [] + current-maintainers: [*nuexq] past-maintainers: [*jn-sena] planet-minecraft: name: Planet Minecraft diff --git a/styles/pinterest/catppuccin.user.less b/styles/pinterest/catppuccin.user.less index 792d52b6..809cffdb 100644 --- a/styles/pinterest/catppuccin.user.less +++ b/styles/pinterest/catppuccin.user.less @@ -69,22 +69,23 @@ } } - --color-text-light: if((@flavor = latte), @mantle, @text); - --color-text-dark: if((@flavor = latte), @text, @mantle); + --color-text-light: @mantle; + --color-text-dark: @text; --color-text-default: @text; --color-text-inverse: @mantle; --color-text-subtle: @subtext0; - --color-text-error: @accent; + --color-text-error: @red; --color-text-shopping: @accent; --color-text-link: @accent; + --color-text-formfield-default: @text; - --color-text-icon-light: if((@flavor = latte), @mantle, @subtext1); - --color-text-icon-dark: if((@flavor = latte), @subtext1, @mantle); + --color-text-icon-light: @subtext1; + --color-text-icon-dark: @mantle; --color-text-icon-default: @subtext0; --color-icon-subtle: @subtext1; --color-text-icon-inverse: @mantle; --color-text-icon-subtle: @subtext0; - --color-text-icon-error: @accent; + --color-text-icon-error: @red; --color-text-icon-brand-primary: @accent; --color-background-light: if((@flavor = latte), @mantle, @subtext1); @@ -98,29 +99,66 @@ --color-background-box-default: @mantle; --color-background-box-selected: @accent; --color-background-box-primary: @accent; - --color-background-box-secondary: @surface1; + --color-background-box-secondary: @surface0; + --color-background-box-info-base: @blue; + --color-background-box-info-weak: fade(@blue, 20%); --color-background-overlay: @surface0; - --color-background-popover-primary: @mantle; + --color-background-popover-primary: @base; --color-background-popover-secondary: @overlay2; --color-background-tag-primary-hover: @surface2; - --color-background-box-light: @mantle; + --color-background-box-light: @base; --color-background-button-secondary-default: @surface0; --color-background-button-secondary-hover: @surface1; --color-background-button-secondary-active: @surface2; + --color-background-button-selected-default: @subtext1; + --color-background-button-tertiary-hover: @surface0; + --color-background-button-shopping-default: @blue; + --color-background-button-shopping-hover: darken(@blue, 12%); --color-background-tag-primary-default: @surface1; - --color-background-button-disabled-default: darken(@mantle, 2%); - --color-background-formfield-primary: @surface0; + --color-background-button-disabled-default: @surface0; + --color-background-formfield-primary: @base; --color-background-avatar-placeholder: @mantle; + --color-background-tabs-default-base: @base; + --color-background-tabs-default-hover: @surface0; + --color-background-button-semitransparentwhite-default: fade(@base, 80%); + --color-background-button-semitransparentwhite-hover: @surface0; + --color-background-button-semitransparentdefault-default: fade(@surface1, 80%); + --color-background-button-semitransparentdefault-hover: @surface2; + --color-background-switch-default-selected: @accent; + --color-background-switch-default-unselected: @base; + --color-background-switch-hover-selected: @accent; + --color-background-switch-hover-unselected: @surface0; + --color-background-switch-pressed-selected: fade(@accent, 50%); + --color-background-switch-pressed-unselected: fade(@accent, 50%); + --color-background-checkbox-disabled: darken(@mantle, 2%); + --color-background-checkbox-checked-default: @accent; + --color-background-checkbox-checked-: @red; + --color-background-checkbox-unchecked-default: @base; + --color-background-checkbox-unchecked-: @red; --color-border-container: @surface1; --color-border-default: @mantle; --color-border-popover-primary: @surface0; --color-border-popover-secondary: @text; --color-border-focus: fade(@blue, 50%); + --color-border-switch-default-selected: @surface2; + --color-border-switch-default-unselected: @surface2; + --color-border-switch-focus-inner: @surface2; + --color-border-switch-focus-outer: @surface2; + --color-border-switch-hover-unselected: @surface2; + --color-border-switch-pressed-unselected: @surface2; + --color-border-checkbox-checked-default: @accent; + --color-border-checkbox-checked-: @red; + --color-border-checkbox-disabled: darken(@mantle, 2%); + --color-border-checkbox-unchecked-default: @surface1; + --color-border-checkbox-unchecked-: @red; + --color-border-checkbox-unchecked-hover: @surface2; + --color-border-checkbox-unchecked-pressed: fade(@accent, 50%); --color-text-success: @green; --color-text-warning: @yellow; + --color-icon-default: @subtext1; --color-icon-success: @green; --color-icon-warning: @yellow; - --color-icon-error: @red; + --color-icon-: @red; --color-icon-info: @blue; --color-icon-recommendation: @mauve; --color-icon-brand-primary: @accent; @@ -136,6 +174,8 @@ darken(@accent, 30%), 30% ); + --color-background-button-white-default: @base; + --color-background-button-white-hover: @surface0; --color-background-badge-warning: @yellow; --color-background-badge-success: @green; --color-background-education: @blue; @@ -166,6 +206,7 @@ --color-background-warning-base: @peach; --color-background-success-base: @green; + body { background-color: @base; color: @text; @@ -198,6 +239,10 @@ .NUb { color: var(--color-text-inverse); } + // loading screen + .mainContainer > div[style*="0.5"] { + background-color: @base !important; + } // Profile button // Invite collaborators buttons @@ -238,11 +283,6 @@ } } - // Pin hover icons (and other icons) - .Uvi.gUZ.U9O.kVc { - color: @text; - } - /* Header & Search */ div[data-test-id="header-Header"] div.P_h span.xnr { @@ -264,7 +304,7 @@ div[data-test-id="one-bar-pill"] { div { - color: var(--color-text-dark) !important; + color: @base !important; } .PLa { @@ -274,11 +314,51 @@ .R19 { color: var(--color-text-icon-dark) !important; } + + &[style*='background-color: rgb(215, 237, 255)'] { + background-color: @blue !important; + } + &[style*='background-color: rgb(218, 212, 255)'] { + background-color: @mauve !important; + } + &[style*='background-color: rgb(255, 226, 235)'] { + background-color: @pink !important; + } + &[style*='background-color: rgb(255, 228, 193)'] { + background-color: @maroon !important; + } + &[style*='background-color: rgb(255, 253, 146)'] { + background-color: @yellow !important; + } + &[style*='background-color: rgb(207, 255, 202)'] { + background-color: @green !important; + } + &[style*='background-color: rgb(218, 255, 246)'] { + background-color: @teal !important; + } + } + + div[data-test-id='one-bar-pill-cover-image-container'] { + border-color: transparent !important; + } + + div[data-test-id="one-bar-navigation-arrows"] { + background: linear-gradient(to left, @base, transparent 40px) !important; + } + + div[data-test-id="one-bar-module-0"] div[data-test-id="one-bar-pill"] { + background-color: var(--color-background-box-default) !important; + svg { + fill: var(--color-text-icon-subtle) !important; + } + &:has(.AR6) { + background-color: var(--color-background-box-secondary) !important; + } } div#searchBoxContainer { // search bar - div.Jea.fev.zI7.iyn.Hsu { + > div { background-color: @mantle !important; } @@ -291,7 +371,7 @@ } div.MMh._Y5.feh.s7I.zI7.iyn.Hsu { - background-color: @subtext1 !important; + background-color: @surface2 !important; } } @@ -314,11 +394,98 @@ background: none !important; } - /* Pins */ + /* Nav */ + nav#VerticalNavContent { + a[data-test-id="home-tab"] div[aria-label="Home"] { + &[style*="M11.3217 0.307444C11.7345 0.0407477"] { + @svg: escape(''); + background-image: url(~'data:image/svg+xml,@{svg}') !important; + } + &[style*="M21.6834 22H2.31659V7.61275"] { + @svg: escape(''); + background-image: url(~'data:image/svg+xml,@{svg}') !important; + } + } + + a[data-test-id="create-tab"] div[aria-label="Create"] { + &[style*="M19 3.5H5C4.17157 3.5"] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + &[style*="M12 4.75C12.6904 4.75"] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + } + + div[aria-label*="Notifications"] div[style*="background-image"], + div[aria-label="Updates"] div[aria-label*="Updates"] { + &[style*="M16.5 14.227"] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + &[style*="clip0_449_32470"] { + @svg: escape(''); + background-image: url(~"data:image/svg+xml,@{svg}") !important; + } + } + + div[data-test-id="notifications-button"] div[style*="background-image"] { + &[style*="clip0_800_18532"] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + &[style*="clip0_449_32468"] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + } + + div[data-test-id="vertical-nav-more-options-button"] div[aria-label="More options"] { + &[style*="clip0_449_32461"] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + &[style*="clip0_449_32472"] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + } + + a[data-test-id="today-tab"] div[aria-label="Explore"] { + &[style*="clip0_449_32453"] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + &[style*="clip0_449_32464"] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + } + } + + /* Pins */ + + // image container + [data-test-id^="closeup-image"] div div { + background-color: @mantle !important; + } + + // pin icons + button[data-test-id="feedback-button"], + div[data-test-id="share-icon-button"] { + div div { + background-color: @base; + &:hover { + background-color: @surface0; + } + } + } + // board name to save to // preview / dropdown - [data-test-id="PinBetterSaveDropdown"], + [data-test-id="PinBetterSaveDropdown"], div[data-test-id="boardSelectionDropdown"] { .B1n { color: var(--color-text-light); @@ -328,7 +495,7 @@ } // background when opened .G0a { - background-color: @mantle !important; + background-color: @subtext0 !important; } } @@ -424,7 +591,7 @@ } // buttons when hovered .TzN { - background-color: @surface2 !important; + background-color: @surface0 !important; } // pin notes textarea[id="PinNoteField"] { @@ -450,7 +617,15 @@ } } + // pin discover bubble + div[data-test-id="discover-bubble"] div div { + color: if(@flavor = latte, @base, @text) !important; + } + // comment bar + div[data-test-id='comment-editor-container'] { + color: @text !important; + } div[data-test-id="inline-comment-composer-container"] { border-color: @mantle !important; background: @mantle !important; @@ -466,6 +641,9 @@ div[data-test-id="more-description-container"], div[data-test-id="less-description-container"] { background-color: @base !important; + div:first-child { + background: linear-gradient(90deg, transparent 0%, @base 100%) !important; + } } div[data-test-id="truncated-text"] { @@ -508,12 +686,25 @@ color: @subtext1; caret-color: @text; } - div[data-test-id="react-button"] { .Jea.KS5.mQ8.zI7.iyn.Hsu { //background-color: @accent; color: @accent; } + div:hover { + background-color: @surface0 !important; + border-radius: var(--rounding-circle); + } + div div { + div[style*='background-image: url("https://s.pinimg.com/webapp/reactionHeartOutline-24ab75a6.svg")'] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + div[style*='background-image: url("https://s.pinimg.com/webapp/loveStatic-31fc2a99.svg")'] { + @svg: escape(''); + background-image: url("data:image/svg+xml,@{svg}") !important; + } + } } // remove "More to explore" bar @@ -576,11 +767,6 @@ background-color: @base; } - // "created" and "saved" button backgrounds on main profile page - .DUt.XiG._co._wN.hjq.zI7.iyn.Hsu { - background-color: @surface0 !important; - } - // Hide ugly block around section previews .imm[data-test-id^="section"] { background-color: transparent; @@ -589,7 +775,11 @@ /* Settings */ input[type="checkbox"] ~ div { - border-color: @crust !important; + border-color: var(--color-border-switch-default-unselected) !important; + } + + button[disabled=""] div { + color: @overlay0 !important; } div.tBJ.dyH.iFc.sAJ.xnr.tg7.IZT.swG { @@ -629,6 +819,10 @@ color: @subtext1; caret-color: @text !important; } + + textarea[data-gestalt-valid-html="TextArea"] { + background-color: transparent !important; + } div[data-test-id="add-pin-to-conversation"] { div[style="border: 1px solid rgb(218, 218, 218); box-shadow: rgba(0, 132, 255, 0) 0px 0px 0px 4px; padding: 4px 15px; min-height: 48px; width: 100%;"] { @@ -673,6 +867,14 @@ } } + div[data-test-id="drag-behavior-container"] { + background-color: @surface1 !important; + } + + div[data-test-id="drag-behavior-container"] div div { + border-color: @surface2 !important; + } + div[data-test-id="drag-behavior-container"] svg { color: @subtext1; } @@ -728,6 +930,26 @@ color: @text; } + /* Explore */ + + // articles + div[data-test-id="suggested-articles-link"], + div[data-test-id="shopping-spotlight-article"] { + div[data-test-id="hero-module-subtitle"] div, + div[data-test-id="hero-module-title"] h2, + div[data-test-id="hero-module-title"] h3 { + color: if(@flavor = latte, @base, @text) !important; + } + } + + // today article header + div[data-test-id="today-article-header"] { + div[data-test-id="today-article-subtitle"] div, + div[data-test-id="today-article-title"] h1 { + color: if(@flavor = latte, @base, @text) !important; + } + } + /* Login */ div[data-test-id="signup-default-modal"], @@ -839,6 +1061,39 @@ } } + // pin peek variant + div[data-test-id="peek-variant-shopping-module-container"] { + div[data-test-id="peek-variant-top-gradient"] { + background: linear-gradient(0deg, transparent 0%, @base 100%) !important; + } + + div[style*="background: linear-gradient"]:not([data-test-id="peek-variant-top-gradient"]) { + background: linear-gradient(transparent 0%, @base 100%) !important; + } + } + + // pin shopping + div[data-testid="product-metadata-details-flex"] { + div[style*='border-top'] { + border-color: @surface0 !important; + } + } + + div[id*="product-sticky-container"] div#imageContainerPerf { + div[style*="background-image"] { + &[style*="linear-gradient(rgb(255, 255, 255)"] { + background: linear-gradient(@base 0%, transparent 90%) !important; + } + &[style*="linear-gradient(rgba(255, 255, 255, 0)"] { + background: linear-gradient(transparent 0%, @base 90%) !important; + } + } + + div[data-test-id="outline-box"] { + box-shadow: @subtext1 0 0 0 2px inset, @base 0 0 0 4px inset !important; + } + } + // "more" buttom [aria-label="more"] { .NSs {