From 1d787df627cda43ebd46053de6fdcb48da5e7d6f Mon Sep 17 00:00:00 2001 From: Gen Date: Fri, 29 Mar 2024 11:44:43 -0700 Subject: [PATCH] fix(instagram): specificity & story-related color changes (#730) --- styles/instagram/catppuccin.user.css | 163 ++++++++++++++++----------- 1 file changed, 100 insertions(+), 63 deletions(-) diff --git a/styles/instagram/catppuccin.user.css b/styles/instagram/catppuccin.user.css index fb227319..b582f3e5 100644 --- a/styles/instagram/catppuccin.user.css +++ b/styles/instagram/catppuccin.user.css @@ -57,55 +57,66 @@ @dark-color: if(@lookup = latte, @text, @crust); @light-color: if(@lookup = latte, @crust, @text); - --web-always-black: #rgbify(@dark-color) []; - --web-always-white: #rgbify(@light-color) []; - --always-white: #rgbify(@light-color) []; - --overlay-alpha-80: fadeout(@dark-color, 50); - --always-dark-overlay: fadeout(@surface0, 50); - --grey-9: #rgbify(@text) []; - --ig-primary-background: #rgbify(@base) []; - --ig-secondary-background: #rgbify(@surface0) []; - --ig-banner-background: #rgbify(@crust) []; - --ig-highlight-background: #rgbify(@surface0) []; - --ig-elevated-background: #rgbify(@crust) []; - --ig-elevated-highlight-background: #rgbify(@surface0) []; - --ig-hover-overlay: #rgbify(@text) [], 0.1; - --hover-overlay: fadeout(@surface0, 80); - --ig-text-on-color: #rgbify(@crust) []; - --ig-badge: #rgbify(@accent-color) []; - --ig-primary-button: #rgbify(@accent-color) []; - --ig-primary-button-hover: fadeout(@accent-color, 20); - --ig-secondary-button-background: #rgbify(@surface0) []; - --ig-secondary-button-hover: #rgbify(@surface1) []; - --ig-secondary-button: #rgbify(@text) []; - --ig-primary-text: #rgbify(@text) []; - --ig-secondary-text: #rgbify(@subtext0) []; - --ig-tertiary-text: #rgbify(@subtext0) []; - --wbloks-primary-text: @text; - --ig-text-on-media: #rgbify(@text) []; - --ig-separator: #rgbify(@surface0) []; - --chat-admin-text-color: #rgbify (@subtext0) []; - --ig-elevated-separator: #rgbify(@surface0) []; - --post-separator: #rgbify(@overlay0) []; - --ig-stroke: #rgbify(@overlay0) []; - --grey-2: #rgbify(@overlay0) []; - --ig-link: #rgbify(@accent-color) []; - --ig-error-or-destructive: #rgbify(@maroon) []; - --ig-success: #rgbify(@green) []; - --blue-2: #rgbify(@blue) []; - --ig-close-friends-refreshed: #rgbify(@green) []; - --ig-text-input-border-hover-prism: #rgbify(@surface1) []; - scrollbar-color: @accent-color @crust; - - //placehoder textcolor - .xh8yej3 { - color: @subtext0 !important; + &, + .x1qjc9v5, + .x9f619, + .x78zum5, + .xdt5ytf, + .x1iyjqo2, + .xl56j7k { + --web-always-black: #rgbify(@dark-color) []; + --web-always-white: #rgbify(@light-color) []; + --always-white: #rgbify(@light-color) []; + --overlay-alpha-80: fadeout(@dark-color, 50); + --always-dark-overlay: fadeout(@surface0, 50); + --grey-9: #rgbify(@crust) []; + --ig-primary-background: #rgbify(@base) []; + --ig-secondary-background: #rgbify(@surface0) []; + --ig-banner-background: #rgbify(@crust) []; + --ig-highlight-background: #rgbify(@surface0) []; + --ig-elevated-background: #rgbify(@crust) []; + --ig-elevated-highlight-background: #rgbify(@surface0) []; + --ig-hover-overlay: #rgbify(@text) [], 0.1; + --hover-overlay: fadeout(@surface0, 80); + --ig-text-on-color: #rgbify(@crust) []; + --ig-badge: #rgbify(@accent-color) []; + --ig-primary-button: #rgbify(@accent-color) []; + --ig-primary-button-hover: fadeout(@accent-color, 20); + --ig-secondary-button-background: #rgbify(@surface0) []; + --ig-secondary-button-hover: #rgbify(@surface1) []; + --ig-secondary-button: #rgbify(@text) []; + --ig-primary-text: #rgbify(@text) []; + --ig-secondary-text: #rgbify(@subtext0) []; + --ig-tertiary-text: #rgbify(@subtext0) []; + --wbloks-primary-text: @text; + --ig-text-on-media: #rgbify(@text) []; + --ig-separator: #rgbify(@surface0) []; + --chat-admin-text-color: #rgbify (@subtext0) []; + --ig-elevated-separator: #rgbify(@surface0) []; + --post-separator: #rgbify(@overlay0) []; + --ig-stroke: #rgbify(@overlay0) []; + --grey-2: #rgbify(@overlay0) []; + --ig-link: #rgbify(@accent-color) []; + --ig-error-or-destructive: #rgbify(@maroon) []; + --ig-success: #rgbify(@green) []; + --blue-2: #rgbify(@blue) []; + --ig-close-friends-refreshed: #rgbify(@green) []; + --ig-text-input-border-hover-prism: #rgbify(@surface1) []; + --ig-toggle-outline-prism: #rgbify(@text) []; + --ig-toggle-background-on-prism: #rgbify(@text) []; + --ig-stroke-prism: #rgbify(@crust) []; + scrollbar-color: @accent-color @crust; } - // Text selection - *::selection { + + #splash-screen { + background-color: @base !important; + } + + ::selection { color: @dark-color; background-color: @accent-color; } + /* Sidebar */ .x1xgvd2v { background-color: @crust !important; @@ -120,7 +131,12 @@ stroke: @text; } - /* story progress bar */ + /* Story background */ + .x5qyhuo { + background-color: @base; + } + + /* Story progress bar */ ._ac3p { background-color: @accent-color !important; } @@ -137,7 +153,7 @@ } &[aria-label^="Story by"][aria-label$="not seen"] span { - outline-color: @mauve; + outline-color: @accent-color; outline-width: 0.2rem; } &[aria-label^="Story by"]:not([aria-label$="not seen"]) span { @@ -161,17 +177,11 @@ } /* Icons */ - svg { - color: @text; - fill: @text; - } svg[aria-label="Unlike"] { fill: @accent-color; } - - /* The close icon on the dark wrapper */ svg[aria-label="Close"] { - color: var(--web-always-white); + color: @text; } svg[aria-label="Verified"] { fill: @accent-color; @@ -179,10 +189,11 @@ /* Share box */ .xzloghq { - background-color: @blue; + background-color: @surface0; + color: @text !important; &:hover { - color: @mantle; - background-color: @accent-color; + color: @mantle !important; + background-color: @accent-color !important; } } .xk5f4mz { @@ -209,7 +220,7 @@ background-color: @overlay1; } .x1psfjxj { - background-color: @text; + background-color: @mantle; } span[data-bloks-name="bk.components.TextSpan"] { color: @accent-color !important; @@ -512,6 +523,28 @@ @mauve 60%, @blue 90% ); + /* Instagram text logo */ + [style*="background-image: url(\"https://static.cdninstagram.com/rsrc.php/v3/yU/r/H5Bq7ru-y9E.png\");"] + { + @svg: escape( + '' + ); + background-image: url("data:image/svg+xml,@{svg}") !important; + background-position: -3px -7px !important; + background-size: unset !important; + } + /* 2fa lock icon */ + [aria-label="Two factor authentication lock icon"] { + @svg: escape( + '' + ); + background: url("data:image/svg+xml,@{svg}") no-repeat !important; + height: 0 !important; + width: 0 !important; + padding-left: 76px !important; + padding-top: 76px !important; + background-size: unset !important; + } /* "All caught up" icon */ img[src="/images/instagram/xig/web/illo-confirm-refresh-light.png"] { @svg: escape( @@ -563,7 +596,7 @@ ._acas:not(._acao) { &, svg { - color: @crust !important; + color: @crust; fill: @mantle; } } @@ -598,10 +631,10 @@ } /* Input placeholders */ - ._ac4d::placeholder, - ._aauy::placeholder, - textarea::placeholder { - color: @subtext0; + input, textarea { + &::placeholder { + color: @subtext0 !important; + } } /* Settings */ @@ -614,6 +647,10 @@ ._aav4 { background-color: @crust; } + /* Settings saved toast */ + ._abmp { + color: @text; + } /* Bloks */ .wbloks_1[data-bloks-name="bk.components.Collection"] {