Skip to content

Commit 080145c

Browse files
committed
use the shared cursor tooltip for post descriptions on writing, and make tooltips a size larger
the writing page had its own tooltip style; it now matches the rest of the site, and the larger text keeps sentence-length descriptions readable.
1 parent 33a4e79 commit 080145c

2 files changed

Lines changed: 2 additions & 29 deletions

File tree

‎src/styles/styles.css‎

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -725,7 +725,7 @@ footer p:last-child {
725725
max-width: min(24rem, 78vw);
726726
color: var(--text-secondary);
727727
font-family: var(--font-ui);
728-
font-size: var(--fs-xsmall);
728+
font-size: var(--fs-small);
729729
line-height: 1.4;
730730
pointer-events: none;
731731
opacity: 0;
@@ -792,33 +792,6 @@ footer p:last-child {
792792
margin-left: 0.15em;
793793
}
794794

795-
.post-link {
796-
position: relative;
797-
}
798-
799-
.post-link[data-description]:hover::after {
800-
position: absolute;
801-
top: 100%;
802-
left: 0;
803-
margin-top: 0.25rem;
804-
z-index: 1;
805-
width: max-content;
806-
max-width: 280px;
807-
background: var(--bg);
808-
padding: 0.4rem 0.5rem;
809-
border: 1px solid var(--border-light);
810-
border-radius: var(--radius-large);
811-
color: var(--text-secondary);
812-
font-size: var(--fs-small);
813-
line-height: 1.35;
814-
text-align: left;
815-
pointer-events: none;
816-
}
817-
818-
.post-link[data-description]:hover::after {
819-
content: attr(data-description);
820-
}
821-
822795
.post-date {
823796
white-space: nowrap;
824797
color: var(--text-secondary);

‎src/writing/index.njk‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ eleventyComputed:
2626
{%- set currentYear = postYear %}
2727
{%- endif %}
2828
<li class="post-item" data-category="{{ post.data.category }}">
29-
<a href="{{ post.url }}" class="post-link" data-description="{{ post.data.description | escape }}">{{ post.data.title }}</a>{% if post.data.featured %}<span class="favorite">*</span>{% endif %}{% if post.data.project %}<span class="project-marker">^</span>{% endif %}
29+
<a href="{{ post.url }}" class="post-link" data-tip="{{ post.data.description | escape }}">{{ post.data.title }}</a>{% if post.data.featured %}<span class="favorite">*</span>{% endif %}{% if post.data.project %}<span class="project-marker">^</span>{% endif %}
3030
<span class="dot-leader"></span>
3131
<time class="post-date" datetime="{{ post.date | dateFormat }}">{{ post.date | monthName }}</time>
3232
</li>

0 commit comments

Comments
 (0)