refactor(substack): rewrite (#1325)

This commit is contained in:
uncenter authored and GitHub committed 2024-09-21 16:38:33 -04:00
1 parent 9d5f2ea5db
commit 0acf224cde
1 file changed
+108 -84
+108 -84
View File
@@ -2,7 +2,7 @@
@name Substack Catppuccin @name Substack Catppuccin
@namespace github.com/catppuccin/userstyles/styles/substack @namespace github.com/catppuccin/userstyles/styles/substack
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/substack @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/substack
@version 0.1.2 @version 0.2.0
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/substack/catppuccin.user.css @updateURL https://github.com/catppuccin/userstyles/raw/main/styles/substack/catppuccin.user.css
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Asubstack @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Asubstack
@description Soothing pastel theme for Substack @description Soothing pastel theme for Substack
@@ -69,115 +69,139 @@
} }
} }
color: @text;
background-color: @base !important; background-color: @base !important;
&, &,
.dark-mode { .dark-mode,
--color-primary: @text; .dark-theme,
--color-secondary: @subtext0; [class*="_pubTheme_"] {
--color-bg-primary: @base; --color-bg-primary: @base;
--color-bg-primary-rgb: #rgbify(@base) []; --color-bg-primary-rgb: #rgbify(@base) [];
--web_bg_color: @base; --color-bg-primary-raw: #rgbify(@base) [];
--color-bg-primary-hover: mix(@surface0, @base, 50%); --color-bg-primary-hover: @surface0;
--color-bg-secondary: @mantle; --color-bg-secondary: @surface0;
--color-bg-tertiary: @crust; --color-bg-tertiary: @surface1;
--color-dark-bg-tertiary: @crust; --color-bg-elevated-primary: @mantle;
--color-dark-primary: @text; --color-bg-elevated-secondary: @crust;
--color-bg-elevated: @surface0; --color-fg-primary: @text;
--color-bg-elevated-hover: mix(@surface1, @surface0, 50%); --color-fg-secondary: @subtext1;
--color-fg-tertiary: @subtext0;
--color-utility-detail: @surface1;
--color-utility-white: @text;
--color-detail-themed: @surface1;
--color-accent-themed: @accent-color; --color-accent-themed: @accent-color;
--color-bg-secondary-opacity: @surface0;
--color-bg-secondary-themed: @surface0;
--color-accent-inverse-themed: @crust;
--color-light-bg-primary: @crust;
--color-accent-primary: @accent-color;
--color-accent-substack: @accent-color;
--color-accent-blue: @blue;
--color-accent-red: @red;
--color-accent-purple: @mauve;
--color-accent-facebook: @blue;
--color-accent-error: @red;
--color-detail: @surface1;
--color-dark-bg-primary: @mantle;
// subdomains --color-accent-fg-red: @red;
--print_on_web_bg_color: @text; --color-accent-bg-red: fade(@red, 20%);
--color-secondary-themed: @subtext0; --color-semantic-error-bg-primary: @red;
--print_secondary_on_web_bg_color: @subtext0; --color-semantic-error-utility-contrast: @crust;
--background_pop: @peach;
--print_pop: @peach; --color-accent-fg-orange: @accent-color;
--color-accent-bg-orange: fade(@accent-color, 20%);
--color-accent-fg-green: @green;
--color-accent-bg-green: fade(@green, 20%);
--color-accent-fg-cyan: @blue;
--color-accent-bg-cyan: fade(@blue, 20%);
/* Buttons */
--color-button-primary-bg: @accent-color;
--color-button-primary-bg-hover: darken(@accent-color, 5%);
--color-button-primary-fg: @crust;
--color-button-secondary-bg: @surface0;
--color-button-secondary-bg-hover: @surface1;
--color-button-secondary-fg: @text;
--color-button-tertiary-bg-hover: @surface1;
--color-button-tertiary-fg: @text;
--color-button-mono-bg: @text;
--color-button-mono-bg-hover: @subtext1;
--color-button-mono-fg: @crust;
--color-button-disabled-fg: @subtext0;
/* Tooltips & Toasts */
--color-bg-tooltip: @mantle;
--material-thick: @mantle;
--print_pop: @accent-color;
--print_secondary: @subtext1;
--background_pop: @accent-color;
--print_on_pop: @crust; --print_on_pop: @crust;
--print_secondary: @subtext0; --color_theme_bg_pop: @accent-color;
--color-tertiary: @crust; --color_theme_bg_pop_darken: darken(@accent-color, 5%);
--background_contrast_1: @crust;
--background_contrast_2: mix(@crust, @mantle, 50%);
--background_contrast_3: @mantle;
--background_contrast_4: mix(@mantle, @base, 33%);
--background_contrast_5: mix(@mantle, @base, 66%);
--color_theme_bg_contrast_1: unset;
--color_theme_bg_contrast_2: mix(@surface0, @surface1, 50%);
--color_theme_bg_contrast_3: @surface1;
--color_theme_bg_contrast_4: mix(@surface1, @surface2, 50%);
--color_theme_bg_contrast_5: @surface2;
--input_background: @surface0;
// used for podcast play controls
--color_theme_bg_pop_rgb: #rgbify(@accent-color) [];
--color_theme_print_on_pop: @crust; --color_theme_print_on_pop: @crust;
--border_subtle: @surface1;
--background_contrast_1: @mantle;
--background_contrast_2: @surface2;
--color-chat-other-fg-secondary: @subtext1;
--color-semantic-select-fg-primary: @accent-color;
--color-semantic-select-utility-detail: fade(@accent-color, 20%);
--color-semantic-highlight-fg-primary: @accent-color;
/* Weird variables issue fixes */
--color-light-bg-primary: @crust;
--color-dark-bg-secondary: @surface0;
--color-dark-bg-tertiary: @base;
} }
// brand colors in SVGs /* Substack logos */
// Substack orange [fill="#ff6719" i] {
*[stroke="#ff6719"], fill: @accent-color !important;
*[stroke="#FF6719"] {
stroke: @peach !important;
} }
*[fill="#ff6719"], /* Inverted logo colors */
*[fill="#FF6719"] { [fill="#FFFFFF" i] {
fill: @peach !important; fill: @crust !important;
} }
.footer-wrap .footer .footer-substack-cta { /* Footer */
background-color: @base; .footer-wrap .footer {
background-color: @mantle;
}
.subscribe-footer .button.primary {
border-color: @crust;
} }
.reader-nav-top.pinned { /* Onboarding and profile */
background-color: rgba(#rgbify(@base) [], 85%);
backdrop-filter: var(--glass);
}
// toggle switches .onboarding-profile-page {
.tailwind-preflight button span { .accept-tos * {
background-color: @base !important; color: @subtext1;
} }
// restack quote popup .skip-button {
div[class*="frontend-components-selection_popover-module"] { color: @text;
* {
color: @text !important;
background: @base !important;
border-color: @surface0 !important;
stroke: @text !important;
} }
} }
// top navbar user button .profile-page .set-up-profile-button {
.button.user-indicator { color: @crust;
background: var(--color-bg-secondary-themed) !important; }
.edit-profile-page .publication-section .all-toggle {
color: @subtext1;
} }
// comment boxes /* Misc inputs */
.comment-input-wrap form.comment-input .comment-input-right textarea { button[role="switch"],
overflow-y: auto !important; input[type="radio"] + span {
--color-utility-white: @surface0;
} }
::-webkit-scrollbar { input[type="text"],
background: @mantle; select {
width: 0.25rem; background-color: @mantle;
color: @text;
} }
::-webkit-scrollbar-thumb {
background: @accent-color; /* Dashboard analytics icons */
border-radius: 9999px; [stroke="#888888"] {
stroke: @subtext1 !important;
} }
} }
} }