Skip to content

Commit

Permalink
feat: Reduced colour fill print css (#3459)
Browse files Browse the repository at this point in the history
  • Loading branch information
ianjon3s authored Jul 26, 2024
1 parent 836503b commit 28a7c4d
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 4 deletions.
4 changes: 4 additions & 0 deletions editor.planx.uk/src/components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ const Root = styled("footer")(({ theme }) => ({
[theme.breakpoints.up("md")]: {
padding: theme.spacing(3, 0),
},
"@media print": {
color: theme.palette.common.black,
backgroundColor: theme.palette.common.white,
},
}));

const ButtonGroup = styled(Box)(({ theme }) => ({
Expand Down
14 changes: 11 additions & 3 deletions editor.planx.uk/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,14 @@ const Logo = styled("img")(() => ({
objectFit: "contain",
}));

const LogoLink = styled(Link)(() => ({
const LogoLink = styled(Link)(({ theme }) => ({
display: "flex",
alignItems: "center",
"&:focus-visible": borderedFocusStyle,
"@media print": {
backgroundColor: theme.palette.common.black,
padding: "0.25em",
},
}));

const SkipLink = styled("a")(({ theme }) => ({
Expand Down Expand Up @@ -378,8 +382,9 @@ const PublicToolbar: React.FC<{
aria-label="Restart Application"
size="large"
aria-describedby="restart-application-description"
sx={{ "@media print": { color: "black" } }}
>
<Reset color="secondary" />
<Reset color="inherit" />
<Typography
id="restart-application-description"
variant="body2"
Expand Down Expand Up @@ -580,7 +585,10 @@ const Header: React.FC = () => {
elevation={0}
color="transparent"
ref={headerRef}
style={{ backgroundColor: theme?.primaryColour || "#2c2c2c" }}
sx={{
backgroundColor: theme?.primaryColour || "#2c2c2c",
"@media print": { backgroundColor: "white", color: "black" },
}}
>
<Toolbar headerRef={headerRef}></Toolbar>
</Root>
Expand Down
12 changes: 11 additions & 1 deletion editor.planx.uk/src/pages/layout/PublicLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,17 @@ const PublicFooter: React.FC = () => {
<Feedback />
<Footer items={[...footerItems]}>
<Box display="flex" alignItems="center">
<Box pr={2} display="flex">
<Box
pr={2}
display="flex"
sx={{
"@media print": {
backgroundColor: "black",
padding: "0.5em",
margin: "0.5em",
},
}}
>
<img src={Logo} alt="Open Government License Logo" />
</Box>
<Typography variant="body2">
Expand Down

0 comments on commit 28a7c4d

Please sign in to comment.