PluginProbe
Code Snippets / 3.10.0-beta.1
Code Snippets v3.10.0-beta.1
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 / _layout.scss

_layout.scss in Code Snippets 3.10.0-beta.1, at css/common/list-table/_layout.scss

319 lines 6.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 @use '../badges';
2 @use '../checkbox';
3 @use '../theme';
4
5 .column-name {
6 .extra-icons {
7 float: inline-end;
8 display: flex;
9 flex-wrap: wrap;
10 gap: 5px;
11 }
12
13 .dashicons-lock {
14 color: #646970;
15 opacity: 0.7;
16
17 &:hover {
18 opacity: 1;
19 }
20 }
21 }
22
23 .active-snippet {
24 td, th {
25 background-color: rgb(120 200 230 / 6%);
26 }
27
28 th.check-column {
29 border-inline-start: 2px solid #2ea2cc;
30 }
31
32 .column-name > .snippet-name {
33 font-weight: 600;
34 }
35 }
36
37 .inactive-snippet {
38 @include theme.link-colors(#579);
39 }
40
41 .paging-input {
42 display: inline-flex;
43 align-items: center;
44 gap: 2px;
45 }
46
47 .wp-list-table {
48 .check-column input[type='checkbox']='checkbox'] {
49 @include checkbox.canonical;
50 }
51
52 // Shared horizontal rhythm for every snippet table, so the cloud table lines
53 // up with the snippets table rather than keeping the wider WordPress default.
54 th:not(.check-column),
55 td:not(.check-column) {
56 padding-inline: 9px;
57 }
58
59 td.column-id {
60 text-align: center;
61 }
62
63 tr {
64 background: #fff;
65 }
66
67 ol, ul {
68 margin-block: 0 1.5em;
69 margin-inline: 1.5em 0;
70 }
71
72 ul {
73 list-style: disc;
74 }
75
76 .sortable-column-title {
77 display: flex;
78 }
79
80 th.sortable .list-table-sort-button,
81 th.sorted .list-table-sort-button {
82 display: flex;
83 flex-direction: row;
84 align-items: center;
85 inline-size: 100%;
86 margin: 0;
87 border: none;
88 background: none;
89 font: inherit;
90 color: theme.$accent;
91 cursor: pointer;
92 text-align: start;
93 overflow: hidden;
94 padding-block: 8px;
95 padding-inline: 0;
96 }
97
98 th.sortable .list-table-sort-button:focus-visible,
99 th.sorted .list-table-sort-button:focus-visible {
100 outline: 2px solid theme.$accent;
101 outline-offset: 2px;
102 border-radius: 2px;
103 }
104
105 // The type badge is wrapped in an unclassed link that lays out as an inline
106 // box shorter than the badge, so wrap the badge exactly and draw our own
107 // focus ring: the inherited one resolves to a transparent outline.
108 .column-type a {
109 @include badges.badge-link;
110 }
111
112 .row-actions {
113 color: #646970;
114 position: relative;
115 inset-inline-start: 0;
116
117 a:not(.delete) {
118 color: theme.$accent;
119
120 &:hover,
121 &:focus {
122 color: theme.$accent-hover;
123 }
124 }
125
126 // Row-action buttons render as plain inline links. On WP 7.0 the generic `.button`
127 // compatibility styling would otherwise give them a fill, border, radius and fixed
128 // height, so fully neutralise it here (this rule is emitted after the wp-admin layer
129 // at equal specificity, so it wins). Non-delete links inherit the accent text colour.
130 .button-link {
131 block-size: auto;
132 min-block-size: 0;
133 padding: 0;
134 border: 0;
135 border-radius: 0;
136 background: none;
137 box-shadow: none;
138 line-height: inherit;
139 font-weight: 400;
140 color: theme.$accent;
141
142 &:hover:not(:disabled),
143 &:focus:not(:disabled) {
144 background: none;
145 border: 0;
146 box-shadow: none;
147 }
148
149 &:hover:not(:disabled, .delete, .snippet-cloud-update),
150 &:focus:not(:disabled, .delete, .snippet-cloud-update) {
151 color: theme.$accent-hover;
152 }
153
154 &.delete {
155 color: #b32d2e;
156 }
157
158 &.snippet-cloud-update {
159 color: #ff851b;
160 }
161 }
162
163 .snippet-row-action-feedback,
164 .snippet-row-action-error {
165 display: inline-flex;
166 align-items: center;
167 gap: .5em;
168
169 .components-spinner {
170 margin: 0;
171 inline-size: 1em;
172 block-size: 1em;
173 }
174 }
175
176 .snippet-row-action-error {
177 color: #b32d2e;
178 }
179
180 .delete.disabled {
181 color: #a7aaad;
182 cursor: not-allowed;
183 pointer-events: none;
184 }
185 }
186
187 .column-activate {
188 text-align: center;
189
190 .snippet-activation-switch,
191 input[type='checkbox']='checkbox'].switch {
192 margin-inline: auto;
193 }
194 }
195
196 .clear-filters {
197 vertical-align: middle;
198 }
199
200 thead th.check-column,
201 thead td.check-column,
202 tfoot th.check-column,
203 tfoot td.check-column,
204 tbody th.check-column,
205 tbody td.check-column {
206 padding-block: 0;
207 padding-inline-start: 9px;
208 vertical-align: middle;
209 }
210
211 // Line every checkbox up on the same starting edge. Rows flagged as active
212 // draw a 2px accent border on this cell, so the same width is reserved as a
213 // transparent border elsewhere; without it the header, footer and inactive
214 // rows sit 2px further in, and rows shift as snippets are toggled.
215 thead th.check-column,
216 thead td.check-column,
217 tfoot th.check-column,
218 tfoot td.check-column,
219 tbody tr:not(.active-snippet) th.check-column,
220 tbody tr:not(.active-snippet) td.check-column {
221 border-inline-start: 2px solid transparent;
222 }
223
224 .active-snippet, .inactive-snippet {
225 td, th {
226 padding: 10px 9px;
227 box-shadow: inset 0 -1px 0 rgb(0 0 0 / 10%);
228 vertical-align: middle;
229 }
230 }
231
232 tr.active-snippet + tr.inactive-snippet th,
233 tr.active-snippet + tr.inactive-snippet td {
234 border-block-start: 1px solid rgb(0 0 0 / 3%);
235 box-shadow: inset 0 1px 0 rgb(0 0 0 / 2%), inset 0 -1px 0 #e1e1e1;
236 }
237
238 .delete {
239 color: #b32d2e;
240 }
241
242 a.delete:not(.disabled) {
243 &:hover, &:focus, &:active {
244 border-block-end: 1px solid #f00;
245 color: #f00;
246 }
247 }
248
249 td.column-date, th.column-date {
250 white-space: nowrap;
251 inline-size: 130px; /* fixed column width */
252 min-inline-size: 130px;
253 max-inline-size: 130px;
254 text-align: end;
255 overflow: hidden;
256 text-overflow: ellipsis;
257 }
258
259 td.column-date .modified-column-content {
260 display: block;
261 text-align: start;
262 }
263
264 // Snippet names always stay on a single line, truncating gracefully;
265 // the full name is exposed through the title attribute.
266 td.column-name > .snippet-name {
267 display: block;
268 max-inline-size: min(15rem, 30vw);
269 white-space: nowrap;
270 overflow: hidden;
271 text-overflow: ellipsis;
272 }
273
274 &.truncate-row-values td.column-desc .snippet-description-content {
275 display: block;
276 max-inline-size: min(25rem, 45vw);
277 overflow: clip;
278 text-overflow: ellipsis;
279 }
280 }
281
282 .snippets-table-toolbar {
283 display: flex;
284 justify-content: space-between;
285 align-items: center;
286
287 // The preceding page header owns the 16px gap above; a `wp-header-end` <hr>
288 // sits between them and prevents margin collapse, so this row keeps only its
289 // own 16px gap below (to the tablenav) and no top margin of its own.
290 margin-block: 0 16px;
291
292 .subsubsub {
293 display: flex;
294 align-items: center;
295 gap: 9px;
296 margin: 0;
297 padding: 0;
298 font-size: 13px;
299 line-height: 1.5;
300
301 li {
302 display: flex;
303 align-items: center;
304 gap: 9px;
305 margin: 0;
306 padding: 0;
307 }
308
309 // A thin vertical rule precedes every status after the first, sized to the
310 // 13px text rather than the taller line box.
311 li + li::before {
312 content: '';
313 inline-size: 1px;
314 block-size: 13px;
315 background: theme.$control-border;
316 }
317 }
318 }
319