|
22 | 22 | } |
23 | 23 |
|
24 | 24 | // View wrapper — one per standard mammogram view (e.g. RCC, RMLO) |
25 | | -.app-mammogram-view--right, |
26 | | -.app-mammogram-view--left { |
27 | | - // Spacing between consecutive views |
28 | | - &:not(:last-child) { |
29 | | - @include nhsuk-responsive-margin(4, "bottom"); |
30 | | - } |
| 25 | +// .app-mammogram-views is the flex container we own; gap handles spacing between views |
| 26 | +.app-mammogram-views { |
| 27 | + display: flex; |
| 28 | + flex-direction: column; |
| 29 | + gap: 16px; |
31 | 30 |
|
32 | | - // Spacing between multiple images of the same view |
33 | | - .app-mammogram-thumbnail__image-wrapper + .app-mammogram-thumbnail__image-wrapper { |
34 | | - @include nhsuk-responsive-margin(4, "top"); |
| 31 | + @include nhsuk-media-query($from: tablet) { |
| 32 | + gap: 24px; |
35 | 33 | } |
36 | 34 | } |
37 | 35 |
|
38 | | -// Headings (view label text e.g. "1× RCC") align towards centre |
| 36 | +// Right align text for images on the left as images get 'bookmatched' - aligned to inner edge. |
39 | 37 | .app-mammogram-view--right h3 { |
40 | 38 | text-align: right; |
41 | 39 | } |
|
45 | 43 | display: inline-grid; |
46 | 44 | grid-template-columns: auto auto; |
47 | 45 | gap: 8px; |
| 46 | + |
| 47 | + // Match the tighter grid gap for same-view images within the reading layout |
| 48 | + .app-mammogram-thumbnail { |
| 49 | + gap: 8px; |
| 50 | + } |
48 | 51 | } |
49 | 52 |
|
50 | 53 | // Right and left breast thumbnail columns |
51 | | -.app-mammogram-thumbnail--right { |
| 54 | +.app-mammogram-thumbnail { |
52 | 55 | display: flex; |
53 | 56 | flex-direction: column; |
| 57 | + gap: 16px; |
| 58 | + |
| 59 | + @include nhsuk-media-query($from: tablet) { |
| 60 | + gap: 24px; |
| 61 | + } |
| 62 | +} |
| 63 | + |
| 64 | +.app-mammogram-thumbnail--right { |
54 | 65 | align-items: flex-end; |
55 | 66 | } |
56 | 67 |
|
57 | 68 | .app-mammogram-thumbnail--left { |
58 | | - display: flex; |
59 | | - flex-direction: column; |
60 | 69 | align-items: flex-start; |
61 | 70 | } |
62 | 71 |
|
|
116 | 125 | z-index: 1; |
117 | 126 | } |
118 | 127 |
|
119 | | -// Labels align to outer edge - right breast labels on left, left breast labels on right |
| 128 | +// Labels align to outer edge - right breast labels on left, left breast labels on right - so they're bookmatched. |
120 | 129 | .app-mammogram-thumbnail--right .app-mammogram-thumbnail__label { |
121 | 130 | left: 4px; |
122 | 131 | } |
|
126 | 135 | } |
127 | 136 |
|
128 | 137 | // Missing image placeholder |
| 138 | +// Shown before an image has loaded in or where a standard view wasn't taken. |
129 | 139 | .app-mammogram-thumbnail__missing { |
130 | 140 | width: 100%; |
131 | 141 | height: 100%; |
|
138 | 148 | } |
139 | 149 |
|
140 | 150 | .app-mammogram-thumbnail__missing-text { |
| 151 | + // TODO: should we be doing something better for font sizing here? |
141 | 152 | font-size: 16px; |
142 | 153 | color: nhsuk-colour("grey-2"); |
143 | 154 | } |
144 | 155 |
|
145 | 156 | // Spinner shown briefly while an image loads during streaming |
| 157 | +// TODO: is there a standard NHS spinner we should be using here? |
146 | 158 | @keyframes mammogram-spin { |
147 | 159 | to { |
148 | 160 | transform: rotate(360deg); |
|
0 commit comments