|
1 | 1 | // Import NHS.UK frontend library |
2 | 2 | @forward "nhsuk-frontend/dist/nhsuk/nhsuk"; |
| 3 | +@use "nhsuk-frontend/dist/nhsuk/core" as *; |
3 | 4 |
|
4 | 5 | // Stolen Manage prototype components :P |
5 | 6 | // https://github.com/NHSDigital/manage-breast-screening-prototype |
|
12 | 13 | justify-content: space-between; |
13 | 14 | align-items: baseline; |
14 | 15 | } |
| 16 | + |
| 17 | +// Batch (for now) view bar charts and legends |
| 18 | + |
| 19 | +:root { |
| 20 | + --generic-chart-hatch: repeating-linear-gradient(45deg, #005eb8, #005eb8 1px, #ccdff1 1px, #ccdff1 12px); |
| 21 | + --standard-chart-hatch: repeating-linear-gradient(45deg, #004c23, #004c23 1px, #cce5d8 1px, #cce5d8 12px); |
| 22 | + --special-chart-hatch: repeating-linear-gradient(-45deg, #4d3708, #4d3708 1px, #ffdc8e 1px, #ffdc8e 12px); |
| 23 | + --vhr-chart-hatch-1: repeating-linear-gradient(-45deg, #6b140e, #6b140e 1px, transparent 1px, transparent 12px); |
| 24 | + --vhr-chart-hatch-2: repeating-linear-gradient(45deg, #6b140e, #6b140e 1px, #f7d4d1 1px, #f7d4d1 12px); |
| 25 | +} |
| 26 | + |
| 27 | +.hatching--standard { |
| 28 | + background: var(--standard-chart-hatch) |
| 29 | +} |
| 30 | +.hatching--special { |
| 31 | + background: var(--special-chart-hatch), |
| 32 | +} |
| 33 | +.hatching--high-risk { |
| 34 | + background: var(--vhr-chart-hatch-1), var(--vhr-chart-hatch-2) |
| 35 | +} |
| 36 | + |
| 37 | +.app-chart-bar-segmented-horizontal { |
| 38 | + margin: 0; |
| 39 | + /* Turn the table tbody into a single horizontal bar */ |
| 40 | + tbody { |
| 41 | + display: flex; |
| 42 | + width: 100%; |
| 43 | + height: 3rem; |
| 44 | + overflow: hidden; |
| 45 | + } |
| 46 | + /* Each row becomes a segment, sized by its proportion of the total */ |
| 47 | + tbody tr { |
| 48 | + display: flex; |
| 49 | + align-items: center; |
| 50 | + justify-content: left; |
| 51 | + overflow: hidden; |
| 52 | + } |
| 53 | +} |
| 54 | +.app-chart-bar-segmented-horizontal--legend { |
| 55 | + @include nhsuk-media-query($from: tablet) { |
| 56 | + display: flex; |
| 57 | + flex-direction: row; |
| 58 | + flex-wrap: wrap; |
| 59 | + gap: 1.5rem; |
| 60 | + align-items: flex-start; |
| 61 | + |
| 62 | + li { |
| 63 | + display: flex; |
| 64 | + flex-direction: row; |
| 65 | + align-items: flex-start; |
| 66 | + gap: 8px; |
| 67 | + } |
| 68 | + } |
| 69 | + .swatch { |
| 70 | + display: inline-block; |
| 71 | + width: 2rem; |
| 72 | + height: 2rem; |
| 73 | + flex-shrink: 0; |
| 74 | + margin-right: 6px; |
| 75 | + vertical-align: middle; |
| 76 | + } |
| 77 | +} |
| 78 | + |
| 79 | +.app-batch-overview-sparkline { |
| 80 | + background-color: #fff; |
| 81 | +} |
| 82 | +.app-u-one-left-one-right { |
| 83 | + display: flex; |
| 84 | + justify-content: space-between; |
| 85 | + align-items: center; |
| 86 | + width: 100%; |
| 87 | +} |
| 88 | + |
| 89 | +.app-simple-progress-bar { |
| 90 | + width: 100%; |
| 91 | + min-width: 200px; |
| 92 | + height: 3rem; |
| 93 | + |
| 94 | + &.--thin { |
| 95 | + height: auto; |
| 96 | + } |
| 97 | + |
| 98 | + &.--generic { |
| 99 | + background: var(--generic-chart-hatch) 0 0 / var(--percentage) 100% no-repeat,#fff; |
| 100 | + } |
| 101 | + |
| 102 | + &.--standard { |
| 103 | + background: var(--standard-chart-hatch) 0 0 / var(--percentage) 100% no-repeat,#fff; |
| 104 | + } |
| 105 | + &.--special { |
| 106 | + background: var(--special-chart-hatch) 0 0 / var(--percentage) 100% no-repeat,#fff; |
| 107 | + } |
| 108 | + &.--vhr { |
| 109 | + background: var(--vhr-chart-hatch-1) 0 0 / var(--percentage) 100% no-repeat, var(--vhr-chart-hatch-2) 0 0 / var(--percentage) 100% no-repeat,#fff; |
| 110 | + } |
| 111 | +} |
0 commit comments