Files
documentation/assets/styling/components.css
2026-10-11 11:06:58 -07:00

327 lines
5.3 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;
}
.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);
}
.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;
}
}
main.prose h1,
main.prose h2,
main.prose h3,
main.prose h4 {
cursor: pointer;
}