52 lines (47 loc) · 3.87 KB
 1@use "../theme" as *;
 2@use "../vars" as v;
 3
 4.article-cover { width: 100%; margin-top: 0; margin-bottom: 1.25rem; overflow: hidden; border-radius: 0.5rem; }
 5.article-cover__img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; display: block; }
 6.article-cover + .article { padding-block-start: 0; }
 7
 8.article-header__sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
 9.article-meta { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; font-size: 0.8rem; color: theme(muted); margin-bottom: 0.75rem; }
10.article-meta__info { display: flex; align-items: center; gap: 0.5rem; }
11.article-meta__sep { opacity: 0.5; }
12.article-meta__translations { display: flex; align-items: center; gap: 0.5rem; }
13.article-meta__translations-label { opacity: 0.5; }
14.article-meta__lang { color: theme(accent); transition: opacity 0.15s ease; }
15.article-meta__lang:hover { opacity: 0.75; }
16.article-title { font-size: clamp(1.75rem, 5vw, 2.5rem); line-height: 1.2; }
17.article-desc { margin: 1rem 0 0; font-size: 1.1rem; color: theme(subtle); line-height: 1.6; }
18
19.article-body { display: flex; flex-direction: column; gap: 2rem; }
20
21.article-content { min-width: 0; line-height: 1.75; color: theme(text); }
22.article-content > :first-child { margin-top: 0; }
23.article-content > * { margin-top: 1.5rem; margin-bottom: 0; }
24.article-content p, .article-content ul, .article-content ol { margin-top: 1.25rem; }
25.article-content h2, .article-content h3, .article-content h4 { scroll-margin-top: calc(v.$header-height + 1.5rem); color: theme(heading); font-weight: 600; }
26.copied-toast { position: absolute; z-index: 200; pointer-events: none; white-space: nowrap; font-size: 0.65rem; font-family: "Silkscreen", monospace; color: theme(accent); background: theme(card); border: 2px solid theme(border); padding: 0.15rem 0.45rem; border-radius: 3px; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); animation: copied-toast 1.2s ease forwards; }
27@keyframes copied-toast {
28  0% { opacity: 0; transform: translate(-50%, -100%); }
29  15% { opacity: 1; transform: translate(-50%, -160%); }
30  70% { opacity: 1; transform: translate(-50%, -160%); }
31  100% { opacity: 0; transform: translate(-50%, -230%); }
32}
33@media (prefers-reduced-motion: reduce) { .copied-toast { animation: none; opacity: 1; transform: translate(-50%, -140%); } }
34.article-content :target, .article-content .is-flash { animation: target-flash 0.3s steps(1, end) 3; }
35@keyframes target-flash { 0%, 50% { color: theme(accent); } 51%, 100% { color: theme(heading); } }
36@media (prefers-reduced-motion: reduce) { .article-content :target { animation: none; } }
37.article-content h2 { font-size: 1.5rem; margin-top: 2rem; letter-spacing: -0.01em; }
38.article-content h3 { font-size: 1.17rem; margin-top: 1.5rem; }
39.article-content :is(h2, h3, h4) + * { margin-top: 0.5rem; }
40.article-content ul, .article-content ol { padding-inline-start: 1.5rem; }
41.article-content p a, .article-content li a { color: theme(accent); }
42.article-content p a:hover, .article-content li a:hover { @include dashed-underline; }
43.article-content h1 a, .article-content h2 a, .article-content h3 a, .article-content h4 a { color: inherit; }
44@media (hover: hover) { // avoid sticky :hover accent lingering on touch taps
45  .article-content h1 a:hover, .article-content h2 a:hover, .article-content h3 a:hover, .article-content h4 a:hover { color: theme(accent); }
46}
47.article-content blockquote { margin: 1.5rem 0; padding: 0 0 0 1rem; border-left: 2px solid color-mix(in srgb, theme(border) 60%, transparent); color: theme(subtle); font-style: italic; }
48.article-content img, .article-content video { border-radius: 0.5rem; margin: 1.5rem 0; max-width: 100%; height: auto; }
49
50.article-footer { margin-top: clamp(2rem, 5vw, 3rem); padding-top: 1.5rem; border-top: 1px solid var(--border-subtle); }
51.article-tags { margin-top: 1rem; }
52.article-header:has(.article-tags) { margin-bottom: 1rem; }