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 +286 -55 2.2.3 → 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 }
@@ -21,15 +39,15 @@
21 39
22 40 #tablepress-page {
23 41 margin: 0 0 0 -20px;
24 42
25 - /* Add space between WP core update nag and header navigation. */
26 - .update-nag ~ & {
27 - margin-top: 25px;
43 + #tablepress-body {
44 + padding: 0 20px;
28 45 }
29 46
30 - #tablepress-body {
31 - padding: 0 20px;
47 + /* Metabox titles should have the same height, with and without the "?" button. */
48 + .postbox-header h2 {
49 + line-height: 24px;
32 50 }
33 51
34 52 .header {
35 53 background: #ffffff;
@@ -40,15 +58,10 @@
40 58 padding-right: 260px; /* Space for the screen meta links. */
41 59
42 60 .name {
43 61 border-right: 1px solid #dedae6;
44 - padding: 12px 24px 6px;
45 -
46 - img {
47 - vertical-align: middle;
48 - margin: 0 12px 6px 0;
49 - height: 32px;
50 - }
62 + padding: 7px 20px;
63 + line-height: 0;
51 64 }
52 65 }
53 66
54 67 #tablepress-nav {
@@ -69,9 +82,9 @@
69 82 }
70 83
71 84 li:hover > a,
72 85 li > a:focus {
73 - border-bottom-color: #049cdb;
86 + border-bottom-color: var(--wp-admin-theme-color);
74 87 background-color: #f9f9f9;
75 88 }
76 89 }
77 90
@@ -84,9 +97,9 @@
84 97 text-decoration: none;
85 98 color: #1e1e1e;
86 99
87 100 &.active {
88 - border-bottom-color: #049cdb;
101 + border-bottom-color: var(--wp-admin-theme-color);
89 102 }
90 103
91 104 &.separator {
92 105 margin-right: 20px;
@@ -105,32 +118,25 @@
105 118 padding: 6px 4px 6px 12px;
106 119 font-size: 14px;
107 120 line-height: 1;
108 121 text-decoration: none;
109 - transition: color 0.1s, background-color 0.1s, border-color 0.1s;
110 122 display: inline-flex;
111 123 color: #ffffff;
112 - background-color: #8ab547;
113 - border-color: #8ab547;
124 + background-color: #16a34a;
125 + border-color: #16a34a;
114 126
115 127 &:hover,
116 128 &:active,
117 129 &:focus {
118 - color: #ffffff;
119 - background-color: #69b547;
120 - border-color: #69b547;
130 + span:first-child {
131 + text-decoration: underline;
132 + text-decoration-thickness: 1.5px;
133 + }
121 134 }
122 135
123 136 &.renew {
124 - background-color: #dba617;
125 - border-color: #dba617;
126 -
127 - &:hover,
128 - &:active,
129 - &:focus {
130 - background-color: #ebb72a;
131 - border-color: #ebb72a;
132 - }
137 + background-color: #ff5100;
138 + border-color: #ff5100;
133 139 }
134 140
135 141 .dashicons {
136 142 margin: 0 6px 0 4px;
@@ -137,30 +143,227 @@
137 143 }
138 144 }
139 145 }
140 146
141 - /* Margins for messages on screens */
142 - div.notice {
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 {
143 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 */
144 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 + }
145 340 }
146 341
147 -/* Styling for the "Add New Table" form. */
148 -#tablepress_add-add-table {
149 - .form-wrap {
150 - 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;
347 +}
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;
151 353 }
152 354
153 - .form-field {
154 - margin: 0;
355 + iframe {
356 + width: 100%;
357 + height: 100%;
358 + }
155 359
156 - }
360 + .components-modal__header {
361 + padding: 20px 26px 8px;
157 362
158 - /* Number of rows/columns in the "Add New Table" form. */
159 - .form-field-small {
160 - float: left;
161 - width: 150px;
162 - margin-right: 20px;
363 + + div {
364 + height: 100%;
365 + }
163 366 }
164 367 }
165 368
166 369 /* Width of the columns on the "All Tables" list. */
@@ -188,13 +391,47 @@
188 391 /* Responsiveness on the All Tables screen. */
189 392 @media screen and (max-width: 782px) {
190 393 .column-table_id {
191 394 display: none !important;
395 + font-size: 14px;
396 + }
397 + /* WordPress < 7.1. */
398 + th + .column-table_id {
192 399 padding: 3px 8px 3px 35%;
193 400 }
401 +
402 + /* WordPress >= 7.1. */
403 + td + .column-table_id {
404 + padding: 6px 8px 8px 32px;
405 + }
194 406 }
195 407 }
196 408
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 + }
420 + }
421 + th {
422 + &.sortable,
423 + &.sorted {
424 + a {
425 + line-height: 24px;
426 + }
427 + }
428 + }
429 + .sorting-indicators {
430 + margin-top: 2px;
431 + }
432 +}
433 +
197 434 /* Positioning of Search results of WP_List_Tables. */
198 435 #tablepress-page .subtitle {
199 436 float: left;
200 437 padding: 8px 0 0 0;
@@ -205,9 +442,9 @@
205 442 border-spacing: 0;
206 443 max-width: 1000px;
207 444 width: 100%;
208 445
209 - /* Default column widths */
446 + /* Default column widths. */
210 447 .column-1 {
211 448 width: 25%;
212 449 }
213 450 .column-2 {
@@ -220,9 +457,8 @@
220 457 }
221 458 th,
222 459 td {
223 460 padding: 2px;
224 - word-wrap: break-word;
225 461 }
226 462 .top-border {
227 463 th,
228 464 td {
@@ -247,32 +483,27 @@
247 483 vertical-align: baseline;
248 484 }
249 485
250 486 /* Alignment of textareas and buttons in postboxes. */
251 -#tablepress-page textarea,
487 +#tablepress-page textarea:not(.components-textarea-control__input),
252 488 .tablepress-postbox-table .button {
253 489 margin: 1px;
254 490 }
255 491
256 -/* Red color for the "Uninstall TablePress" button on the "Plugin Options" screen. */
257 -#uninstall-tablepress {
258 - color: #bc0b0b;
259 -}
260 -
261 492 /* Styling of pills in postbox headings. */
262 -.postbox .postbox-header .hndle {
493 +.postbox .postbox-header .hndle:not(:has(> .help-container)) {
263 494 display: inline;
264 495
265 - .beta-label {
496 + .pill-label {
266 497 display: inline-block;
267 498 vertical-align: top;
268 499 box-sizing: border-box;
269 - margin: 1px 0 -1px 6px;
500 + margin: 3px 0 0 6px;
270 501 padding: 0 5px;
271 502 min-width: 18px;
272 503 height: 18px;
273 504 border-radius: 9px;
274 - background-color: #049cdb;
505 + background-color: var(--wp-admin-theme-color);
275 506 color: #ffffff;
276 507 font-size: 11px;
277 508 line-height: 1.6;
278 509 text-align: center;