Skip to content

Commit b39bc43

Browse files
committed
fix: prevent cod table to break viewport
1 parent e3d1536 commit b39bc43

1 file changed

Lines changed: 29 additions & 4 deletions

File tree

src/CodeOfConduct.tsx

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ function CodeOfConduct() {
5959
<Container sx={{
6060
display: 'flex',
6161
flexDirection: 'column',
62-
alignItems: 'center',
62+
alignItems: 'stretch',
63+
minWidth: 0,
6364
pt: 5,
6465
pb: 5,
6566
// Add scroll padding to account for sticky header
@@ -72,11 +73,35 @@ function CodeOfConduct() {
7273
</Typography>
7374

7475
{/* Tabla de contenidos */}
75-
<Box sx={{ width: '100%', mb: 4, p: 3, bgcolor: 'grey.50', borderRadius: 2, border: '1px solid', borderColor: 'grey.200' }}>
76-
<Typography variant="h3" sx={{ mb: 2, color: 'primary.main' }}>
76+
<Box sx={{
77+
width: '100%',
78+
maxWidth: '100%',
79+
minWidth: 0,
80+
mb: 4,
81+
p: { xs: 2, sm: 3 },
82+
bgcolor: 'grey.50',
83+
borderRadius: 2,
84+
border: '1px solid',
85+
borderColor: 'grey.200',
86+
boxSizing: 'border-box',
87+
}}>
88+
<Typography variant="h3" sx={{ mb: 2, color: 'primary.main', overflowWrap: 'break-word' }}>
7789
{t("codeOfConduct.tableOfContents") || "Tabla de contenidos"}
7890
</Typography>
79-
<List dense>
91+
<List
92+
dense
93+
sx={{
94+
width: '100%',
95+
minWidth: 0,
96+
'& .MuiListItem-root': { minWidth: 0 },
97+
'& .MuiListItemText-root': { minWidth: 0 },
98+
'& .MuiListItemText-root .MuiTypography-root': {
99+
overflowWrap: 'break-word',
100+
wordBreak: 'break-word',
101+
maxWidth: '100%',
102+
},
103+
}}
104+
>
80105
<ListItem sx={{ py: 0.5 }}>
81106
<ListItemIcon sx={{ minWidth: '20px', color: 'primary.main' }}>
82107
<CircleIcon sx={{ fontSize: '6px' }} />

0 commit comments

Comments
 (0)