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

[blog] Fix display on Safari #33102

Merged
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
5 changes: 1 addition & 4 deletions docs/pages/blog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,7 @@ export default function Blog(props: InferGetStaticPropsType<typeof getStaticProp
/>
<AppHeader />
<main>
<Section
bg="gradient"
sx={{ backgroundSize: 'auto 300px ', backgroundRepeat: 'no-repeat' }}
>
<Section bg="gradient" sx={{ backgroundSize: '100% 300px', backgroundRepeat: 'no-repeat' }}>
<Typography variant="body2" color="primary.600" fontWeight="bold" textAlign="center">
Blog
</Typography>
Expand Down
6 changes: 2 additions & 4 deletions docs/src/components/home/HeroEnd.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Container from '@mui/material/Container';
const Placeholder = () => <Box sx={{ height: { xs: 587, sm: 303, md: 289 } }} />;
const StartToday = dynamic(() => import('./StartToday'), { loading: Placeholder });

const HeroEnd = () => {
export default function HeroEnd() {
const { ref, inView } = useInView({
triggerOnce: true,
threshold: 0,
Expand All @@ -28,6 +28,4 @@ const HeroEnd = () => {
</Container>
</Box>
);
};

export default HeroEnd;
}
17 changes: 10 additions & 7 deletions docs/src/layouts/Section.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ import * as React from 'react';
import Container from '@mui/material/Container';
import Box, { BoxProps } from '@mui/material/Box';

export default function Section({
bg = 'white',
...props
}: { bg?: 'white' | 'comfort' | 'dim' | 'gradient' } & BoxProps) {
interface SelectionProps extends BoxProps {
bg?: 'white' | 'comfort' | 'dim' | 'gradient';
}

export default function Section(props: SelectionProps) {
const { bg = 'white', children, sx, ...other } = props;

const map = {
white: {
light: 'common.white',
Expand All @@ -22,7 +25,7 @@ export default function Section({
};
return (
<Box
{...props}
{...other}
sx={{
...(bg === 'gradient'
? {
Expand All @@ -36,10 +39,10 @@ export default function Section({
}),
py: { xs: 4, sm: 6, md: 8 },
overflow: 'hidden',
...props.sx,
...sx,
}}
>
<Container>{props.children}</Container>
<Container>{children}</Container>
</Box>
);
}
2 changes: 1 addition & 1 deletion docs/src/modules/components/TopLayoutBlog.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const styles = ({ theme }) => ({
theme.palette.mode === 'dark'
? `linear-gradient(180deg, ${theme.palette.primaryDark[900]} 0%, #001E3C 100%)`
: `linear-gradient(180deg, ${theme.palette.grey[50]} 0%, #FFFFFF 100%)`,
backgroundSize: 'auto 250px ',
backgroundSize: '100% 300px',
backgroundRepeat: 'no-repeat',
[`& .${classes.back}`]: {
display: 'flex',
Expand Down