PluginProbe
TablePress – Tables in WordPress made easy / 3.2
TablePress – Tables in WordPress made easy v3.2
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.2, at admin/css/common.scss

448 lines 7.9 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. */
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 .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 }
133 }
134
135 &.renew {
136 background-color: #ff5100;
137 border-color: #ff5100;
138 }
139
140 .dashicons {
141 margin: 0 6px 0 4px;
142 }
143 }
144 }
145
146 .postbox ul {
147 list-style: disc inside;
148 margin: 0;
149
150 > li {
151 margin: 0;
152 }
153 }
154
155 /* Styling for the "Info" icon next to descriptions/notices. */
156 .components-h-stack {
157 svg {
158 min-width: 24px;
159 }
160 }
161
162 .code input,
163 .code textarea {
164 font-family: Consolas, Monaco, monospace;
165 direction: ltr;
166 unicode-bidi: embed;
167 }
168
169 /* Reset style from postboxes that pollute components' styles. */
170 .components-panel__body {
171 > .components-panel__body-title {
172 padding: 0;
173 }
174
175 &.is-opened > .components-panel__body-title {
176 margin: -16px -16px 5px;
177 }
178 }
179
180 .components-card {
181 box-shadow: none;
182 border-radius: 0;
183
184 .components-card-header {
185 h2 {
186 padding: 0;
187 line-height: normal;
188 }
189 }
190
191 .card-title {
192 font-size: 13px;
193 font-weight: 500;
194 padding: 0 0 18px;
195 margin-left: -8px;
196 }
197 }
198
199 .components-checkbox-control__input,
200 .components-radio-control__input {
201 &:checked:disabled {
202 opacity: 0.4;
203 }
204
205 &:not(:checked):disabled {
206 background: #f0f0f0;
207 border-color: #cccccc;
208 }
209 }
210
211 .components-text-control__input:disabled,
212 .components-textarea-control__input:disabled {
213 background: #f0f0f0;
214 border-color: #cccccc;
215 box-shadow: none;
216 }
217
218 /* Alignment of selects inside of checkbox labels. */
219 .checkbox-select-in-label {
220 .components-h-stack {
221 align-items: center;
222 }
223 .components-checkbox-control__label {
224 display: flex;
225 gap: 8px;
226 align-items: center;
227 }
228 }
229
230
231 .components-notice {
232 &.notice {
233 margin: 20px 0 0;
234 box-shadow: none;
235 padding: 8px 12px;
236 border-top: none;
237 border-right: none;
238 border-bottom: none;
239
240 &.is-info {
241 border-left-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
242 }
243
244 &.is-dismissible {
245 padding-right: 38px;
246
247 .notice-dismiss {
248 &:before {
249 content: unicode("f335") / "";
250 font-size: 32px;
251 color: #757575;
252 padding-right: 10px;
253 }
254
255 &:hover:before {
256 color: #1e1e1e;
257 }
258 }
259 }
260 }
261
262 .components-notice__content {
263 margin: 0;
264 }
265 }
266
267 /* Notices for "Preview" and "Save Changes" buttons. */
268 .components-notice-list {
269 display: flex;
270 flex-direction: column;
271 gap: 8px;
272
273 @keyframes fadeIn {
274 from {
275 opacity: 0;
276 }
277 to {
278 opacity: 1;
279 }
280 }
281
282 .components-notice {
283 animation: fadeIn 1s; /* Fade in new notices. */
284 transition: opacity 1s; /* Fade out notices before removing them. */
285 scroll-margin-bottom: 50px; /* Scroll into view offset for error notices. */
286 }
287
288 }
289
290 .components-snackbar-list {
291 position: fixed;
292 bottom: 24px;
293 padding-left: 4px;
294 }
295 }
296
297 /* Table Preview (CSS for actual preview is directly in the preview HTML). */
298 .table-preview-modal {
299 .components-modal__content {
300 padding: 0 16px 26px;
301 }
302
303 iframe {
304 width: 100%;
305 height: 100%;
306 }
307
308 .components-modal__header {
309 padding: 20px 26px 8px;
310
311 + div {
312 height: 100%;
313 }
314 }
315 }
316
317 /* Width settings for the `Modal` component. Only for backward compatibility with WP < 6.5. */
318 @media (min-width: 600px) {
319 .components-modal__frame {
320 &.has-size-small,
321 &.has-size-medium,
322 &.has-size-large {
323 width: 100%;
324 }
325
326 &.has-size-small {
327 max-width: 384px;
328 }
329 &.has-size-medium {
330 max-width: 512px;
331 }
332 &.has-size-large {
333 max-width: 840px;
334 }
335 }
336 }
337
338 /* Width of the columns on the "All Tables" list. */
339 .tablepress-all-tables {
340 thead {
341 .column-table_id {
342 width: 50px;
343 }
344 .column-table_name {
345 width: 30%;
346 }
347 .column-table_author {
348 width: 12%;
349 }
350 .column-table_last_modified {
351 width: 15%;
352 }
353 }
354
355 /* Font weight for the table ID column. */
356 tbody .column-table_id {
357 font-weight: bold;
358 }
359
360 /* Responsiveness on the All Tables screen. */
361 @media screen and (max-width: 782px) {
362 .column-table_id {
363 display: none !important;
364 padding: 3px 8px 3px 35%;
365 }
366 }
367 }
368
369 /* Positioning of Search results of WP_List_Tables. */
370 #tablepress-page .subtitle {
371 float: left;
372 padding: 8px 0 0 0;
373 }
374
375 /* Tables in postboxes (on the "Edit" and "Plugin Options" screens). */
376 .tablepress-postbox-table {
377 border-spacing: 0;
378 max-width: 1000px;
379 width: 100%;
380
381 /* Default column widths. */
382 .column-1 {
383 width: 25%;
384 }
385 .column-2 {
386 width: 75%;
387 }
388
389 th {
390 text-align: left;
391 font-weight: normal;
392 }
393 th,
394 td {
395 padding: 2px;
396 }
397 .top-border {
398 th,
399 td {
400 padding-top: 6px;
401 }
402 }
403 .bottom-border {
404 th,
405 td {
406 padding-bottom: 6px;
407 border-bottom: 1px solid #eeeeee;
408 }
409 }
410 .top-align {
411 vertical-align: top;
412 padding-top: 6px;
413 }
414 }
415
416 /* Select dropdown alignment. */
417 #tablepress-page select {
418 vertical-align: baseline;
419 }
420
421 /* Alignment of textareas and buttons in postboxes. */
422 #tablepress-page textarea:not(.components-textarea-control__input),
423 .tablepress-postbox-table .button {
424 margin: 1px;
425 }
426
427 /* Styling of pills in postbox headings. */
428 .postbox .postbox-header .hndle {
429 display: inline;
430
431 .pill-label {
432 display: inline-block;
433 vertical-align: top;
434 box-sizing: border-box;
435 margin: 1px 0 -1px 6px;
436 padding: 0 5px;
437 min-width: 18px;
438 height: 18px;
439 border-radius: 9px;
440 background-color: var(--wp-admin-theme-color);
441 color: #ffffff;
442 font-size: 11px;
443 line-height: 1.6;
444 text-align: center;
445 z-index: 26;
446 }
447 }
448