163 lines
3.6 KiB
Plaintext
163 lines
3.6 KiB
Plaintext
/* ==UserStyle==
|
|
@name Hacker News Catppuccin
|
|
@namespace github.com/catppuccin/userstyles/styles/hacker-news
|
|
@homepageURL https://github.com/catppuccin/userstyles/tree/main/styles/hacker-news
|
|
@version 2026.08.16
|
|
@updateURL https://github.com/catppuccin/userstyles/raw/main/styles/hacker-news/catppuccin.user.less
|
|
@supportURL https://github.com/catppuccin/userstyles/issues?q=is%3Aopen+is%3Aissue+label%3Ahacker-news
|
|
@description Soothing pastel theme for Hacker News
|
|
@author Catppuccin
|
|
@license MIT
|
|
|
|
@preprocessor less
|
|
@var select lightFlavor "Light Flavor" ["latte:Latte*", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha"]
|
|
@var select darkFlavor "Dark Flavor" ["latte:Latte", "frappe:Frappé", "macchiato:Macchiato", "mocha:Mocha*"]
|
|
@var select accentColor "Accent" ["rosewater:Rosewater", "flamingo:Flamingo", "pink:Pink", "mauve:Mauve*", "red:Red", "maroon:Maroon", "peach:Peach", "yellow:Yellow", "green:Green", "teal:Teal", "blue:Blue", "sapphire:Sapphire", "sky:Sky", "lavender:Lavender", "subtext0:Gray"]
|
|
==/UserStyle== */
|
|
|
|
@import "https://userstyles.catppuccin.com/lib/std/v1.less";
|
|
|
|
@-moz-document domain("news.ycombinator.com") {
|
|
:root {
|
|
@media (prefers-color-scheme: light) {
|
|
#catppuccin(@lightFlavor);
|
|
}
|
|
@media (prefers-color-scheme: dark) {
|
|
#catppuccin(@darkFlavor);
|
|
}
|
|
}
|
|
|
|
#catppuccin(@flavor) {
|
|
#lib.palette();
|
|
#lib.defaults();
|
|
|
|
[bgcolor="#fafaf0"],
|
|
[bgcolor="#f6f6ef"] {
|
|
background-color: @base;
|
|
}
|
|
body {
|
|
background-color: @mantle;
|
|
color: @text;
|
|
}
|
|
|
|
td {
|
|
color: @text;
|
|
}
|
|
|
|
/* Header */
|
|
td[bgcolor="#ff6600"] {
|
|
background-color: @accent;
|
|
|
|
.pagetop,
|
|
.pagetop a {
|
|
color: @crust !important;
|
|
}
|
|
|
|
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="@{accent}"/><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;
|
|
}
|
|
|
|
[color="#ffffff"] {
|
|
color: @crust;
|
|
}
|
|
}
|
|
|
|
td[bgcolor="#ffffaa"] {
|
|
background-color: @yellow;
|
|
|
|
td {
|
|
color: @crust;
|
|
}
|
|
}
|
|
|
|
.subtext,
|
|
.comhead {
|
|
&,
|
|
a:link,
|
|
a:visited,
|
|
a:hover {
|
|
color: @overlay2 !important;
|
|
}
|
|
}
|
|
|
|
a:link {
|
|
color: @blue;
|
|
&:hover {
|
|
color: @sky;
|
|
}
|
|
}
|
|
.hnmore a:link,
|
|
a:visited {
|
|
color: @lavender;
|
|
}
|
|
|
|
[color="#3c963c"] {
|
|
color: @green;
|
|
}
|
|
|
|
/* Story points */
|
|
.score {
|
|
color: @subtext0;
|
|
}
|
|
|
|
/* Story ranking number */
|
|
.title {
|
|
color: @lavender;
|
|
}
|
|
|
|
/* Comment text */
|
|
.commtext {
|
|
color: @text;
|
|
}
|
|
|
|
/* Comment box */
|
|
input,
|
|
textarea,
|
|
select {
|
|
background-color: @mantle;
|
|
color: @text;
|
|
border-width: 1px;
|
|
border-style: solid;
|
|
border-color: @surface0;
|
|
border-radius: 2px;
|
|
}
|
|
|
|
input {
|
|
padding: 2px;
|
|
}
|
|
|
|
/* Poll questions */
|
|
td.comment > div > font {
|
|
color: @text;
|
|
}
|
|
|
|
/* Text post content */
|
|
.toptext {
|
|
color: @text;
|
|
}
|
|
|
|
.votearrow {
|
|
@svg: escape(
|
|
'<svg xmlns="http://www.w3.org/2000/svg" height="32" viewBox="0 0 32 16" width="32"><path d="M2 27 16-2l14 29z" fill="@{subtext0}"/></svg>'
|
|
);
|
|
background-image: url("data:image/svg+xml,@{svg}");
|
|
}
|
|
|
|
.yclinks {
|
|
color: @surface2;
|
|
}
|
|
|
|
b {
|
|
color: @text;
|
|
}
|
|
|
|
table[bgcolor="#ff6600"] {
|
|
background-color: @accent;
|
|
}
|
|
}
|
|
}
|