diff --git a/src/gh_comments.rs b/src/gh_comments.rs index 5e015922..35326f6d 100644 --- a/src/gh_comments.rs +++ b/src/gh_comments.rs @@ -29,7 +29,7 @@ use crate::{ utils::{immutable_headers, is_known_and_public_repo}, }; -pub const STYLE_URL: &str = "/gh-comments/style@0.0.7.css"; +pub const STYLE_URL: &str = "/gh-comments/style@0.0.8.css"; pub const MARKDOWN_URL: &str = "/gh-comments/github-markdown@20260117.css"; pub const SELF_CONTAINED_URL: &str = "/gh-comments/self_contained@0.0.2.js"; @@ -270,7 +270,7 @@ pub async fn gh_comments( write!( html, r###"
-

{title_html} {owner}/{repo}#{issue_id}

+

{title_html} {owner}/{repo}#{issue_id}

"###, )?; @@ -551,8 +551,8 @@ fn write_comment_as_html( {author_login} Avatar
- {author_login} - on {created_at} · hidden as {minimized_reason} + {author_login} + on {created_at} · hidden as {minimized_reason}
@@ -584,8 +584,8 @@ fn write_comment_as_html(
- {author_login} - on {created_at}{edited} + {author_login} + on {created_at}{edited}
@@ -593,8 +593,8 @@ fn write_comment_as_html( {author_login} Avatar
- {author_login} - on {created_at}{edited} + {author_login} + on {created_at}{edited}
@@ -672,8 +672,8 @@ fn write_review_as_html(
{badge_svg}
- {author_login} - {state_message} on {submitted_at} + {author_login} + {state_message} on {submitted_at}
@@ -803,8 +803,8 @@ fn write_review_thread_as_html( {author_login} Avatar - {author_login} - on {created_at}{edited} + {author_login} + on {created_at}{edited}
View on GitHub @@ -894,7 +894,7 @@ fn write_reaction_groups_as_html( write!( buffer, - r##"
{emoji}{total_count}
"## + r##""## )?; } diff --git a/src/gh_comments/style.css b/src/gh_comments/style.css index 08041862..0b000ffb 100644 --- a/src/gh_comments/style.css +++ b/src/gh_comments/style.css @@ -19,6 +19,8 @@ --fg-accent: #0969da; --border-default: #d0d7de; --toc-width: min(330px, 75vw); + --bgColor-success-muted: #46954a26; + --bgColor-danger-muted: #e5534b1a; } @media (prefers-color-scheme: dark) { @@ -65,7 +67,7 @@ body { margin-bottom: 0; } -.title bdi { +.title .markdown-body { font-size: 28px; font-weight: 600; display: inline-block; @@ -91,6 +93,10 @@ body { overflow: hidden; } +.comment:target, .review-thread:target { + box-shadow: 0 0 0 1px var(--fg-accent); +} + .review-thread { margin-left: 80px; margin-bottom: 1rem; @@ -105,6 +111,9 @@ body { padding: 8px 12px; font-size: 0.9em; color: var(--fg-muted); +} + +.review-thread-header { cursor: pointer; } @@ -117,13 +126,17 @@ details:not([open]) > .review-thread-header { padding: 16px; } +.review-thread-comment { + position: relative; + padding: 0.5rem 1rem; +} + .review-thread-comment:first-child { padding-top: 1rem; } -.review-thread-comment { - position: relative; - padding: 0.5rem 1rem; +.review-thread-comment:target { + box-shadow: inset 0 0 0 1px var(--fg-accent); } .review-header, .review-thread-comment-header { @@ -199,8 +212,7 @@ details:not([open]) > .review-thread-header { } .author-info a { - color: var(--fg-default); - font-weight: 600; + color: var(--fg-muted); text-decoration: none; } @@ -208,6 +220,11 @@ details:not([open]) > .review-thread-header { text-decoration: underline; } +.author-info .author-info-name { + color: var(--fg-default); + font-weight: 600; +} + .github-link { font-size: 0.85em; color: var(--fg-muted); @@ -223,6 +240,7 @@ details:not([open]) > .review-thread-header { display: flex; align-items: center; justify-content: center; + flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 50%; @@ -278,12 +296,14 @@ details:not([open]) > .review-thread-header { .reaction { border-radius: 100px; border: 0.00625rem solid var(--border-default); + background-color: transparent; padding: 5px 9px; font-size: 13px; } .reaction .reaction-number { margin-left: 0.35rem; + color: var(--fg-muted); } /* === Tab links === */ @@ -299,6 +319,7 @@ details:not([open]) > .review-thread-header { /* === Markdown overrides === */ .markdown-body { font-size: 14px; + overflow-wrap: anywhere; } .markdown-body .user-mention {