Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/gh_comments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ use crate::{
};

pub const STYLE_URL: &str = "/gh-comments/style@0.0.10.css";
pub const MARKDOWN_URL: &str = "/gh-comments/github-markdown@20260117.css";
pub const MARKDOWN_URL: &str = "/gh-comments/github-markdown@20260615.css";
pub const SELF_CONTAINED_URL: &str = "/gh-comments/self_contained@0.0.3.js";
pub const RELATIVE_TIME_ELEMENT_URL: &str = "/gh-comments/relative-time-element@5.0.0.js";

Expand Down
33 changes: 32 additions & 1 deletion src/gh_comments/github-markdown@20260117.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
--h6-size: 0.75rem;
--fgColor-onEmphasis: LinkText;
--fgColor-accent: Highlight;
--perceived-lightness: calc(((var(--label-r) * .2126) + (var(--label-g) * .7152) + (var(--label-b) * .0722)) / 255);
--lightness-switch: max(0, min(calc((1/(var(--lightness-threshold) - var(--perceived-lightness)))), 1));
}
@media (prefers-color-scheme: dark) {
.markdown-body, [data-theme="dark"] {
Expand Down Expand Up @@ -120,6 +122,9 @@
--button-default-fgColor-rest: var(--control-fgColor-rest);
--button-default-borderColor-active: var(--button-default-borderColor-rest);
--button-default-borderColor-hover: var(--button-default-borderColor-rest);
--lightness-threshold: .6;
--background-alpha: .18;
--border-alpha: .3;
}
}
@media (prefers-color-scheme: light) {
Expand Down Expand Up @@ -204,6 +209,9 @@
--diffBlob-deletionNum-fgColor: var(--fgColor-default);
--diffBlob-deletionWord-fgColor: var(--fgColor-default);
--button-default-borderColor-hover: var(--button-default-borderColor-rest);
--lightness-threshold: .453;
--border-threshold: .96;
--border-alpha: max(0, min(calc((var(--perceived-lightness) - var(--border-threshold)) * 100), 1));
}
}

Expand Down Expand Up @@ -262,7 +270,8 @@
.markdown-body a {
background-color: rgba(0,0,0,0);
color: var(--fgColor-accent);
text-decoration: none;
text-underline-offset: .2rem;
text-decoration: underline;
}

.markdown-body abbr[title] {
Expand Down Expand Up @@ -2214,3 +2223,25 @@
min-height: 52px;
}

.markdown-body .hx_IssueLabel {
color: hsl(0deg, 0%, calc(var(--lightness-switch) * 100%));
background: rgb(var(--label-r), var(--label-g), var(--label-b));
border-color: hsla(var(--label-h), calc(var(--label-s) * 1%), calc((var(--label-l) - 25) * 1%), var(--border-alpha));
}

.markdown-body .Label--inline {
padding: .12em .5em;
font-size: 85%;
display: inline;
}

.markdown-body .IssueLabel {
font-size: 12px;
font-weight: var(--base-text-weight-medium,500);
white-space: nowrap;
border: 1px solid #0000;
border-radius: 2em;
padding: 0 7px;
line-height: 18px;
display: inline-block;
}