Files
documentation/assets/styling/components.css
2026-10-09 20:59:12 -07:00

468 lines
7.6 KiB
CSS

.ico {
width: 16px;
height: 16px;
flex-shrink: 0;
}
#search-trigger {
position: absolute;
left: 50%;
transform: translateX(-50%);
display: flex;
align-items: center;
gap: 10px;
background: var(--search-bg);
width: min(440px, 40vw);
height: 36px;
padding: 0 12px;
border: none;
border-radius: 100px;
color: var(--muted);
font: inherit;
font-size: 14px;
cursor: pointer;
}
#search-trigger kbd {
margin-left: auto;
font: 600 11px var(--font);
color: inherit;
}
#search-modal {
position: fixed;
inset: 0;
z-index: 100;
display: none;
}
#search-modal.open {
display: block;
}
.search-panel {
position: relative;
width: min(640px, calc(100vw - 24px));
margin: 52px auto 0;
border-radius: 20px;
overflow: hidden;
background: var(--search-panel-bg) !important;
border: 1px solid var(--border);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
}
.search-input-row {
display: flex;
align-items: center;
gap: 12px;
padding: 18px 20px;
}
.search-input-row .ico {
width: 18px;
height: 18px;
color: var(--muted);
}
#search-input {
flex: 1;
border: none;
outline: none;
background: transparent;
color: var(--text-heading);
font: inherit;
font-size: 18px;
}
#search-results {
max-height: 40vh;
overflow-y: auto;
padding: 0 6px 8px;
}
.search-label {
padding: 8px 14px;
font-size: 12px;
color: var(--muted);
}
.sr {
display: flex;
align-items: flex-start;
gap: 12px;
padding: 8px 12px;
border-radius: 12px;
}
.sr>.ico {
margin-top: 3px;
color: var(--muted);
}
.sr.on {
background: var(--hover-bg);
}
.sr-body {
min-width: 0;
}
.sr .t {
font-size: 14px;
font-weight: 600;
line-height: 1.35;
color: var(--text-heading);
}
.sr .s {
display: -webkit-box;
margin-top: 2px;
font-size: 12.5px;
line-height: 1.4;
color: var(--muted);
overflow: hidden;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
.sr .p {
margin-top: 2px;
font-size: 12px;
line-height: 1.35;
color: var(--muted);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sr .sep {
margin: 0 6px;
opacity: 0.7;
}
.sr .hit {
font-weight: 700;
color: var(--text-heading);
}
.search-footer {
display: flex;
gap: 18px;
padding: 12px 20px;
font-size: 12px;
color: var(--muted);
border-top: 1px solid var(--border-subtle);
}
.search-footer .close-hint {
margin-left: auto;
}
.search-footer kbd {
margin-right: 4px;
padding: 1px 5px;
border-radius: 4px;
font: 11px var(--font);
}
.code-wrap {
position: relative;
}
.code-wrap .copy-btn {
position: absolute;
top: 12px;
right: 12px;
display: flex;
padding: 6px;
border: none;
border-radius: 8px;
background: none;
color: var(--muted);
cursor: pointer;
}
.code-wrap .copy-btn:hover {
background: var(--hover-bg);
}
.code-group {
position: relative;
margin: 16px 0;
border-radius: 20px;
background: var(--code-group-bg);
padding: 6px 4px 4px;
}
.code-group-tabs {
display: flex;
align-items: center;
gap: 16px;
padding: 4px 6px 6px;
}
.code-group-tab {
position: relative;
padding: 6px 2px 8px;
font-family: var(--font);
font-size: 13px;
font-weight: 600;
line-height: 16px;
border: none;
background: none;
cursor: pointer;
color: var(--muted);
}
.code-group-tab.active {
color: var(--code-tab-active);
}
.code-group-tab.active::after {
content: "";
position: absolute;
left: 0;
right: 0;
bottom: 0;
height: 2px;
background: var(--code-tab-active);
border-radius: 2px;
}
.code-group-panels {
background: var(--code-group-panel-bg);
border-radius: 14px;
overflow: hidden;
}
.cg-copy-btn {
position: absolute;
top: 10px;
right: 14px;
display: flex;
align-items: center;
justify-content: center;
padding: 4px;
border: none;
border-radius: 6px;
background: none;
color: var(--muted);
cursor: pointer;
}
.cg-copy-btn:hover {
color: var(--text-heading);
}
.code-group-panel {
display: none;
}
.code-group-panel.active {
display: block;
}
main.prose .code-group pre {
margin: 0;
padding: 16px 20px;
border: none;
border-radius: 0;
background: transparent;
color: inherit;
}
main.prose .code-group pre code {
color: inherit;
}
main.prose blockquote {
margin: 16px 0;
padding: 4px 0 4px 16px;
border-left: 3px solid var(--border);
color: var(--muted);
}
main.prose blockquote p {
margin: 0;
color: inherit;
}
.skeleton-wrap {
width: 100%;
}
.skeleton-line,
.skeleton-media {
background: linear-gradient(90deg, var(--skeleton-pulse-1) 25%, var(--skeleton-pulse-2) 37%, var(--skeleton-pulse-1) 63%);
background-size: 400% 100%;
animation: skeletonPulse 1.3s cubic-bezier(0.4, 0, 0.6, 1) infinite;
border-radius: 8px;
}
@keyframes skeletonPulse {
0% {
background-position: 100% 50%;
}
100% {
background-position: 0 50%;
}
}
.skeleton-eyebrow {
width: 90px;
height: 16px;
margin-bottom: 12px;
}
.skeleton-title {
width: 65%;
height: 38px;
margin-bottom: 18px;
border-radius: 10px;
}
.skeleton-desc {
width: 85%;
height: 22px;
margin-bottom: 24px;
}
.skeleton-media {
width: 100%;
height: 320px;
border-radius: 24px;
margin: 24px 0;
}
.skeleton-text {
height: 16px;
margin: 12px 0;
}
.w-100 {
width: 100%;
}
.w-90 {
width: 90%;
}
.w-85 {
width: 85%;
}
.w-75 {
width: 75%;
}
.content-animate>* {
animation: smoothBlurReveal 0.44s cubic-bezier(0.22, 1, 0.36, 1) both;
will-change: filter, opacity, transform;
}
.content-animate>*:nth-child(1) {
animation-delay: 0ms;
}
.content-animate>*:nth-child(2) {
animation-delay: 35ms;
}
.content-animate>*:nth-child(3) {
animation-delay: 70ms;
}
.content-animate>*:nth-child(4) {
animation-delay: 105ms;
}
.content-animate>*:nth-child(5) {
animation-delay: 140ms;
}
.content-animate>*:nth-child(6) {
animation-delay: 175ms;
}
.content-animate>*:nth-child(7) {
animation-delay: 210ms;
}
.content-animate>*:nth-child(8) {
animation-delay: 245ms;
}
.content-animate>*:nth-child(9) {
animation-delay: 280ms;
}
.content-animate>*:nth-child(n+10) {
animation-delay: 315ms;
}
.content-animate.caught-up>* {
animation: none !important;
opacity: 1 !important;
filter: none !important;
transform: none !important;
}
@keyframes smoothBlurReveal {
0% {
opacity: 0;
filter: blur(8px);
transform: translateY(6px);
}
100% {
opacity: 1;
filter: blur(0px);
transform: translateY(0);
}
}
@media (prefers-reduced-motion: reduce) {
.content-animate>* {
animation: none !important;
}
.skeleton-line,
.skeleton-media {
animation: none !important;
}
}
@media (max-width: 900px) {
#search-trigger {
order: 2;
position: static;
transform: none;
width: auto;
padding: 8px;
background: transparent;
}
#search-trigger .ico {
font-weight: 900;
width: 1.53rem;
height: 1.3rem;
}
#search-trigger span,
#search-trigger kbd {
display: none;
}
.search-panel {
margin-top: 50px;
border-radius: 30px;
}
.search-footer {
display: none;
}
}