Skip to content

Commit 53ab07b

Browse files
author
ZENTAXA Team
committed
Improve documentation responsiveness for all screen sizes
1 parent b1f8df1 commit 53ab07b

File tree

1 file changed

+88
-28
lines changed

1 file changed

+88
-28
lines changed

documentation.html

Lines changed: 88 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,20 @@
1515
}
1616

1717
.doc-title {
18-
font-size: 2.5rem;
18+
font-size: clamp(2rem, 5vw, 2.5rem);
1919
font-weight: 700;
2020
margin-bottom: 1rem;
2121
background: linear-gradient(to right, #fff, #94a3b8);
2222
-webkit-background-clip: text;
2323
-webkit-text-fill-color: transparent;
24+
line-height: 1.2;
25+
}
26+
27+
.doc-layout {
28+
display: grid;
29+
grid-template-columns: 250px minmax(0, 1fr);
30+
gap: 4rem;
31+
align-items: start;
2432
}
2533

2634
.doc-nav {
@@ -30,10 +38,17 @@
3038
border: 1px solid var(--border);
3139
border-radius: var(--radius);
3240
padding: 1.5rem;
41+
max-height: calc(100vh - 4rem);
42+
overflow-y: auto;
43+
/* Reset generic nav styles from main.css */
44+
height: auto;
45+
display: block;
3346
}
3447

3548
.doc-nav ul {
3649
list-style: none;
50+
padding: 0;
51+
margin: 0;
3752
}
3853

3954
.doc-nav li {
@@ -43,14 +58,20 @@
4358
.doc-nav a {
4459
color: var(--text-muted);
4560
font-size: 0.95rem;
61+
display: block;
62+
padding: 0.25rem 0;
4663
}
4764

4865
.doc-nav a:hover, .doc-nav a.active {
4966
color: var(--primary);
5067
}
5168

69+
.doc-content {
70+
min-width: 0; /* Prevent grid blowout */
71+
}
72+
5273
.doc-content h2 {
53-
font-size: 1.8rem;
74+
font-size: clamp(1.5rem, 3vw, 1.8rem);
5475
margin-top: 3rem;
5576
margin-bottom: 2rem;
5677
color: var(--text);
@@ -59,9 +80,9 @@
5980
}
6081

6182
.doc-content h3 {
62-
font-size: 1.4rem;
63-
margin-top: 4rem;
64-
margin-bottom: 1.5rem;
83+
font-size: clamp(1.2rem, 2.5vw, 1.4rem);
84+
margin-top: 2.5rem;
85+
margin-bottom: 1rem;
6586
color: var(--text);
6687
}
6788

@@ -81,9 +102,32 @@
81102
margin-bottom: 0.5rem;
82103
}
83104

105+
/* Responsive Code Blocks */
106+
pre {
107+
background: var(--surface);
108+
padding: 1rem;
109+
border-radius: var(--radius);
110+
border: 1px solid var(--border);
111+
overflow-x: auto;
112+
margin-bottom: 1.5rem;
113+
max-width: 100%;
114+
}
115+
116+
code {
117+
font-family: var(--font-mono);
118+
font-size: 0.9em;
119+
}
120+
121+
/* Responsive Tables */
122+
.table-container {
123+
overflow-x: auto;
124+
margin-bottom: 1.5rem;
125+
}
126+
127+
/* Feature Grid Responsive */
84128
.feature-grid {
85129
display: grid;
86-
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
130+
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
87131
gap: 1.5rem;
88132
margin-top: 1.5rem;
89133
}
@@ -148,36 +192,52 @@
148192
color: var(--primary);
149193
}
150194

151-
.doc-layout {
152-
display: grid;
153-
grid-template-columns: 250px minmax(0, 1fr);
154-
gap: 4rem;
155-
align-items: start;
156-
}
157-
158-
.doc-nav {
159-
position: sticky;
160-
top: 2rem;
161-
background: var(--surface);
162-
border: 1px solid var(--border);
163-
border-radius: var(--radius);
164-
padding: 1.5rem;
165-
max-height: calc(100vh - 4rem);
166-
overflow-y: auto;
167-
/* Reset generic nav styles from main.css */
168-
height: auto;
169-
display: block;
170-
}
171-
172-
@media (max-width: 768px) {
195+
/* Mobile Responsive Adjustments */
196+
@media (max-width: 900px) {
173197
.doc-layout {
174198
grid-template-columns: 1fr;
175199
gap: 2rem;
176200
}
201+
177202
.doc-nav {
178203
position: relative;
179204
top: 0;
180205
margin-bottom: 2rem;
206+
max-height: 300px;
207+
}
208+
209+
.container {
210+
padding-left: 1.25rem;
211+
padding-right: 1.25rem;
212+
}
213+
}
214+
215+
@media (max-width: 480px) {
216+
.doc-header {
217+
padding: 1.5rem 0;
218+
}
219+
220+
.feature-grid {
221+
grid-template-columns: 1fr;
222+
}
223+
224+
.step-list li {
225+
padding-left: 0;
226+
margin-top: 3rem;
227+
}
228+
229+
.step-list li::before {
230+
position: relative;
231+
margin-bottom: 0.5rem;
232+
}
233+
234+
dl {
235+
grid-template-columns: 1fr !important;
236+
gap: 0.5rem !important;
237+
}
238+
239+
dt {
240+
margin-top: 1rem;
181241
}
182242
}
183243
</style>

0 commit comments

Comments
 (0)