PluginProbe
TablePress – Tables in WordPress made easy / 3.3.4
TablePress – Tables in WordPress made easy v3.3.4
3.4 3.3.4 3.3.3 3.3.2 3.3.1 trunk 1.12 1.14 1.9.2 2.0.4 2.1.7 2.1.8 2.2 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.3 2.3.1 2.3.2 2.4 2.4.1 2.4.2 2.4.3 All 45 releases
tablepress / admin / css / common.scss

common.scss in TablePress – Tables in WordPress made easy 3.3.4, at admin/css/common.scss

477 lines 8.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * CSS code for all TablePress admin screens
3 *
4 * @package TablePress
5 * @subpackage Views CSS
6 * @author Tobias Bäthge
7 * @since 1.0.0
8 */
9
10 // Load the Sass string module, for use in the `unicode` function.
11 @use "sass:string";
12
13 /* Load WordPress color schemes, which normally are only loaded on WP admin screens that use the block editor. This and the dependency in package.json are only needed for WP < 6.9. */
14 @use "~@wordpress/base-styles/colors";
15 @use "~@wordpress/base-styles/mixins";
16 @include mixins.wordpress-admin-schemes();
17
18 // Ensure that Unicode characters are embedded in ASCII-encoded form.
19 @function unicode($str) {
20 @return string.unquote("\"") + string.unquote(string.insert($str, "\\", 1)) + string.unquote("\"");
21 }
22
23 /* Hour glass cursor, while waiting for AJAX requests. */
24 body.wait * {
25 cursor: wait !important;
26 }
27
28 /* Move down the header when the Screen Options or Help tabs are opened. */
29 #screen-meta[style$="block;"]$="block;""] ~ #tablepress-page {
30 margin-top: 40px;
31 }
32
33 /* Move the Screen Options and Help link to their original position. Needed due to the full-width header. */
34 #screen-meta-links {
35 position: absolute;
36 right: 0;
37 z-index: 10001; /* Ensure that the tab is always above the arrow of WP feature pointers. */
38 }
39
40 #tablepress-page {
41 margin: 0 0 0 -20px;
42
43 /* Add space between WP core update nag and header navigation. */
44 .update-nag ~ & {
45 margin-top: 25px;
46 }
47
48 #tablepress-body {
49 padding: 0 20px;
50 }
51
52 /* Metabox titles should have the same height, with and without the "?" button. */
53 .postbox-header h2 {
54 line-height: 24px;
55 }
56
57 .header {
58 background: #ffffff;
59 border-bottom: 1px solid #dedae6;
60 align-items: center;
61 display: flex;
62 flex-wrap: wrap;
63 padding-right: 260px; /* Space for the screen meta links. */
64
65 .name {
66 border-right: 1px solid #dedae6;
67 padding: 7px 20px;
68 line-height: 0;
69 }
70 }
71
72 #tablepress-nav {
73 background: #ffffff;
74 padding: 0 0 0 20px;
75 }
76
77 .nav-menu {
78 margin: 0;
79 padding: 0;
80 list-style-type: none;
81 list-style-image: none;
82 display: flex;
83 flex-wrap: wrap;
84
85 .nav-item {
86 margin-bottom: 0;
87 }
88
89 li:hover > a,
90 li > a:focus {
91 border-bottom-color: var(--wp-admin-theme-color);
92 background-color: #f9f9f9;
93 }
94 }
95
96 .nav-link {
97 white-space: nowrap;
98 border-bottom: 5px solid #ffffff;
99 padding: 18px 18px 12px;
100 font-size: 14px;
101 display: inline-block;
102 text-decoration: none;
103 color: #1e1e1e;
104
105 &.active {
106 border-bottom-color: var(--wp-admin-theme-color);
107 }
108
109 &.separator {
110 margin-right: 20px;
111 }
112 }
113
114 .buttons {
115 padding: 0 12px;
116
117 .tablepress-button {
118 cursor: pointer;
119 border: 1px solid #ffffff;
120 border-radius: 3px;
121 align-items: center;
122 margin: 10px 12px;
123 padding: 6px 4px 6px 12px;
124 font-size: 14px;
125 line-height: 1;
126 text-decoration: none;
127 display: inline-flex;
128 color: #ffffff;
129 background-color: #16a34a;
130 border-color: #16a34a;
131
132 &:hover,
133 &:active,
134 &:focus {
135 span:first-child {
136 text-decoration: underline;
137 }
138 }
139
140 &.renew {
141 background-color: #ff5100;
142 border-color: #ff5100;
143 }
144
145 .dashicons {
146 margin: 0 6px 0 4px;
147 }
148 }
149 }
150
151 .postbox ul {
152 list-style: disc inside;
153 margin: 0;
154
155 > li {
156 margin: 0;
157 }
158 }
159
160 /* Styling for the "Info" icon next to descriptions/notices. */
161 .components-h-stack {
162 svg {
163 min-width: 24px;
164 }
165 }
166
167 .code input,
168 .code textarea {
169 font-family: Consolas, Monaco, monospace;
170 direction: ltr;
171 unicode-bidi: embed;
172 }
173
174 /* Reset style from postboxes that pollute components' styles. */
175 .components-panel__body {
176 > .components-panel__body-title {
177 padding: 0;
178 }
179
180 &.is-opened > .components-panel__body-title {
181 margin: -16px -16px 5px;
182 }
183 }
184
185 .components-card {
186 box-shadow: none;
187 border-radius: 0;
188 border: 1px solid #c3c4c7;
189
190 .components-card-header {
191 padding: 0;
192 border-bottom: 1px solid #c3c4c7;
193
194 h2 {
195 line-height: 24px;
196 }
197 }
198
199 .components-card-body {
200 padding: 16px;
201 }
202
203 .card-title {
204 font-size: 13px;
205 font-weight: 500;
206 padding: 0 0 16px;
207 }
208 }
209
210 .components-checkbox-control__input,
211 .components-radio-control__input {
212 &:checked:disabled {
213 opacity: 0.4;
214 }
215
216 &:not(:checked):disabled {
217 background: #f0f0f0;
218 border-color: #cccccc;
219 }
220 }
221
222 .components-text-control__input:disabled,
223 .components-textarea-control__input:disabled {
224 background: #f0f0f0;
225 border-color: #cccccc;
226 box-shadow: none;
227 }
228
229 /* Alignment of selects inside of checkbox labels. */
230 .checkbox-select-in-label {
231 .components-h-stack {
232 align-items: center;
233 }
234 .components-checkbox-control__label {
235 display: flex;
236 gap: 8px;
237 align-items: center;
238 }
239 }
240
241 .notice {
242 margin: 20px 0 0;
243
244 /* Remove rounded corners in WP 7.1+, as long as notices still use non-Gutenberg style. */
245 --wpds-border-radius-lg: 0; /* stylelint-disable-line plugin-wpds/no-setting-wpds-custom-properties */
246 }
247
248 .components-notice {
249 @at-root body[class*="branch-6-"]*="branch-6-""] &.notice {
250 box-shadow: none;
251 padding: 8px 12px;
252 border-top: none;
253 border-right: none;
254 border-bottom: none;
255
256
257 &.is-dismissible {
258 padding-right: 38px;
259
260 .notice-dismiss {
261 &:before {
262 content: unicode("f335");
263 content: unicode("f335") / "";
264 font-size: 24px;
265 padding-right: 4px;
266 }
267
268 &:hover:before {
269 color: #1e1e1e;
270 }
271 }
272 }
273 }
274
275 &.notice-info {
276 border-left-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
277 }
278 .components-notice__content {
279 margin: 0;
280 }
281 }
282
283 /* Notices for "Preview" and "Save Changes" buttons. */
284 .components-notice-list {
285 display: flex;
286 flex-direction: column;
287 gap: 8px;
288
289 @keyframes fadeIn {
290 from {
291 opacity: 0;
292 }
293 to {
294 opacity: 1;
295 }
296 }
297
298 .components-notice {
299 animation: fadeIn 1s; /* Fade in new notices. */
300 transition: opacity 1s; /* Fade out notices before removing them. */
301 scroll-margin-bottom: 50px; /* Scroll into view offset for error notices. */
302 }
303
304 }
305
306 .components-snackbar-list {
307 position: fixed;
308 bottom: 24px;
309 padding-left: 4px;
310 }
311 }
312
313 /* Table Preview (CSS for actual preview is directly in the preview HTML). */
314 .table-preview-modal {
315 .components-modal__content {
316 padding: 0 16px 26px;
317 }
318
319 iframe {
320 width: 100%;
321 height: 100%;
322 }
323
324 .components-modal__header {
325 padding: 20px 26px 8px;
326
327 + div {
328 height: 100%;
329 }
330 }
331 }
332
333 /* Width of the columns on the "All Tables" list. */
334 .tablepress-all-tables {
335 thead {
336 .column-table_id {
337 width: 50px;
338 }
339 .column-table_name {
340 width: 30%;
341 }
342 .column-table_author {
343 width: 12%;
344 }
345 .column-table_last_modified {
346 width: 15%;
347 }
348 }
349
350 /* Font weight for the table ID column. */
351 tbody .column-table_id {
352 font-weight: bold;
353 }
354
355 /* Responsiveness on the All Tables screen. */
356 @media screen and (max-width: 782px) {
357 .column-table_id {
358 display: none !important;
359 font-size: 14px;
360 }
361 /* WordPress < 7.1. */
362 th + .column-table_id {
363 padding: 3px 8px 3px 35%;
364 }
365
366 /* WordPress >= 7.1. */
367 td + .column-table_id {
368 padding: 6px 8px 8px 32px;
369 }
370 }
371 }
372
373 /* Layout adjustments for the header row. */
374 table.widefat {
375 thead,
376 tfoot {
377 td.check-column {
378 padding-top: 0;
379
380 @media screen and (max-width: 782px) {
381 padding-top: 6px;
382 }
383 }
384 }
385 th {
386 &.sortable,
387 &.sorted {
388 a {
389 line-height: 24px;
390 }
391 }
392 }
393 .sorting-indicators {
394 margin-top: 2px;
395 }
396 }
397
398 /* Positioning of Search results of WP_List_Tables. */
399 #tablepress-page .subtitle {
400 float: left;
401 padding: 8px 0 0 0;
402 }
403
404 /* Tables in postboxes (on the "Edit" and "Plugin Options" screens). */
405 .tablepress-postbox-table {
406 border-spacing: 0;
407 max-width: 1000px;
408 width: 100%;
409
410 /* Default column widths. */
411 .column-1 {
412 width: 25%;
413 }
414 .column-2 {
415 width: 75%;
416 }
417
418 th {
419 text-align: left;
420 font-weight: normal;
421 }
422 th,
423 td {
424 padding: 2px;
425 }
426 .top-border {
427 th,
428 td {
429 padding-top: 6px;
430 }
431 }
432 .bottom-border {
433 th,
434 td {
435 padding-bottom: 6px;
436 border-bottom: 1px solid #eeeeee;
437 }
438 }
439 .top-align {
440 vertical-align: top;
441 padding-top: 6px;
442 }
443 }
444
445 /* Select dropdown alignment. */
446 #tablepress-page select {
447 vertical-align: baseline;
448 }
449
450 /* Alignment of textareas and buttons in postboxes. */
451 #tablepress-page textarea:not(.components-textarea-control__input),
452 .tablepress-postbox-table .button {
453 margin: 1px;
454 }
455
456 /* Styling of pills in postbox headings. */
457 .postbox .postbox-header .hndle:not(:has(> .help-container)) {
458 display: inline;
459
460 .pill-label {
461 display: inline-block;
462 vertical-align: top;
463 box-sizing: border-box;
464 margin: 3px 0 0 6px;
465 padding: 0 5px;
466 min-width: 18px;
467 height: 18px;
468 border-radius: 9px;
469 background-color: var(--wp-admin-theme-color);
470 color: #ffffff;
471 font-size: 11px;
472 line-height: 1.6;
473 text-align: center;
474 z-index: 26;
475 }
476 }
477