PluginProbe
TablePress – Tables in WordPress made easy / 3.3.1
TablePress – Tables in WordPress made easy v3.3.1
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 2.4.4 All 44 releases
tablepress / admin / css / common.scss

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

465 lines 8.2 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
245 .components-notice {
246 @at-root body[class*="branch-6-"]*="branch-6-""] &.notice {
247 box-shadow: none;
248 padding: 8px 12px;
249 border-top: none;
250 border-right: none;
251 border-bottom: none;
252
253
254 &.is-dismissible {
255 padding-right: 38px;
256
257 .notice-dismiss {
258 &:before {
259 content: unicode("f335");
260 content: unicode("f335") / "";
261 font-size: 24px;
262 padding-right: 4px;
263 }
264
265 &:hover:before {
266 color: #1e1e1e;
267 }
268 }
269 }
270 }
271
272 &.notice-info {
273 border-left-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
274 }
275 .components-notice__content {
276 margin: 0;
277 }
278 }
279
280 /* Notices for "Preview" and "Save Changes" buttons. */
281 .components-notice-list {
282 display: flex;
283 flex-direction: column;
284 gap: 8px;
285
286 @keyframes fadeIn {
287 from {
288 opacity: 0;
289 }
290 to {
291 opacity: 1;
292 }
293 }
294
295 .components-notice {
296 animation: fadeIn 1s; /* Fade in new notices. */
297 transition: opacity 1s; /* Fade out notices before removing them. */
298 scroll-margin-bottom: 50px; /* Scroll into view offset for error notices. */
299 }
300
301 }
302
303 .components-snackbar-list {
304 position: fixed;
305 bottom: 24px;
306 padding-left: 4px;
307 }
308 }
309
310 /* Table Preview (CSS for actual preview is directly in the preview HTML). */
311 .table-preview-modal {
312 .components-modal__content {
313 padding: 0 16px 26px;
314 }
315
316 iframe {
317 width: 100%;
318 height: 100%;
319 }
320
321 .components-modal__header {
322 padding: 20px 26px 8px;
323
324 + div {
325 height: 100%;
326 }
327 }
328 }
329
330 /* Width of the columns on the "All Tables" list. */
331 .tablepress-all-tables {
332 thead {
333 .column-table_id {
334 width: 50px;
335 }
336 .column-table_name {
337 width: 30%;
338 }
339 .column-table_author {
340 width: 12%;
341 }
342 .column-table_last_modified {
343 width: 15%;
344 }
345 }
346
347 /* Font weight for the table ID column. */
348 tbody .column-table_id {
349 font-weight: bold;
350 }
351
352 /* Responsiveness on the All Tables screen. */
353 @media screen and (max-width: 782px) {
354 .column-table_id {
355 display: none !important;
356 padding: 3px 8px 3px 35%;
357 }
358 }
359 }
360
361 /* Layout adjustments for the header row. */
362 table.widefat {
363 thead,
364 tfoot {
365 td.check-column {
366 padding-top: 0;
367
368 @media screen and (max-width: 782px) {
369 padding-top: 6px;
370 }
371 }
372 }
373 th {
374 &.sortable,
375 &.sorted {
376 a {
377 line-height: 24px;
378 }
379 }
380 }
381 .sorting-indicators {
382 margin-top: 2px;
383 }
384 }
385
386 /* Positioning of Search results of WP_List_Tables. */
387 #tablepress-page .subtitle {
388 float: left;
389 padding: 8px 0 0 0;
390 }
391
392 /* Tables in postboxes (on the "Edit" and "Plugin Options" screens). */
393 .tablepress-postbox-table {
394 border-spacing: 0;
395 max-width: 1000px;
396 width: 100%;
397
398 /* Default column widths. */
399 .column-1 {
400 width: 25%;
401 }
402 .column-2 {
403 width: 75%;
404 }
405
406 th {
407 text-align: left;
408 font-weight: normal;
409 }
410 th,
411 td {
412 padding: 2px;
413 }
414 .top-border {
415 th,
416 td {
417 padding-top: 6px;
418 }
419 }
420 .bottom-border {
421 th,
422 td {
423 padding-bottom: 6px;
424 border-bottom: 1px solid #eeeeee;
425 }
426 }
427 .top-align {
428 vertical-align: top;
429 padding-top: 6px;
430 }
431 }
432
433 /* Select dropdown alignment. */
434 #tablepress-page select {
435 vertical-align: baseline;
436 }
437
438 /* Alignment of textareas and buttons in postboxes. */
439 #tablepress-page textarea:not(.components-textarea-control__input),
440 .tablepress-postbox-table .button {
441 margin: 1px;
442 }
443
444 /* Styling of pills in postbox headings. */
445 .postbox .postbox-header .hndle:not(:has(> .help-container)) {
446 display: inline;
447
448 .pill-label {
449 display: inline-block;
450 vertical-align: top;
451 box-sizing: border-box;
452 margin: 1px 0 -1px 6px;
453 padding: 0 5px;
454 min-width: 18px;
455 height: 18px;
456 border-radius: 9px;
457 background-color: var(--wp-admin-theme-color);
458 color: #ffffff;
459 font-size: 11px;
460 line-height: 1.6;
461 text-align: center;
462 z-index: 26;
463 }
464 }
465