fix(hacker-news): use accent for brand, link & selection colors (#1295)

This commit is contained in:
thismoon authored and GitHub committed 2024-09-12 10:08:37 -04:00
1 parent 04f80d2f42
commit cf590e99c1
1 file changed
+16 -15
+16 -15
View File
@@ -2,7 +2,7 @@
@name Hacker News Catppuccin @name Hacker News Catppuccin
@namespace github.com/catppuccin/userstyles/styles/hacker-news @namespace github.com/catppuccin/userstyles/styles/hacker-news
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/hacker-news @homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/hacker-news
@version 1.0.2 @version 1.0.3
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/hacker-news/catppuccin.user.css @updateURL https://github.com/catppuccin/userstyles/raw/main/styles/hacker-news/catppuccin.user.css
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Ahacker-news @supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Ahacker-news
@description Soothing pastel theme for Hacker News @description Soothing pastel theme for Hacker News
@@ -17,10 +17,14 @@
@-moz-document domain("news.ycombinator.com") { @-moz-document domain("news.ycombinator.com") {
@media (prefers-color-scheme: light) { @media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor, @accentColor); :root {
#catppuccin(@lightFlavor, @accentColor);
}
} }
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor, @accentColor); :root {
#catppuccin(@darkFlavor, @accentColor);
}
} }
#catppuccin(@lookup, @accent) { #catppuccin(@lookup, @accent) {
@@ -52,8 +56,6 @@
@crust: @catppuccin[@@lookup][@crust]; @crust: @catppuccin[@@lookup][@crust];
@accent-color: @catppuccin[@@lookup][@@accent]; @accent-color: @catppuccin[@@lookup][@@accent];
@orange: mix(@peach, @yellow);
color-scheme: if(@lookup = latte, light, dark); color-scheme: if(@lookup = latte, light, dark);
::selection { ::selection {
@@ -82,7 +84,7 @@
/* Header */ /* Header */
td[bgcolor="#ff6600"] { td[bgcolor="#ff6600"] {
background-color: @orange; background-color: @accent-color;
.pagetop, .pagetop,
.pagetop a { .pagetop a {
@@ -91,7 +93,7 @@
img[src="y18.svg"] { img[src="y18.svg"] {
@svg: escape( @svg: escape(
'<svg height="18" viewBox="4 4 188 188" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M4 4h188v188H4z" fill="@{peach}"/><path d="M73.252 45.01 96 92.401l22.748-47.391h19.566l-34.324 64.487v41.493H88.01v-41.493L53.686 45.01z" fill="@{crust}"/></svg>' '<svg height="18" viewBox="4 4 188 188" width="18" xmlns="http://www.w3.org/2000/svg"><path d="M4 4h188v188H4z" fill="@{accent-color}"/><path d="M73.252 45.01 96 92.401l22.748-47.391h19.566l-34.324 64.487v41.493H88.01v-41.493L53.686 45.01z" fill="@{crust}"/></svg>'
); );
content: url("data:image/svg+xml,@{svg}"); content: url("data:image/svg+xml,@{svg}");
border-color: @crust !important; border-color: @crust !important;
@@ -114,13 +116,17 @@
.comhead { .comhead {
&, &,
a:link, a:link,
a:visited { a:visited,
color: @overlay2; a:hover {
color: @overlay2 !important;
} }
} }
a:link { a:link {
color: @blue; color: @blue;
&:hover {
color: @sky;
}
} }
.hnmore a:link, .hnmore a:link,
a:visited { a:visited {
@@ -146,11 +152,6 @@
color: @text; color: @text;
} }
/* Comment hyperlinks */
.commtext a:link {
color: @sapphire;
}
/* Comment box */ /* Comment box */
input, input,
textarea, textarea,
@@ -193,7 +194,7 @@
} }
table[bgcolor="#ff6600"] { table[bgcolor="#ff6600"] {
background-color: @orange; background-color: @accent-color;
} }
} }
} }