Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/On mobile device the campaign title is huge #1406

Merged
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/components/client/campaigns/CampaignDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,17 @@ const StyledGrid = styled(Grid)(({ theme }) => ({

[`& .${classes.campaignTitle}`]: {
marginTop: theme.spacing(6),
fontSize: theme.typography.pxToRem(45),
letterSpacing: '-1.5px',

[theme.breakpoints.up('xs')]: {
Copy link
Member

@sashko9807 sashko9807 Apr 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breakpoint seems redundant to me. Can you try, setting the fontSize and marginBottom properties without it, and see if it works?
The font size should still be 32px on viewports smaller than 900px, and 45px on viewports bigger than 900px.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right! The media query is not necessary and it works the same way without it. Thank you for the feedback!

fontSize: theme.typography.pxToRem(32),
marginBottom: theme.spacing(4),
},

[theme.breakpoints.up('md')]: {
fontSize: theme.typography.pxToRem(45),
marginTop: 0,
marginBottom: theme.spacing(7),
},
},

Expand Down