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
5 changes: 4 additions & 1 deletion src/components/base/Link.astro
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,11 @@ const relValue = relTokens.length > 0 ? relTokens.join(" ") : undefined
<style>
[data-link] {
color: inherit;
cursor: pointer;
transition:
color var(--motion-duration-fast) var(--motion-ease),
text-decoration-color var(--motion-duration) var(--motion-ease);
text-decoration-color var(--motion-duration) var(--motion-ease),
background-size var(--motion-duration) var(--motion-ease);
}

@media (hover: hover) and (pointer: fine) {
Expand All @@ -63,6 +65,7 @@ const relValue = relTokens.length > 0 ? relTokens.join(" ") : undefined
native text decoration wraps cleanly and only needs a color transition. */
[data-link][data-underline] {
--underline: var(--muted-foreground);
--underline-wipe: currentColor;
text-decoration-skip-ink: auto;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/publications/PubCard.astro
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const hiddenAuthorsId = `publication-${slugify(pub.title)}-${pub.year ?? "unknow
<CardHeader>
{pub.award && <span class="publication-award">🏆 {pub.award}</span>}
{pub.mainUrl ? (
<Link href={pub.mainUrl} external class="card-title-link">
<Link href={pub.mainUrl} external underline class="card-title-link">
<CardTitle>{pub.title}</CardTitle>
</Link>
) : (
Expand Down
7 changes: 3 additions & 4 deletions src/components/timeline/TimelineItem.astro
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const hasDate = Astro.slots.has("date")

<li class:list={["timeline-item", className]}>
<div class="timeline-marker" aria-hidden="true">
<div class="timeline-dot"></div>
<div class="timeline-line"></div>
<div class="timeline-dot"></div>
</div>
<div class="timeline-content">
{hasDate && (
Expand Down Expand Up @@ -38,8 +38,6 @@ const hasDate = Astro.slots.has("date")
}

.timeline-dot {
position: relative;
z-index: 1;
inline-size: 0.5rem;
block-size: 0.5rem;
margin-block-start: 0.35rem;
Expand All @@ -50,9 +48,10 @@ const hasDate = Astro.slots.has("date")

.timeline-line {
position: absolute;
inset-block: 1rem 0;
inset-block: 0.5rem 0;
inset-inline-start: 50%;
border-inline-start: 2px dashed var(--muted);
transform: translateX(-50%);
}

.timeline-item:last-child .timeline-line {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/publications/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ function truncateAuthors(
// Early return if no truncation needed
if (totalAuthors <= maxFirst || totalAuthors <= maxFirst + maxLast) {
return {
displayFirstAuthors: authors.join(", ") + (totalAuthors > 0 ? "," : ""),
displayFirstAuthors: authors.join(", "),
hasMore: false,
hiddenCount: 0,
hiddenAuthors: "",
Expand Down
20 changes: 7 additions & 13 deletions src/styles/card.css
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,8 @@
var(--celestial-surface) 58%,
color-mix(in oklab, var(--accent) 5%, transparent)
);
box-shadow:
0 0 0 1px color-mix(in oklab, var(--primary) 10%, transparent),
0 1rem 3rem -1.5rem color-mix(in oklab, var(--primary) 24%, transparent);
box-shadow: 0 1rem 3rem -1.5rem
color-mix(in oklab, var(--primary) 24%, transparent);
}

.card-overlay {
Expand Down Expand Up @@ -256,21 +255,16 @@
}

@media (hover: hover) and (pointer: fine) {
[data-slot="card"]:hover::before {
[data-slot="card"][data-clickable]:hover::before {
opacity: 1;
animation: card-border-flow 2.4s linear infinite;
}

[data-slot="card"]:hover {
border-color: color-mix(in oklab, var(--border) 82%, transparent);
}

[data-slot="card"][data-clickable]:hover {
border-color: color-mix(in oklab, var(--primary) 34%, transparent);
border-color: transparent;
background-color: color-mix(in oklab, var(--muted) 52%, transparent);
box-shadow:
0 0 0 1px color-mix(in oklab, var(--primary) 6%, transparent),
0 0.75rem 2rem -1.25rem color-mix(in oklab, var(--ring) 24%, transparent);
box-shadow: 0 0.75rem 2rem -1.25rem
color-mix(in oklab, var(--ring) 24%, transparent);
}

[data-slot="card"][data-clickable]:hover [data-slot="card-title"] {
Expand All @@ -295,7 +289,7 @@
transition-duration: 0.01ms;
}

[data-slot="card"]:hover::before {
[data-slot="card"][data-clickable]:hover::before {
animation: none;
background-position: 50% 0;
}
Expand Down
7 changes: 0 additions & 7 deletions src/styles/typography-inline.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
prose-content {
a {
--underline: var(--muted-foreground);
--underline-wipe: currentColor;

color: var(--foreground);
}

:is(strong, b) {
color: var(--foreground);
font-weight: var(--font-weight-medium);
Expand Down
41 changes: 41 additions & 0 deletions src/styles/typography.css
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ body {
}

a {
cursor: pointer;
text-decoration: underline;
text-decoration-color: var(--underline, transparent);
text-decoration-thickness: max(1px, 0.0625em);
Expand Down Expand Up @@ -126,3 +127,43 @@ prose-content {
color: var(--prose-foreground);
}
}

/* Text links share one readable default, accent hover/focus treatment, and
explicit active/visited states. Button-, badge-, and chip-shaped links keep
their component-specific decoration and colors. */
prose-content a,
a[data-link][data-underline] {
--underline: var(--muted-foreground);
--underline-wipe: currentColor;
color: var(--foreground);
text-decoration-line: underline;
}

prose-content a:visited,
a[data-link][data-underline]:visited {
color: var(--foreground);
}

prose-content a:is(:hover, :focus-visible),
a[data-link][data-underline]:is(:hover, :focus-visible) {
color: var(--accent);
text-decoration-line: none;
text-decoration-color: currentColor;
}

prose-content a:active,
a[data-link][data-underline]:active {
color: var(--foreground);
}

@media (prefers-reduced-motion: reduce) {
prose-content a,
a[data-link][data-underline] {
text-decoration-line: underline;
}

prose-content a:is(:hover, :focus-visible),
a[data-link][data-underline]:is(:hover, :focus-visible) {
text-decoration-line: underline;
}
}
Loading