|
159 | 159 | ref="resultsContainer" |
160 | 160 | class="unified-search-modal__results" |
161 | 161 | :class="{ 'unified-search-modal__results--held': heldHeight !== null }" |
162 | | - :style="heldHeight !== null ? { blockSize: `${heldHeight}px`, boxSizing: 'border-box' } : undefined"> |
| 162 | + :style="heldHeight !== null ? { minBlockSize: `${heldHeight}px`, boxSizing: 'border-box' } : undefined"> |
163 | 163 | <h3 class="hidden-visually"> |
164 | 164 | {{ t('core', 'Results') }} |
165 | 165 | </h3> |
@@ -1807,20 +1807,30 @@ export default defineComponent({ |
1807 | 1807 | min-height: 0; |
1808 | 1808 | overflow: hidden auto; |
1809 | 1809 |
|
1810 | | - // The placeholders deliberately overfill, so the bottom fades out over the cut. |
| 1810 | + // The reserved height is a floor, not a size. Column layout so the placeholders can |
| 1811 | + // take what the results leave. |
1811 | 1812 | &--held { |
| 1813 | + display: flex; |
| 1814 | + flex-direction: column; |
1812 | 1815 | flex-grow: 0; |
1813 | | - overflow: clip; |
1814 | | - // Capped, so a short box does not spend a third of itself fading. |
1815 | | - mask-image: linear-gradient(to bottom, #000 calc(100% - min(2lh, 25%)), transparent); |
| 1816 | +
|
| 1817 | + > *:not(.search-result-skeleton) { |
| 1818 | + flex: none; |
| 1819 | + } |
1816 | 1820 | } |
1817 | 1821 | // Adjust padding to match container but keep the scrollbar on the very end |
1818 | 1822 | padding-inline: calc(var(--default-grid-baseline) * 4); |
1819 | 1823 | padding-block: 0 calc(var(--default-grid-baseline) * 4); |
1820 | 1824 |
|
1821 | | - // Matches the gap a category title keeps above itself. |
1822 | 1825 | .search-result-skeleton { |
| 1826 | + // Matches the gap a category title keeps above itself. |
1823 | 1827 | margin-block-start: 14px; |
| 1828 | + // The placeholders deliberately overfill, so the bottom fades out over the cut. |
| 1829 | + flex: 1 1 0; |
| 1830 | + min-block-size: 0; |
| 1831 | + overflow: clip; |
| 1832 | + // Capped, so a short box does not spend a third of itself fading. |
| 1833 | + mask-image: linear-gradient(to bottom, #000 calc(100% - min(2lh, 25%)), transparent); |
1824 | 1834 | } |
1825 | 1835 |
|
1826 | 1836 | .result { |
@@ -1891,7 +1901,7 @@ export default defineComponent({ |
1891 | 1901 |
|
1892 | 1902 | // Ensure modal is accessible on small devices |
1893 | 1903 | @media only screen and (max-height: 400px) { |
1894 | | - .unified-search-modal__results:not(.unified-search-modal__results--held) { |
| 1904 | + .unified-search-modal__results { |
1895 | 1905 | overflow: unset; |
1896 | 1906 | } |
1897 | 1907 | } |
|
0 commit comments