-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyles.css
More file actions
29 lines (29 loc) · 10.5 KB
/
Copy pathstyles.css
File metadata and controls
29 lines (29 loc) · 10.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
:root { --accent-light: #596f5c; --accent-dark: #a8c4a7; --paper: #f6f6f4; --ink: #171717; --muted: #777; --line: #dededb; --accent: var(--accent-light); font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; color: var(--ink); background: var(--paper); }
:root[data-theme="dark"] { --paper: #121212; --ink: #efefec; --muted: #989894; --line: #2d2d2c; --accent: var(--accent-dark); }
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; min-height: 100dvh; background: var(--paper); transition: background .25s ease, color .25s ease; }
button, a { font: inherit; } button { color: inherit; } a { color: inherit; text-decoration: none; }
svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.page-shell { width: min(1120px, calc(100% - 80px)); height: 100dvh; margin: 0 auto; display: grid; grid-template-rows: auto 1fr auto; padding: 30px 0 22px; gap: 18px; overflow: hidden; }
header, .footer-bottom, .socials, .resource, .theme-toggle, .social, .more-button { display: flex; align-items: center; }
header { justify-content: flex-end; }
.theme-toggle { gap: 7px; border: 0; padding: 5px 0; background: transparent; color: var(--muted); cursor: pointer; font-size: 12px; transition: color .2s ease; } .theme-toggle svg { width: 15px; height: 15px; } .theme-toggle:hover { color: var(--accent); }
.main-grid { align-self: center; min-height: 0; display: grid; grid-template-columns: minmax(280px, .85fr) minmax(390px, 1.15fr); gap: clamp(55px, 10vw, 155px); }
.identity { align-self: center; } .avatar { width: 84px; height: 84px; display: block; margin-bottom: 22px; object-fit: contain; object-position: center; }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 12px; letter-spacing: .05em; } h1 { margin: 0; font-size: clamp(34px, 4vw, 48px); font-weight: 680; letter-spacing: -.06em; line-height: 1; } .introduction { max-width: 330px; margin: 19px 0 0; font-size: 14px; line-height: 1.9; color: var(--muted); }
.quote { height: 25px; margin: 28px 0 0; display: flex; align-items: center; color: var(--accent); font-size: 14px; white-space: nowrap; } .quote i { width: 1px; height: 15px; margin-left: 4px; background: currentColor; animation: blink .9s step-end infinite; } @keyframes blink { 50% { opacity: 0; } }
.content { position: relative; min-width: 0; height: min(560px, calc(100dvh - 180px)); align-self: center; overflow: hidden; } .content-view { position: absolute; inset: 0; transition: opacity .34s cubic-bezier(.22, 1, .36, 1), transform .42s cubic-bezier(.22, 1, .36, 1); } .content-overview { display: grid; align-content: start; gap: 28px; } .content-detail { display: grid; grid-template-rows: auto 1fr; opacity: 0; pointer-events: none; transform: translateX(30px) scale(.985); } .content.is-detail .content-overview { opacity: 0; pointer-events: none; transform: translateX(-26px) scale(.985); } .content.is-detail .content-detail { opacity: 1; pointer-events: auto; transform: translateX(0) scale(1); } .content-group h2, .social-section > p { margin: 0 0 10px; font-size: 11px; font-weight: 650; letter-spacing: .12em; color: var(--muted); }
.resource { min-width: 0; min-height: 49px; gap: 13px; overflow: hidden; border-top: 1px solid var(--line); padding: 10px 2px; transition: color .2s ease, padding .2s ease; } .content-group .resource:last-of-type { border-bottom: 1px solid var(--line); } .resource:hover { color: var(--accent); padding-left: 7px; } .resource-icon { width: 24px; flex: 0 0 auto; color: var(--muted); } .resource-icon svg { width: 19px; height: 19px; } .resource > span:nth-child(2) { flex: 1 1 0; min-width: 0; } .resource strong, .resource small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .resource strong { font-size: 14px; font-weight: 560; } .resource small { margin-top: 3px; font-size: 11px; color: var(--muted); } .outbound { flex: 0 0 auto; margin-left: auto; color: var(--muted); } .outbound svg { width: 15px; height: 15px; }
.group-more { width: 100%; min-height: 34px; display: flex; align-items: center; gap: 7px; border: 0; border-bottom: 1px solid var(--line); padding: 7px 2px; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; text-align: left; } .group-more span { color: var(--accent); } .group-more svg { width: 14px; height: 14px; margin-left: auto; } .group-more:hover { color: var(--accent); }
footer { align-self: end; } .social-section { margin-top: 29px; } .social-wrap { position: relative; display: flex; align-items: center; min-width: 0; } .socials { min-width: 0; flex: 1 1 auto; gap: 18px; flex-wrap: nowrap; overflow: hidden; } .social { flex: 0 0 auto; gap: 6px; color: var(--muted); font-size: 13px; transition: color .2s ease, transform .2s ease; } .social span { width: 17px; height: 17px; display: grid; place-items: center; } .social svg { width: 17px; height: 17px; } .social em { font-style: normal; } .social:hover { color: var(--accent); transform: translateY(-2px); }
.more-button { flex: 0 0 auto; border: 0; background: var(--paper); padding: 2px 0 2px 12px; gap: 4px; color: var(--muted); font-size: 13px; cursor: pointer; } .more-button span { font-size: 11px; } .more-button:hover { color: var(--accent); } .more-popover { position: absolute; z-index: 2; right: 0; bottom: calc(100% + 12px); width: max-content; max-width: min(300px, 100%); padding: 12px 14px; display: flex; gap: 13px; flex-wrap: wrap; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); background: var(--paper); box-shadow: 0 12px 32px rgb(0 0 0 / .09); opacity: 0; visibility: hidden; transform: translateY(5px) scale(.98); transform-origin: bottom right; transition: opacity .18s ease, transform .18s ease, visibility .18s linear; } .more-popover::after { content: ""; position: absolute; right: 21px; bottom: -5px; width: 8px; height: 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); transform: rotate(45deg); } .more-popover.is-open { opacity: 1; visibility: visible; transform: translateY(0) scale(1); transition: opacity .18s ease, transform .18s ease; } .more-popover .social { font-size: 12px; }
.footer-bottom { justify-content: space-between; gap: 15px; padding-top: 13px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; } .compliance, .footer-meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; } .compliance a, .repository { display: inline-flex; gap: 3px; align-items: center; } .compliance a:hover, .repository:hover { color: var(--accent); } .compliance svg, .repository svg { width: 12px; height: 12px; }
.detail-heading { display: flex; align-items: center; gap: 13px; padding-bottom: 12px; border-bottom: 1px solid var(--line); } .detail-heading h2 { margin: 0; font-size: 16px; } .collection-back { display: inline-flex; align-items: center; gap: 5px; border: 0; padding: 5px 0; color: var(--muted); background: transparent; cursor: pointer; font-size: 12px; } .collection-back svg { width: 17px; height: 17px; } .collection-back:hover { color: var(--accent); transform: translateX(-2px); } .content-detail { min-height: 0; grid-template-rows: auto minmax(0, 1fr); } .collection-list { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding-right: 8px; scrollbar-width: thin; scrollbar-color: var(--accent) transparent; } .collection-list::-webkit-scrollbar { width: 8px; } .collection-list::-webkit-scrollbar-track { margin: 8px 0; background: transparent; } .collection-list::-webkit-scrollbar-thumb { min-height: 34px; border: 2px solid var(--paper); border-radius: 999px; background: color-mix(in srgb, var(--accent) 72%, var(--line)); } .collection-list::-webkit-scrollbar-thumb:hover { background: var(--accent); } .collection-list .resource:last-child { border-bottom: 1px solid var(--line); }
@media (max-width: 720px) { .page-shell { width: min(100% - 38px, 520px); padding: 24px 0 20px; gap: 20px; } .main-grid { grid-template-columns: 1fr; gap: 28px; align-self: center; } .identity { display: grid; grid-template-columns: 62px 1fr; column-gap: 17px; align-items: center; } .avatar { width: 62px; height: 62px; margin: 0; grid-row: 1 / span 3; } .eyebrow { margin: 0 0 4px; font-size: 13px; } h1 { font-size: 31px; } .introduction { grid-column: 1 / -1; max-width: none; margin: 18px 0 0; font-size: 15px; line-height: 1.7; } .quote { grid-column: 1 / -1; margin-top: 18px; font-size: 14px; } .social-section { grid-column: 1 / -1; margin-top: 22px; } .social-section > p { margin-bottom: 9px; font-size: 12px; } .content { height: min(490px, calc(100dvh - 330px)); } .content-overview { gap: 18px; } .content-group h2 { margin-bottom: 7px; font-size: 12px; } .resource { min-height: 46px; padding: 7px 0; gap: 8px; } .resource-icon { display: none; } .resource strong { font-size: 13px; } .resource small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; } .outbound svg { width: 14px; height: 14px; } .socials { gap: 13px; } .social em { font-size: 13px; } .footer-bottom { padding-top: 10px; font-size: 11px; } .footer-meta { gap: 8px; } .more-popover { bottom: auto; top: calc(100% + 10px); transform-origin: top right; } .more-popover::after { top: -5px; bottom: auto; transform: rotate(225deg); } .more-popover.is-open { transform: translateY(0) scale(1); } }
@media (max-aspect-ratio: 4/5) { .page-shell { height: auto; min-height: 100dvh; overflow: visible; padding-top: 34px; padding-bottom: 28px; } .main-grid { align-self: start; } }
/* 高像素密度设备与横屏窗口可能拥有很小的 CSS 高度;此时优先完整可读,而非强行一屏。 */
@media (max-height: 700px) { .page-shell { height: auto; min-height: 100dvh; grid-template-rows: auto auto auto; overflow: visible; padding-top: 24px; padding-bottom: 24px; } .main-grid { align-self: start; } .content { height: 420px; } }
@media (max-height: 460px) { .page-shell { padding-top: 18px; padding-bottom: 18px; gap: 14px; } .main-grid { gap: 38px; } .content { height: 390px; } }
@media (max-height: 620px) and (min-width: 721px) { .page-shell { padding: 20px 0 16px; } .avatar { width: 60px; height: 60px; margin-bottom: 16px; } .introduction { margin-top: 12px; line-height: 1.65; } .quote { margin-top: 16px; } .content { gap: 15px; } .resource { min-height: 39px; padding: 6px 2px; } .social-section > p { margin-bottom: 6px; } .footer-bottom { margin-top: 12px; padding-top: 8px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }