Skip to content

Commit 5fef0bc

Browse files
authored
Further crossword print layout optimisation (#13667)
* Additional print overrides to optimise layout * Update max width of grid
1 parent 2e56467 commit 5fef0bc

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

dotcom-rendering/src/components/CrosswordComponent.importable.tsx

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@ import type { CrosswordProps } from '@guardian/react-crossword-next';
44
import {
55
between,
66
from,
7+
headlineBold14,
78
headlineBold17,
89
space,
10+
textSans12,
911
textSans14,
1012
textSansItalic12,
1113
} from '@guardian/source/foundations';
@@ -29,6 +31,12 @@ const CluesHeader = memo(({ children }: { children: ReactNode }) => {
2931
height: 2em;
3032
margin-bottom: 0.5em;
3133
text-transform: capitalize;
34+
@media print {
35+
${headlineBold14};
36+
border: none;
37+
height: auto;
38+
margin-bottom: 0.25em;
39+
}
3240
`}
3341
>
3442
{children}
@@ -114,6 +122,11 @@ const Layout: CrosswordProps['Layout'] = ({
114122
<div
115123
css={css`
116124
flex-basis: ${gridWidth}px;
125+
@media print {
126+
flex-basis: auto;
127+
max-width: 400px;
128+
max-height: 400px;
129+
}
117130
`}
118131
>
119132
<FocusedClue
@@ -211,6 +224,7 @@ const Layout: CrosswordProps['Layout'] = ({
211224
}
212225
@media print {
213226
flex-direction: row;
227+
${textSans12};
214228
}
215229
`}
216230
>

dotcom-rendering/src/layouts/CrosswordLayout.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,17 @@ const CrosswordGrid = ({ children }: { children: React.ReactNode }) => (
7171
'meta instructions .'
7272
'body body right-column';
7373
}
74+
75+
@media print {
76+
grid-template-columns: 1fr;
77+
grid-template-areas:
78+
'title'
79+
'headline'
80+
'standfirst'
81+
'meta'
82+
'instructions'
83+
'body';
84+
}
7485
`}
7586
>
7687
{children}

0 commit comments

Comments
 (0)