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

This PR adresses #2201: Extra width causing horizontal overflow #2202

Merged
merged 1 commit into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all 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
18 changes: 9 additions & 9 deletions src/web/src/components/Posts/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const useStyles = makeStyles((theme: Theme) =>
bottom: '100%',
},
postInfo: {
[theme.breakpoints.down(1200)]: {
[theme.breakpoints.down(1205)]: {
display: 'grid',
gridTemplateAreas: "'avatar title title title''avatar author date date'",
gridTemplateColumns: 'auto auto auto auto',
Expand All @@ -63,7 +63,7 @@ const useStyles = makeStyles((theme: Theme) =>
padding: '2em 0 1.5em',
lineHeight: '1.3',
top: '-1.1em',
[theme.breakpoints.down(1200)]: {
[theme.breakpoints.down(1205)]: {
top: '-1.1em',
width: '725px',
padding: '1em 0 .1em',
Expand All @@ -82,7 +82,7 @@ const useStyles = makeStyles((theme: Theme) =>
textOverflow: 'ellipsis',
textAlign: 'center',
letterSpacing: '-1.5px',
[theme.breakpoints.down(1200)]: {
[theme.breakpoints.down(1205)]: {
fontSize: '2em',
fontWeight: 'bold',
textAlign: 'start',
Expand All @@ -108,13 +108,13 @@ const useStyles = makeStyles((theme: Theme) =>
outline: 'none',
},
authorNameContainer: {
[theme.breakpoints.down(1200)]: {
[theme.breakpoints.down(1205)]: {
gridArea: 'author',
width: '100%',
},
},
author: {
[theme.breakpoints.down(1200)]: {
[theme.breakpoints.down(1205)]: {
fontSize: '2em',
lineHeight: '1.5em',
fontWeight: 'bold',
Expand All @@ -134,7 +134,7 @@ const useStyles = makeStyles((theme: Theme) =>
},
},
publishedDateContainer: {
[theme.breakpoints.down(1200)]: {
[theme.breakpoints.down(1205)]: {
gridArea: 'date',
display: 'flex',
flexWrap: 'nowrap',
Expand All @@ -146,7 +146,7 @@ const useStyles = makeStyles((theme: Theme) =>
},
},
published: {
[theme.breakpoints.down(1200)]: {
[theme.breakpoints.down(1205)]: {
height: '10px',
margin: '-.6em 1em -1em 1.5em',
fontSize: '1.3em',
Expand All @@ -163,7 +163,7 @@ const useStyles = makeStyles((theme: Theme) =>
},
},
authorAvatarContainer: {
[theme.breakpoints.down(1200)]: {
[theme.breakpoints.down(1205)]: {
gridArea: 'avatar',
shapeOutside: 'circle(50%) border-box',
shapeMargin: '1rem',
Expand Down Expand Up @@ -219,7 +219,7 @@ const extractBlogClassName = (url: string) => {
const PostComponent = ({ postUrl }: Props) => {
const classes = useStyles();
const theme = useTheme();
const desktop = useMediaQuery(theme.breakpoints.up(1200));
const desktop = useMediaQuery(theme.breakpoints.up(1205));
// We need a ref to our post content, which we inject into a <section> below.
const sectionEl = useRef<HTMLElement>(null);
// Grab the post data from our backend so we can render it
Expand Down
13 changes: 6 additions & 7 deletions src/web/src/components/Posts/PostInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,21 @@ import AdminButtons from '../AdminButtons';
const useStyles = makeStyles((theme: Theme) =>
createStyles({
root: {
marginLeft: '2rem',
margin: '0',
padding: '0',
display: 'flex',
borderLeft: '1.5px solid #999999',
flexDirection: 'column',
justifyContent: 'center',
width: '100%',
[theme.breakpoints.up('lg')]: {
width: '22rem',
width: '21rem',
},
},
authorAvatarContainer: {
shapeOutside: 'circle(50%) border-box',
shapeMargin: '1rem',
borderRadius: '50%',
marginLeft: '1rem',
marginLeft: '.5rem',
},
circle: {
display: 'block',
Expand All @@ -33,13 +32,13 @@ const useStyles = makeStyles((theme: Theme) =>
authorNameContainer: {
width: '100%',
height: '3rem',
marginLeft: '1.5rem',
marginLeft: '1rem',
},
author: {
width: '100%',
wordWrap: 'break-word',
fontSize: '1.6em',
lineHeight: '1em',
lineHeight: '1.3em',
fontWeight: 'bold',
color: theme.palette.text.primary,
},
Expand All @@ -51,7 +50,7 @@ const useStyles = makeStyles((theme: Theme) =>
},
},
published: {
marginLeft: '1.5rem',
marginLeft: '1rem',
fontSize: '1.2em',
fontWeight: 'lighter',
textDecoration: 'none',
Expand Down