Skip to content

Commit b4d8fdc

Browse files
authored
Merge pull request #92 from replicatedhq/ui-improvements
Follow up on prior PR: Fix responsive list item sizing on Terms and Privacy pages
2 parents 4f34e4f + c4ae0d2 commit b4d8fdc

File tree

2 files changed

+72
-4
lines changed

2 files changed

+72
-4
lines changed

chartsmith-app/app/privacy/page.tsx

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,43 @@ import { Card } from "@/components/ui/Card";
99

1010
export default function PrivacyPolicyPage() {
1111
const { theme } = useTheme();
12+
13+
// Local styles to override the global .prose li styling
14+
const customStyles = `
15+
/* Ensure list items match paragraph text size at all breakpoints */
16+
.privacy-content .prose li {
17+
/* Match exactly the Tailwind text-base class */
18+
font-size: 0.875rem !important; /* Start with smaller size for very narrow screens */
19+
}
20+
21+
/* Match Tailwind's responsive breakpoints */
22+
@media (min-width: 375px) {
23+
.privacy-content .prose li {
24+
font-size: 0.9375rem !important; /* Slightly larger */
25+
}
26+
}
27+
28+
@media (min-width: 640px) {
29+
.privacy-content .prose li {
30+
font-size: 1rem !important; /* Match text-base at sm breakpoint */
31+
}
32+
}
33+
34+
@media (min-width: 768px) {
35+
.privacy-content .prose li {
36+
font-size: 1.125rem !important; /* Match text-lg at md breakpoint */
37+
}
38+
}
39+
40+
/* Remove any other font size rules from the list markers */
41+
.privacy-content .prose li::marker {
42+
font-size: 1em !important;
43+
}
44+
`;
1245

1346
return (
14-
<div className="min-h-screen bg-[var(--background)]">
47+
<div className="min-h-screen bg-[var(--background)] privacy-content">
48+
<style dangerouslySetInnerHTML={{ __html: customStyles }} />
1549
<HomeNav />
1650

1751
<main className="max-w-7xl mx-auto py-8 px-4">
@@ -28,7 +62,7 @@ export default function PrivacyPolicyPage() {
2862
Privacy Policy
2963
</h1>
3064

31-
<Card className="p-6 md:p-8 prose dark:prose-invert max-w-none text-base sm:text-lg prose-li:text-base sm:prose-li:text-lg [&_li]:mb-2">
65+
<Card className="p-6 md:p-8 prose dark:prose-invert max-w-none text-base sm:text-lg [&_li]:mb-2">
3266
<p className="text-base text-gray-500 mb-8">Last Updated: April 1, 2025</p>
3367

3468
<section className="mb-8">

chartsmith-app/app/terms/page.tsx

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,43 @@ import { Card } from "@/components/ui/Card";
99

1010
export default function TermsOfServicePage() {
1111
const { theme } = useTheme();
12+
13+
// Local styles to override the global .prose li styling
14+
const customStyles = `
15+
/* Ensure list items match paragraph text size at all breakpoints */
16+
.terms-content .prose li {
17+
/* Match exactly the Tailwind text-base class */
18+
font-size: 0.875rem !important; /* Start with smaller size for very narrow screens */
19+
}
20+
21+
/* Match Tailwind's responsive breakpoints */
22+
@media (min-width: 375px) {
23+
.terms-content .prose li {
24+
font-size: 0.9375rem !important; /* Slightly larger */
25+
}
26+
}
27+
28+
@media (min-width: 640px) {
29+
.terms-content .prose li {
30+
font-size: 1rem !important; /* Match text-base at sm breakpoint */
31+
}
32+
}
33+
34+
@media (min-width: 768px) {
35+
.terms-content .prose li {
36+
font-size: 1.125rem !important; /* Match text-lg at md breakpoint */
37+
}
38+
}
39+
40+
/* Remove any other font size rules from the list markers */
41+
.terms-content .prose li::marker {
42+
font-size: 1em !important;
43+
}
44+
`;
1245

1346
return (
14-
<div className="min-h-screen bg-[var(--background)]">
47+
<div className="min-h-screen bg-[var(--background)] terms-content">
48+
<style dangerouslySetInnerHTML={{ __html: customStyles }} />
1549
<HomeNav />
1650

1751
<main className="max-w-7xl mx-auto py-8 px-4">
@@ -28,7 +62,7 @@ export default function TermsOfServicePage() {
2862
Terms of Service
2963
</h1>
3064

31-
<Card className="p-6 md:p-8 prose dark:prose-invert max-w-none text-base sm:text-lg prose-li:text-base sm:prose-li:text-lg [&_li]:mb-2">
65+
<Card className="p-6 md:p-8 prose dark:prose-invert max-w-none text-base sm:text-lg [&_li]:mb-2">
3266
<p className="text-base text-gray-500 mb-8">Last Updated: April 1, 2025</p>
3367

3468
<section className="mb-8">

0 commit comments

Comments
 (0)