| 1 |
@use '../theme'; |
| 2 |
|
| 3 |
// Toolbar squeeze: above the mobile breakpoint the row never wraps — |
| 4 |
// components shrink gracefully instead (flex-wrap would otherwise win |
| 5 |
// before flex-shrink ever engages). Wrapping remains the small-screen |
| 6 |
// fallback only. |
| 7 |
.snippets-list-view .tablenav { |
| 8 |
flex-wrap: wrap; |
| 9 |
|
| 10 |
@media (width > 782px) { |
| 11 |
flex-wrap: nowrap; |
| 12 |
} |
| 13 |
|
| 14 |
.alignleft.actions { |
| 15 |
display: flex; |
| 16 |
align-items: center; |
| 17 |
gap: 8px; |
| 18 |
float: none; |
| 19 |
margin: 0; |
| 20 |
padding: 0; |
| 21 |
flex: 0 1 auto; |
| 22 |
min-inline-size: 0; |
| 23 |
|
| 24 |
select { |
| 25 |
inline-size: auto; |
| 26 |
flex: 1 1 154px; |
| 27 |
min-inline-size: 104px; |
| 28 |
max-inline-size: 154px; |
| 29 |
} |
| 30 |
} |
| 31 |
|
| 32 |
.tablenav-select-all { |
| 33 |
flex-shrink: 0; |
| 34 |
} |
| 35 |
|
| 36 |
.snippets-search-area { |
| 37 |
inline-size: auto; |
| 38 |
flex: 1 1 237px; |
| 39 |
min-inline-size: 150px; |
| 40 |
max-inline-size: 237px; |
| 41 |
|
| 42 |
// The inner search row never wraps — the field shrinks instead. |
| 43 |
search, |
| 44 |
form, |
| 45 |
p.search-box { |
| 46 |
display: flex; |
| 47 |
align-items: center; |
| 48 |
flex-wrap: nowrap; |
| 49 |
gap: 8px; |
| 50 |
min-inline-size: 0; |
| 51 |
margin: 0; |
| 52 |
} |
| 53 |
|
| 54 |
input[type='search']='search'] { |
| 55 |
min-inline-size: 110px; |
| 56 |
} |
| 57 |
|
| 58 |
.button { |
| 59 |
flex: 0 0 auto; |
| 60 |
} |
| 61 |
} |
| 62 |
|
| 63 |
// Pagination labels stay on one line while the row squeezes. |
| 64 |
.tablenav-pages, |
| 65 |
.tablenav-pages .paging-input, |
| 66 |
.tablenav-pages .tablenav-paging-text { |
| 67 |
white-space: nowrap; |
| 68 |
flex-wrap: nowrap; |
| 69 |
} |
| 70 |
|
| 71 |
// Square pagination tiles with a compact page-number box between them. |
| 72 |
// Enabled arrows pick up the accent border/text from the shared control |
| 73 |
// styling; disabled arrows keep the native WordPress treatment. |
| 74 |
.pagination-links { |
| 75 |
display: flex; |
| 76 |
align-items: center; |
| 77 |
gap: 4px; |
| 78 |
|
| 79 |
.button { |
| 80 |
display: inline-flex; |
| 81 |
align-items: center; |
| 82 |
justify-content: center; |
| 83 |
inline-size: 38px; |
| 84 |
block-size: 38px; |
| 85 |
min-block-size: 38px; |
| 86 |
box-sizing: border-box; |
| 87 |
padding: 0; |
| 88 |
margin: 0; |
| 89 |
border-radius: 5.6px; |
| 90 |
} |
| 91 |
|
| 92 |
a.button { |
| 93 |
color: theme.$accent; |
| 94 |
} |
| 95 |
|
| 96 |
.paging-input { |
| 97 |
gap: 8px; |
| 98 |
margin-inline: 4px; |
| 99 |
} |
| 100 |
|
| 101 |
.current-page { |
| 102 |
inline-size: 45px; |
| 103 |
min-block-size: 38px; |
| 104 |
box-sizing: border-box; |
| 105 |
margin: 0; |
| 106 |
text-align: center; |
| 107 |
color: #2c3337; |
| 108 |
} |
| 109 |
|
| 110 |
.tablenav-paging-text { |
| 111 |
font-size: 14px; |
| 112 |
color: #646970; |
| 113 |
} |
| 114 |
} |
| 115 |
|
| 116 |
.tablenav-pages .displaying-num { |
| 117 |
font-size: 14px; |
| 118 |
color: #646970; |
| 119 |
white-space: nowrap; |
| 120 |
} |
| 121 |
|
| 122 |
// The trailing float-clearing break would otherwise register as an |
| 123 |
// empty flex item and contribute a stray column gap. |
| 124 |
br.clear { |
| 125 |
display: none; |
| 126 |
} |
| 127 |
|
| 128 |
.tablenav-end-group { |
| 129 |
flex: 0 1 auto; |
| 130 |
min-inline-size: 0; |
| 131 |
} |
| 132 |
|
| 133 |
// The item count is the first thing to give way when space runs short. |
| 134 |
@media (width <= 1240px) { |
| 135 |
.tablenav-pages .displaying-num { |
| 136 |
display: none; |
| 137 |
} |
| 138 |
} |
| 139 |
} |
| 140 |
|
| 141 |
// Tablet collapse (iPad-class widths): rather than let the single toolbar row |
| 142 |
// overflow, break the top toolbar onto two rows. Row one keeps the working |
| 143 |
// controls — bulk actions, the tag filter and the search box (stretched to |
| 144 |
// fill the remainder). Row two carries the selection + navigation cluster: |
| 145 |
// "Select all" at the start, the pagination + view-toggle group pinned to the |
| 146 |
// end. A forced full-width break keeps the split deterministic regardless of |
| 147 |
// content width. |
| 148 |
@media (782px < width <= 1210px) { |
| 149 |
.snippets-list-view .tablenav.top { |
| 150 |
flex-wrap: wrap; |
| 151 |
row-gap: 8px; |
| 152 |
|
| 153 |
// Both rows spread edge-to-edge: the first control sits at the start, |
| 154 |
// the last at the end, with the slack distributed between. |
| 155 |
justify-content: space-between; |
| 156 |
|
| 157 |
// Row one: bulk actions, tag filter, search — at its design width so the |
| 158 |
// space-between slack lands in the gaps rather than stretching the field. |
| 159 |
.bulkactions { |
| 160 |
order: 1; |
| 161 |
} |
| 162 |
|
| 163 |
.alignleft.actions:not(.bulkactions) { |
| 164 |
order: 2; |
| 165 |
} |
| 166 |
|
| 167 |
.snippets-search-area { |
| 168 |
order: 3; |
| 169 |
flex: 0 1 237px; |
| 170 |
inline-size: 237px; |
| 171 |
max-inline-size: 100%; |
| 172 |
} |
| 173 |
|
| 174 |
&::after { |
| 175 |
content: ''; |
| 176 |
order: 4; |
| 177 |
flex-basis: 100%; |
| 178 |
block-size: 0; |
| 179 |
} |
| 180 |
|
| 181 |
// Row two: select all at the start, pagination + view-toggle at the end. |
| 182 |
.tablenav-select-all { |
| 183 |
order: 5; |
| 184 |
} |
| 185 |
|
| 186 |
.tablenav-end-group { |
| 187 |
order: 6; |
| 188 |
} |
| 189 |
} |
| 190 |
} |
| 191 |
|