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