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
tablepress / admin / css / common.scss

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

513 lines 9.3 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 #tablepress-body {
44 padding: 0 20px;
45 }
46
47 /* Metabox titles should have the same height, with and without the "?" button. */
48 .postbox-header h2 {
49 line-height: 24px;
50 }
51
52 .header {
53 background: #ffffff;
54 border-bottom: 1px solid #dedae6;
55 align-items: center;
56 display: flex;
57 flex-wrap: wrap;
58 padding-right: 260px; /* Space for the screen meta links. */
59
60 .name {
61 border-right: 1px solid #dedae6;
62 padding: 7px 20px;
63 line-height: 0;
64 }
65 }
66
67 #tablepress-nav {
68 background: #ffffff;
69 padding: 0 0 0 20px;
70 }
71
72 .nav-menu {
73 margin: 0;
74 padding: 0;
75 list-style-type: none;
76 list-style-image: none;
77 display: flex;
78 flex-wrap: wrap;
79
80 .nav-item {
81 margin-bottom: 0;
82 }
83
84 li:hover > a,
85 li > a:focus {
86 border-bottom-color: var(--wp-admin-theme-color);
87 background-color: #f9f9f9;
88 }
89 }
90
91 .nav-link {
92 white-space: nowrap;
93 border-bottom: 5px solid #ffffff;
94 padding: 18px 18px 12px;
95 font-size: 14px;
96 display: inline-block;
97 text-decoration: none;
98 color: #1e1e1e;
99
100 &.active {
101 border-bottom-color: var(--wp-admin-theme-color);
102 }
103
104 &.separator {
105 margin-right: 20px;
106 }
107 }
108
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 {
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 */
242 }
243
244 .components-notice {
245 @at-root body[class*="branch-6-"]*="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 }
340 }
341
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;
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 }
367 }
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 }
407 }
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
434 /* Positioning of Search results of WP_List_Tables. */
435 #tablepress-page .subtitle {
436 float: left;
437 padding: 8px 0 0 0;
438 }
439
440 /* Tables in postboxes (on the "Edit" and "Plugin Options" screens). */
441 .tablepress-postbox-table {
442 border-spacing: 0;
443 max-width: 1000px;
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 }
479 }
480
481 /* Select dropdown alignment. */
482 #tablepress-page select {
483 vertical-align: baseline;
484 }
485
486 /* Alignment of textareas and buttons in postboxes. */
487 #tablepress-page textarea:not(.components-textarea-control__input),
488 .tablepress-postbox-table .button {
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 }
512 }
513