fix: unify responsive design across documentation portal

This commit is contained in:
2026-07-12 23:39:21 +05:30
parent dea22aa3da
commit d150e99809
72 changed files with 371 additions and 279 deletions
+171 -33
View File
@@ -100,7 +100,7 @@ a {
top: 0;
z-index: 20;
display: grid;
grid-template-columns: 1fr auto 1fr;
grid-template-columns: minmax(180px, 1fr) auto minmax(180px, 1fr);
align-items: center;
gap: 2rem;
height: 74px;
@@ -131,7 +131,8 @@ a {
}
.topbar nav {
display: flex;
gap: 1.5rem;
gap: clamp(0.8rem, 1.35vw, 1.5rem);
align-items: center;
}
.topbar nav a {
position: relative;
@@ -159,10 +160,13 @@ a {
color: var(--text);
}
.theme-button {
justify-self: end;
display: inline-grid;
place-items: center;
width: 40px;
height: 40px;
border: 1px solid var(--border);
border-radius: 9px;
padding: 0.5rem 0.8rem;
padding: 0;
color: var(--muted);
background: var(--surface);
cursor: pointer;
@@ -172,12 +176,23 @@ a {
box-shadow 0.18s ease;
}
.preview-pill {
justify-self: end;
display: inline-flex;
align-items: center;
min-height: 36px;
padding: 0.35rem 0.65rem;
border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--border));
border-radius: 999px;
color: var(--brand-strong);
font-size: 0.78rem;
font-weight: 800;
text-decoration: none;
}
.topbar-actions {
display: flex;
justify-self: end;
align-items: center;
gap: 0.65rem;
}
.mobile-doc-nav {
display: none;
padding: 0.75rem 20px;
@@ -194,9 +209,10 @@ a {
padding: 1rem 0 0.25rem;
}
.portal-main {
min-width: 0;
width: min(1240px, 100%);
margin: 0 auto;
padding: 1rem clamp(20px, 4vw, 72px) 6rem;
padding: 0 clamp(20px, 4vw, 72px) 6rem;
}
.breadcrumbs {
display: flex;
@@ -207,7 +223,9 @@ a {
font-size: 0.8rem;
}
.portal-hero {
min-height: 650px;
min-height: min(720px, calc(100vh - 74px));
margin-inline: calc(clamp(20px, 4vw, 72px) * -1);
padding-inline: clamp(20px, 4vw, 72px);
}
.status {
display: inline-flex;
@@ -231,6 +249,36 @@ a {
.access-note {
font-size: 0.86rem !important;
}
.portal-main > section:not(.hero) {
padding-block: clamp(3rem, 7vw, 6rem);
border-top: 1px solid var(--border);
}
.portal-main > section:not(.hero) > h2 {
max-width: 760px;
margin: 0 0 1.75rem;
font-size: clamp(1.8rem, 3.4vw, 3rem);
line-height: 1.08;
letter-spacing: -0.045em;
}
.portal-main > section:not(.hero) > p {
max-width: 760px;
color: var(--muted);
line-height: 1.75;
}
.portal-main .feature-grid {
padding: 0;
}
.feature-grid h3 {
margin: 0.65rem 0;
color: var(--text);
font-size: 1.05rem;
}
.feature-grid article > :first-child {
margin-top: 0;
}
.feature-grid article > :last-child {
margin-bottom: 0;
}
.access-callout {
margin: 2rem 0;
border: 1px solid var(--brand);
@@ -238,6 +286,14 @@ a {
padding: 1.25rem;
background: color-mix(in srgb, var(--brand) 7%, var(--surface));
}
.access-callout pre {
padding-right: 5.5rem;
}
.access-callout .copy-button {
position: absolute;
top: 0.65rem;
right: 0.65rem;
}
.access-callout h2 {
margin-top: 0;
font-size: 1.2rem;
@@ -287,6 +343,10 @@ a {
border-radius: 8px;
color: white;
background: #334155;
cursor: pointer;
}
.copy-button:hover {
background: #475569;
}
footer nav {
display: flex;
@@ -306,6 +366,7 @@ footer nav {
}
.hero {
display: grid;
grid-template-columns: minmax(0, 1fr);
place-items: center;
min-height: 670px;
padding: 100px 0;
@@ -331,12 +392,15 @@ footer nav {
text-transform: uppercase;
}
.hero h1 {
width: 100%;
max-width: 920px;
margin: 1rem 0;
font-size: clamp(3rem, 7vw, 6.6rem);
line-height: 0.96;
letter-spacing: -0.065em;
animation: reveal-up 0.72s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.hero > * {
min-width: 0;
}
.hero.compact h1 {
font-size: clamp(2.8rem, 5vw, 4.8rem);
@@ -350,19 +414,18 @@ footer nav {
animation: gradient-shift 7s linear infinite;
}
.hero > p {
max-width: 720px;
width: min(720px, 100%);
max-width: 100%;
margin: 0.75rem auto 0;
color: var(--muted);
font-size: 1.15rem;
line-height: 1.75;
animation: reveal-up 0.72s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.actions {
display: flex;
flex-wrap: wrap;
gap: 0.8rem;
margin-top: 2rem;
animation: reveal-up 0.72s 0.18s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.actions a {
padding: 0.8rem 1.15rem;
@@ -395,7 +458,6 @@ footer nav {
text-align: left;
background: var(--code);
box-shadow: var(--shadow);
animation: reveal-up 0.8s 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.code-window > span {
display: block;
@@ -461,15 +523,6 @@ pre code,
color-mix(in srgb, var(--surface-soft) 42%, var(--surface))
);
box-shadow: var(--shadow);
animation: reveal-up 0.62s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.feature-grid article:nth-child(2),
.package-card:nth-child(3n + 2) {
animation-delay: 0.06s;
}
.feature-grid article:nth-child(3),
.package-card:nth-child(3n) {
animation-delay: 0.12s;
}
.feature-grid h2,
.package-card h2 {
@@ -668,17 +721,17 @@ pre code,
}
.documentation {
min-width: 0;
animation: reveal-up 0.65s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.documentation.standalone,
.standalone {
width: 100%;
max-width: none;
margin: 0;
padding: 90px clamp(0px, 5vw, 90px) 120px;
width: min(960px, 100%);
max-width: 960px;
margin: 0 auto;
padding: clamp(3.5rem, 7vw, 6rem) 0 clamp(5rem, 9vw, 8rem);
}
.standalone > * {
max-width: 1000px;
width: 100%;
max-width: 850px;
}
.doc-intro {
padding-bottom: 2rem;
@@ -699,6 +752,15 @@ pre code,
font-size: 1rem;
line-height: 1.8;
}
.prose p,
.prose li,
.prose td,
.prose th {
overflow-wrap: anywhere;
}
.prose pre {
max-width: 100%;
}
.prose > * {
max-width: 850px;
}
@@ -737,26 +799,32 @@ pre code,
border: 1px solid var(--border);
border-radius: 12px;
}
.prose table {
.prose table,
.portal-main table {
width: 100%;
border-collapse: collapse;
background: var(--surface);
font-size: 0.9rem;
}
.prose th,
.prose td {
.prose td,
.portal-main th,
.portal-main td {
min-width: 130px;
padding: 0.75rem 0.9rem;
border-bottom: 1px solid var(--border);
text-align: left;
vertical-align: top;
line-height: 1.5;
}
.prose th {
.prose th,
.portal-main th {
color: var(--text);
background: var(--surface-soft);
font-weight: 700;
}
.prose tr:last-child td {
.prose tr:last-child td,
.portal-main tr:last-child td {
border-bottom: 0;
}
.prose a {
@@ -799,6 +867,13 @@ footer {
font-size: 0.82rem;
text-align: center;
}
footer p {
margin: 0.5rem auto;
}
footer a {
color: var(--brand-strong);
text-underline-offset: 3px;
}
@keyframes reveal-up {
from {
@@ -857,6 +932,9 @@ footer {
.preview-pill {
display: none;
}
.topbar-actions {
display: none;
}
.mobile-doc-nav {
display: block;
}
@@ -891,8 +969,68 @@ footer {
padding-inline: 14px;
}
.hero {
min-height: 580px;
padding: 70px 0;
min-height: auto;
padding-top: 72px;
padding-bottom: 72px;
}
.hero h1 {
width: calc(100vw - 60px);
max-width: calc(100vw - 60px);
font-size: clamp(1.75rem, 8vw, 2.2rem);
line-height: 1.02;
letter-spacing: -0.055em;
overflow-wrap: anywhere;
}
.hero > p {
width: calc(100vw - 60px);
max-width: calc(100vw - 60px);
font-size: 1rem;
overflow-wrap: anywhere;
}
.portal-hero {
margin-inline: -14px;
padding-inline: 14px;
}
.portal-hero br {
display: block;
}
.portal-hero h1 em {
display: block;
}
.portal-hero > p {
padding-inline: 0.25rem;
}
.actions {
width: calc(100vw - 60px);
max-width: calc(100vw - 60px);
}
.actions a {
max-width: 100%;
text-align: center;
}
.portal-main > section:not(.hero) {
padding-block: 3.5rem;
}
.breadcrumbs {
overflow-x: auto;
flex-wrap: nowrap;
white-space: nowrap;
}
.documentation.standalone,
.standalone {
width: calc(100vw - 40px);
max-width: calc(100vw - 40px);
}
.standalone > * {
max-width: calc(100vw - 40px);
}
.standalone > .status {
width: fit-content;
}
.coverage-list article {
align-items: flex-start;
flex-direction: column;
padding-bottom: 1rem;
}
.feature-grid,
.package-grid {