PluginProbe
Code Snippets / 4.0.0-beta.2
Code Snippets v4.0.0-beta.2
4.0.0-beta.2 3.10.2 3.10.1 3.10.0 3.10.0-beta.2 3.10.0-beta.1 4.0.0-beta.1 3.9.6 trunk 2.10.0 2.10.1 2.12.0 2.12.1 2.13.0 2.13.1 2.13.2 2.13.3 2.14.0 2.14.1 2.14.2 2.14.3 2.14.4 2.14.5 2.14.6 3.0.0 All 65 releases
code-snippets / css / common / list-table / _responsive.scss

_responsive.scss in Code Snippets 4.0.0-beta.2, at css/common/list-table/_responsive.scss

194 lines 4.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use '../theme';
2
3 // Toolbar squeeze: above the tablet collapse (see below) the row never wraps;
4 // components shrink instead (flex-wrap would otherwise win before flex-shrink
5 // ever engages). Between 782px and 1400px the pagination and view toggle, which
6 // cannot shrink, force the row onto two lines; below 782px wrapping is the
7 // small-screen fallback.
8 .snippets-list-view .tablenav {
9 flex-wrap: wrap;
10
11 @media (width > 782px) {
12 flex-wrap: nowrap;
13 }
14
15 .alignleft.actions {
16 display: flex;
17 align-items: center;
18 gap: 8px;
19 float: none;
20 margin: 0;
21 padding: 0;
22 flex: 0 1 auto;
23 min-inline-size: 0;
24
25 select {
26 inline-size: auto;
27 flex: 0 1 auto;
28 min-inline-size: 170px;
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: 5px;
90 }
91
92 a.button {
93 color: var(--cs-color-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: var(--cs-color-text);
108 }
109
110 .tablenav-paging-text {
111 font-size: 14px;
112 color: var(--cs-color-text-muted);
113 }
114 }
115
116 .tablenav-pages .displaying-num {
117 font-size: 14px;
118 color: var(--cs-color-text-muted);
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 // The pagination and view toggle cannot shrink, so the group must not be
129 // asked to: letting it shrink pushed the toggle out of the toolbar (and
130 // off the page edge in RTL) between the tablet collapse and about 1400px.
131 .tablenav-end-group {
132 flex: 0 0 auto;
133 min-inline-size: fit-content;
134 }
135
136 // The item count is the first thing to give way when space runs short.
137 @media (width <= 1240px) {
138 .tablenav-pages .displaying-num {
139 display: none;
140 }
141 }
142 }
143
144 // Tablet collapse (iPad-class widths): rather than let the single toolbar row
145 // overflow, break the top toolbar onto two rows. Row one keeps the working
146 // controls — bulk actions, the tag filter and the search box (stretched to
147 // fill the remainder). Row two carries the selection + navigation cluster:
148 // "Select all" at the start, the pagination + view-toggle group pinned to the
149 // end. A forced full-width break keeps the split deterministic regardless of
150 // content width.
151 @media (782px < width <= 1400px) {
152 .snippets-list-view .tablenav.top {
153 flex-wrap: wrap;
154 row-gap: 8px;
155
156 // Both rows spread edge-to-edge: the first control sits at the start,
157 // the last at the end, with the slack distributed between.
158 justify-content: space-between;
159
160 // Row one: bulk actions, tag filter, search — at its design width so the
161 // space-between slack lands in the gaps rather than stretching the field.
162 .bulkactions {
163 order: 1;
164 }
165
166 .alignleft.actions:not(.bulkactions) {
167 order: 2;
168 }
169
170 .snippets-search-area {
171 order: 3;
172 flex: 0 1 237px;
173 inline-size: 237px;
174 max-inline-size: 100%;
175 }
176
177 &::after {
178 content: '';
179 order: 4;
180 flex-basis: 100%;
181 block-size: 0;
182 }
183
184 // Row two: select all at the start, pagination + view-toggle at the end.
185 .tablenav-select-all {
186 order: 5;
187 }
188
189 .tablenav-end-group {
190 order: 6;
191 }
192 }
193 }
194