Skip to content

Commit

Permalink
fix(hacker-news): use accent for brand, link & selection colors (#1295)
Browse files Browse the repository at this point in the history
  • Loading branch information
thismoon authored Sep 12, 2024
1 parent 04f80d2 commit cf590e9
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions styles/hacker-news/catppuccin.user.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
@name Hacker News Catppuccin
@namespace github.com/catppuccin/userstyles/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
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Ahacker-news
@description Soothing pastel theme for Hacker News
Expand All @@ -17,10 +17,14 @@

@-moz-document domain("news.ycombinator.com") {
@media (prefers-color-scheme: light) {
#catppuccin(@lightFlavor, @accentColor);
:root {
#catppuccin(@lightFlavor, @accentColor);
}
}
@media (prefers-color-scheme: dark) {
#catppuccin(@darkFlavor, @accentColor);
:root {
#catppuccin(@darkFlavor, @accentColor);
}
}

#catppuccin(@lookup, @accent) {
Expand Down Expand Up @@ -52,8 +56,6 @@
@crust: @catppuccin[@@lookup][@crust];
@accent-color: @catppuccin[@@lookup][@@accent];

@orange: mix(@peach, @yellow);

color-scheme: if(@lookup = latte, light, dark);

::selection {
Expand Down Expand Up @@ -82,7 +84,7 @@

/* Header */
td[bgcolor="#ff6600"] {
background-color: @orange;
background-color: @accent-color;

.pagetop,
.pagetop a {
Expand All @@ -91,7 +93,7 @@

img[src="y18.svg"] {
@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}");
border-color: @crust !important;
Expand All @@ -114,13 +116,17 @@
.comhead {
&,
a:link,
a:visited {
color: @overlay2;
a:visited,
a:hover {
color: @overlay2 !important;
}
}

a:link {
color: @blue;
&:hover {
color: @sky;
}
}
.hnmore a:link,
a:visited {
Expand All @@ -146,11 +152,6 @@
color: @text;
}

/* Comment hyperlinks */
.commtext a:link {
color: @sapphire;
}

/* Comment box */
input,
textarea,
Expand Down Expand Up @@ -193,7 +194,7 @@
}

table[bgcolor="#ff6600"] {
background-color: @orange;
background-color: @accent-color;
}
}
}
Expand Down

0 comments on commit cf590e9

Please sign in to comment.