|
70 | 70 |
|
71 | 71 | /// Responsive table |
72 | 72 | /// |
73 | | -/// 1. Hiding the thead on mobile |
74 | | -/// 2. Displaying the thead on desktop |
75 | | -/// 3. Removing default screen reader behaviour |
76 | | -/// 4. Assigning role of table-row on desktop to give default screen reader behaviour |
77 | | -/// 5. Using justify content to space out elements in the row on mobile |
78 | | -/// 6. Assigning a minimum width in case of black cell |
79 | | -/// 7. Aligning content to the right on mobile |
80 | | -/// 8. Aligning mobile header to left to split it from the data |
81 | | -/// 9. Hiding mobile specific header from desktop view |
82 | | -/// 10. Adding a display block value due to IE 11 not having full flex support |
| 73 | +/// 1. Hide the thead until desktop |
| 74 | +/// 2. Removing default screen reader behaviour |
| 75 | +/// 3. Assigning role of table-row on desktop to give default screen reader behaviour |
| 76 | +/// 4. Using justify content to space out elements in the row on mobile |
| 77 | +/// 5. Assigning a minimum width in case of black cell |
| 78 | +/// 6. Aligning content to the right on mobile |
| 79 | +/// 7. Aligning mobile header to left to split it from the data |
| 80 | +/// 8. Hiding mobile specific header from desktop view |
| 81 | +/// 9. Adding a display block value due to IE 11 not having full flex support |
83 | 82 |
|
84 | 83 | .nhsuk-table-responsive { |
85 | 84 | margin-bottom: 0; |
86 | 85 | width: 100%; |
87 | 86 |
|
88 | 87 | thead { |
89 | | - @include visually-hidden; // [1] |
90 | | - |
91 | | - @include mq($from: desktop) { |
92 | | - @include visually-shown($display: table-header-group); // [2] |
93 | | - |
94 | | - &::before, |
95 | | - &::after { |
96 | | - content: ""; |
97 | | - } |
| 88 | + @include mq($until: desktop) { |
| 89 | + @include visually-hidden; // [1] |
98 | 90 | } |
99 | 91 | } |
100 | 92 |
|
|
0 commit comments