Skip to content

Commit c226c64

Browse files
barjinclaude
andcommitted
fix: add bottom spacing to the top-level @since tag
The "Added in" tag on top-level symbols (classes, interfaces, enums, type aliases) is followed by other sections, so without a bottom margin it sat flush against the next block. Add a `tsd-comment-since-root` modifier with a bottom margin for that case only; member tags close out a panel and are left untouched. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 51f1dc2 commit c226c64

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

src/components/Reflection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export function Reflection({ reflection }: ReflectionProps) {
3434
{hasComment(reflection.comment) && <Comment root comment={reflection.comment} />}
3535

3636
{sinceContent && (
37-
<div className="tsd-comment-since">
37+
<div className="tsd-comment-since tsd-comment-since-root">
3838
<Markdown content={displayPartsToMarkdown(sinceContent)} />
3939
</div>
4040
)}

src/components/styles.css

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,12 @@ html[data-theme='light'] .tsd-panel-content {
199199
border-top: 1px solid rgba(0, 0, 0, 0.05);
200200
}
201201

202+
/* Top-level symbols render the tag inline above other sections, so it needs a
203+
bottom margin to sit evenly; member tags close out a panel and don't. */
204+
.tsd-comment-since-root {
205+
margin-bottom: 1em;
206+
}
207+
202208
.tsd-comment-root {
203209
margin-top: 0;
204210
margin-bottom: var(--tsd-spacing-vertical-full);

0 commit comments

Comments
 (0)