Skip to content

Commit 3d034f9

Browse files
committed
Refactor typography for Next.js manual setup page with clean, minimal design
1 parent 3f7fcf3 commit 3d034f9

File tree

12 files changed

+241
-279
lines changed

12 files changed

+241
-279
lines changed

app/globals.css

Lines changed: 142 additions & 155 deletions
Original file line numberDiff line numberDiff line change
@@ -147,184 +147,171 @@ body {
147147
-moz-osx-font-smoothing: grayscale;
148148
}
149149

150-
/* Enhanced Typography System */
151-
152-
/* Primary Title */
153-
h1 {
154-
font-size: 2.5rem; /* 40px */
155-
font-weight: 600;
156-
line-height: 1.2;
157-
margin-bottom: 1.5rem;
158-
letter-spacing: -0.02em;
159-
}
160-
161-
/* Step Headers (Step 1, Step 2, etc.) */
162-
h2 {
163-
font-size: 1.875rem; /* 30px */
164-
font-weight: 600;
165-
line-height: 1.3;
166-
margin-top: 3rem;
167-
margin-bottom: 1.25rem;
168-
color: var(--accent-purple);
169-
border-bottom: 2px solid var(--accent-purple-light);
170-
padding-bottom: 0.5rem;
171-
}
172-
173-
/* Subsection Headers */
174-
h3 {
175-
font-size: 1.5rem; /* 24px */
176-
font-weight: 500;
177-
line-height: 1.4;
178-
margin-top: 2rem;
179-
margin-bottom: 1rem;
180-
}
181-
182-
/* Component Headers */
183-
h4 {
184-
font-size: 1.25rem; /* 20px */
185-
font-weight: 500;
186-
line-height: 1.4;
187-
margin-top: 1.5rem;
188-
margin-bottom: 0.75rem;
189-
}
190-
191-
/* Enhanced Body Text */
192-
p {
193-
font-size: 1rem; /* 16px */
194-
line-height: 1.6;
195-
margin-bottom: 1rem;
150+
* {
151+
box-sizing: border-box;
196152
}
197153

198-
/* Large introductory text */
199-
.lead-text {
200-
font-size: 1.125rem; /* 18px */
201-
line-height: 1.6;
202-
color: var(--gray-11);
203-
margin-bottom: 1.5rem;
204-
}
154+
@keyframes fadeIn {
155+
from {
156+
opacity: 0;
157+
}
205158

206-
/* Small supporting text */
207-
.caption, .note {
208-
font-size: 0.875rem; /* 14px */
209-
line-height: 1.5;
210-
color: var(--gray-10);
159+
to {
160+
opacity: 1;
161+
}
211162
}
212163

213-
/* Enhanced Code Typography */
214-
code {
215-
font-size: 0.9em;
216-
font-family: var(--font-family-monospace);
217-
background: var(--gray-a2);
218-
padding: 0.125rem 0.25rem;
219-
border-radius: 0.25rem;
220-
color: var(--codeColor);
164+
#kapa-widget-portal a[href="https://sentry.io/privacy/"]
165+
{
166+
color: rgb(134, 142, 150) !important;
221167
}
222168

223-
pre {
224-
font-size: 0.875rem !important; /* 14px - increased from 0.75rem */
225-
line-height: 1.6 !important;
226-
padding: 1.5rem;
227-
border-radius: 0.5rem;
228-
background: var(--gray-1);
229-
overflow-x: auto;
230-
margin: 1.5rem 0;
231-
}
169+
/* Next.js Manual Setup Page - Enhanced Typography (Page-specific) */
170+
/* Target only the Next.js manual setup page */
171+
body:has([data-path*="nextjs/manual-setup"]) .main-content,
172+
.main-content:has(h1:contains("Manual Setup")),
173+
.content-wrapper:has([href*="nextjs/manual-setup"]),
174+
[data-current-pathname*="nextjs/manual-setup"] {
175+
176+
/* Enhanced heading hierarchy - clean and minimal */
177+
h1 {
178+
font-size: 2.25rem !important; /* 36px */
179+
font-weight: 600 !important;
180+
line-height: 1.2 !important;
181+
margin-bottom: 1.5rem !important;
182+
letter-spacing: -0.015em !important;
183+
color: var(--foreground) !important;
184+
}
232185

233-
pre code {
234-
font-size: inherit;
235-
background: transparent;
236-
padding: 0;
237-
}
186+
/* Step headers - subtle emphasis without heavy borders */
187+
h2 {
188+
font-size: 1.75rem !important; /* 28px */
189+
font-weight: 600 !important;
190+
line-height: 1.3 !important;
191+
margin-top: 2.5rem !important;
192+
margin-bottom: 1.25rem !important;
193+
color: var(--foreground) !important;
194+
position: relative !important;
195+
border-bottom: none !important;
196+
padding-bottom: 0 !important;
197+
}
238198

239-
/* Filename annotations */
240-
.filename-annotation {
241-
font-size: 0.8125rem; /* 13px */
242-
font-weight: 500;
243-
color: var(--accent-purple);
244-
background: var(--accent-purple-light);
245-
padding: 0.25rem 0.75rem;
246-
border-radius: 0.25rem 0.25rem 0 0;
247-
margin-bottom: -1px;
248-
}
199+
/* Subtle step indicator instead of heavy underlines */
200+
h2::before {
201+
content: "";
202+
position: absolute;
203+
left: -1rem;
204+
top: 50%;
205+
transform: translateY(-50%);
206+
width: 4px;
207+
height: 1.5rem;
208+
background: var(--accent-purple);
209+
border-radius: 2px;
210+
opacity: 0.6;
211+
}
249212

250-
/* Tab titles */
251-
.tab-title {
252-
font-size: 0.875rem; /* 14px */
253-
font-weight: 500;
254-
padding: 0.5rem 1rem;
255-
}
213+
/* Subsection headers */
214+
h3 {
215+
font-size: 1.375rem !important; /* 22px */
216+
font-weight: 500 !important;
217+
line-height: 1.4 !important;
218+
margin-top: 2rem !important;
219+
margin-bottom: 1rem !important;
220+
color: var(--foreground) !important;
221+
}
256222

257-
/* Alert components */
258-
.alert {
259-
font-size: 0.9375rem; /* 15px */
260-
line-height: 1.5;
261-
padding: 1rem 1.25rem;
262-
border-radius: 0.5rem;
263-
margin: 1.5rem 0;
264-
}
223+
/* Component headers */
224+
h4 {
225+
font-size: 1.125rem !important; /* 18px */
226+
font-weight: 500 !important;
227+
line-height: 1.4 !important;
228+
margin-top: 1.5rem !important;
229+
margin-bottom: 0.75rem !important;
230+
color: var(--foreground) !important;
231+
}
265232

266-
.alert-title {
267-
font-size: 1rem; /* 16px */
268-
font-weight: 600;
269-
margin-bottom: 0.5rem;
270-
}
233+
/* Enhanced body text readability */
234+
p {
235+
font-size: 1rem !important;
236+
line-height: 1.6 !important;
237+
margin-bottom: 1.25rem !important;
238+
color: var(--foreground) !important;
239+
}
271240

272-
/* Step indicators */
273-
.step-indicator {
274-
font-size: 1.125rem; /* 18px */
275-
font-weight: 700;
276-
color: var(--accent-purple);
277-
background: var(--accent-purple-light);
278-
padding: 0.5rem 1rem;
279-
border-radius: 2rem;
280-
display: inline-block;
281-
margin-bottom: 1rem;
282-
}
241+
/* Lists with better spacing */
242+
ul, ol {
243+
margin: 1.25rem 0 !important;
244+
padding-left: 1.5rem !important;
245+
}
283246

284-
/* List improvements */
285-
ul, ol {
286-
margin: 1rem 0;
287-
padding-left: 1.5rem;
288-
}
247+
li {
248+
margin-bottom: 0.5rem !important;
249+
line-height: 1.6 !important;
250+
}
289251

290-
li {
291-
margin-bottom: 0.5rem;
292-
line-height: 1.6;
293-
font-size: 1rem;
294-
}
252+
/* Enhanced code blocks - larger and more readable */
253+
pre {
254+
font-size: 0.875rem !important; /* 14px */
255+
line-height: 1.5 !important;
256+
padding: 1.25rem !important;
257+
margin: 1.5rem 0 !important;
258+
border-radius: 0.5rem !important;
259+
border: 1px solid var(--border-color) !important;
260+
}
295261

296-
/* Nested lists */
297-
li ul, li ol {
298-
margin: 0.5rem 0;
299-
}
262+
/* Inline code improvements */
263+
code {
264+
font-size: 0.9em !important;
265+
padding: 0.125rem 0.375rem !important;
266+
border-radius: 0.25rem !important;
267+
background: var(--gray-a2) !important;
268+
border: 1px solid var(--border-color) !important;
269+
}
300270

301-
/* Table of contents */
302-
.toc-item {
303-
font-size: 0.875rem; /* 14px */
304-
line-height: 1.4;
305-
margin-bottom: 0.25rem;
306-
}
271+
/* Clean alert styling - reduce visual noise */
272+
.alert, [class*="alert"] {
273+
background: var(--gray-a2) !important;
274+
border: 1px solid var(--border-color) !important;
275+
border-radius: 0.5rem !important;
276+
padding: 1rem 1.25rem !important;
277+
margin: 1.5rem 0 !important;
278+
font-size: 0.9375rem !important;
279+
line-height: 1.5 !important;
280+
}
307281

308-
.toc-item.active {
309-
font-weight: 500;
310-
color: var(--accent-purple);
311-
}
282+
/* Tone down info alerts */
283+
.alert[type="info"], [class*="alert"][data-type="info"] {
284+
background: rgba(59, 130, 246, 0.05) !important;
285+
border-color: rgba(59, 130, 246, 0.15) !important;
286+
color: var(--foreground) !important;
287+
}
312288

313-
* {
314-
box-sizing: border-box;
289+
/* Tone down warning alerts */
290+
.alert[type="warning"], [class*="alert"][data-type="warning"] {
291+
background: rgba(245, 158, 11, 0.05) !important;
292+
border-color: rgba(245, 158, 11, 0.15) !important;
293+
color: var(--foreground) !important;
294+
}
315295
}
316296

317-
@keyframes fadeIn {
318-
from {
319-
opacity: 0;
297+
/* Responsive adjustments for Next.js page */
298+
@media (max-width: 768px) {
299+
body:has([data-path*="nextjs/manual-setup"]) .main-content h1,
300+
.main-content:has(h1:contains("Manual Setup")) h1,
301+
[data-current-pathname*="nextjs/manual-setup"] h1 {
302+
font-size: 2rem !important;
320303
}
321304

322-
to {
323-
opacity: 1;
305+
body:has([data-path*="nextjs/manual-setup"]) .main-content h2,
306+
.main-content:has(h1:contains("Manual Setup")) h2,
307+
[data-current-pathname*="nextjs/manual-setup"] h2 {
308+
font-size: 1.5rem !important;
309+
margin-top: 2rem !important;
324310
}
325-
}
326311

327-
#kapa-widget-portal a[href="https://sentry.io/privacy/"]
328-
{
329-
color: rgb(134, 142, 150) !important;
312+
body:has([data-path*="nextjs/manual-setup"]) .main-content h2::before,
313+
.main-content:has(h1:contains("Manual Setup")) h2::before,
314+
[data-current-pathname*="nextjs/manual-setup"] h2::before {
315+
display: none !important;
316+
}
330317
}

src/components/apiExamples/apiExamples.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@
88
border-top-right-radius: 0px;
99
margin-top: 0;
1010
margin-bottom: 0;
11-
font-size: 0.875rem;
12-
line-height: 1.4;
11+
font-size: 0.8rem;
1312
padding: 0.75rem;
1413
}
1514

src/components/apiExamples/apiExamples.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,14 +138,14 @@ export function ApiExamples({api}: Props) {
138138
</div>
139139
{selectedTabView === 0 &&
140140
(exampleJson ? (
141-
<code className="!text-[0.875rem]">
141+
<code className="!text-[0.8rem]">
142142
{codeToJsx(JSON.stringify(exampleJson, null, 2), 'json')}
143143
</code>
144144
) : (
145145
strFormat(api.responses[selectedResponse].description)
146146
))}
147147
{selectedTabView === 1 && (
148-
<code className="!text-[0.875rem]">
148+
<code className="!text-[0.8rem]">
149149
{codeToJsx(
150150
JSON.stringify(api.responses[selectedResponse].content?.schema, null, 2),
151151
'json'

src/components/codeTabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ const TabButton = styled('button')`
159159
display: inline-block;
160160
cursor: pointer;
161161
border: none;
162-
font-size: 0.875rem;
162+
font-size: 0.75rem;
163163
background: none;
164164
outline: none;
165165
border-bottom: 3px solid transparent;

src/components/onboarding/styles.module.scss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
padding: 8px 12px;
1515
overflow-wrap: break-word;
1616
max-width: 250px;
17-
font-size: 0.8125rem;
18-
line-height: 1.4;
17+
font-size: 12px;
18+
line-height: 1.2;
1919
text-align: center;
2020
color: var(--gray-11);
2121
background-color: white;
@@ -38,7 +38,7 @@
3838

3939
.TooltipTitle {
4040
font-weight: bold;
41-
font-size: 0.8125rem;
41+
font-size: 12px;
4242
color: var(--gray-12);
4343
display: inline-block;
4444
width: 100%;

src/components/piiFields/style.module.scss

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.asterisk {
22
margin-left: 5px;
3-
font-size: 0.9375rem;
4-
line-height: 1.4;
3+
font-size: 0.9em;
54
font-weight: normal;
65
}
76

0 commit comments

Comments
 (0)