Skip to content

Commit

Permalink
Fix broken documentation pages in mobile view (twentyhq#8432)
Browse files Browse the repository at this point in the history
Fixes: twentyhq#8396

1. Summary
The document content container is missing `width` and has only `padding`
CSS property, which means the width can overflow its parent based on the
content. The code block inside headings was missing `fontSize` for
mobile view, it was set for only desktop views.
    
2. Solution
I set `width` for document content container and `fontSize` for code
blocks in headings for mobile view.
    
3. Screenshots

![localhost_3000_developers_local-setup(iPad
Mini)](https://github.com/user-attachments/assets/4adf695f-3849-4ddc-8629-be03a70d32b1)
![localhost_3000_developers(iPhone 12
Pro)](https://github.com/user-attachments/assets/52254b3a-674b-4db0-9e6c-a68d59cb4401)
  • Loading branch information
khuddite authored Nov 11, 2024
1 parent 29d92ab commit ff77f85
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ const StyledContainer = styled('div')`

const StyledWrapper = styled.div`
@media (max-width: 450px) {
width: 100%;
padding: ${Theme.spacing(10)} 32px ${Theme.spacing(20)};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ const StyledContent = styled.div`
h4 {
font-size: 16px;
}
h1,
h2,
h3,
h4 {
code {
font-size: 16px;
}
}
}
ol {
Expand Down

0 comments on commit ff77f85

Please sign in to comment.