| 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 |
/* Reset artificial margin/padding for metaboxes, introduced in WP 7.0. */ |
| 53 |
#poststuff #post-body { |
| 54 |
margin: 0; |
| 55 |
|
| 56 |
@media only screen and (min-width: 851px) { |
| 57 |
&.columns-2 { |
| 58 |
margin-right: 300px; |
| 59 |
} |
| 60 |
} |
| 61 |
} |
| 62 |
.metabox-holder .postbox-container .meta-box-sortables { |
| 63 |
padding: 0; |
| 64 |
} |
| 65 |
|
| 66 |
/* Metabox titles should have the same height, with and without the "?" button. */ |
| 67 |
.postbox-header h2 { |
| 68 |
line-height: 24px; |
| 69 |
} |
| 70 |
|
| 71 |
.header { |
| 72 |
background: #ffffff; |
| 73 |
border-bottom: 1px solid #dedae6; |
| 74 |
align-items: center; |
| 75 |
display: flex; |
| 76 |
flex-wrap: wrap; |
| 77 |
padding-right: 260px; /* Space for the screen meta links. */ |
| 78 |
|
| 79 |
.name { |
| 80 |
border-right: 1px solid #dedae6; |
| 81 |
padding: 7px 20px; |
| 82 |
line-height: 0; |
| 83 |
} |
| 84 |
} |
| 85 |
|
| 86 |
#tablepress-nav { |
| 87 |
background: #ffffff; |
| 88 |
padding: 0 0 0 20px; |
| 89 |
} |
| 90 |
|
| 91 |
.nav-menu { |
| 92 |
margin: 0; |
| 93 |
padding: 0; |
| 94 |
list-style-type: none; |
| 95 |
list-style-image: none; |
| 96 |
display: flex; |
| 97 |
flex-wrap: wrap; |
| 98 |
|
| 99 |
.nav-item { |
| 100 |
margin-bottom: 0; |
| 101 |
} |
| 102 |
|
| 103 |
li:hover > a, |
| 104 |
li > a:focus { |
| 105 |
border-bottom-color: var(--wp-admin-theme-color); |
| 106 |
background-color: #f9f9f9; |
| 107 |
} |
| 108 |
} |
| 109 |
|
| 110 |
.nav-link { |
| 111 |
white-space: nowrap; |
| 112 |
border-bottom: 5px solid #ffffff; |
| 113 |
padding: 18px 18px 12px; |
| 114 |
font-size: 14px; |
| 115 |
display: inline-block; |
| 116 |
text-decoration: none; |
| 117 |
color: #1e1e1e; |
| 118 |
|
| 119 |
&.active { |
| 120 |
border-bottom-color: var(--wp-admin-theme-color); |
| 121 |
} |
| 122 |
|
| 123 |
&.separator { |
| 124 |
margin-right: 20px; |
| 125 |
} |
| 126 |
} |
| 127 |
|
| 128 |
.buttons { |
| 129 |
padding: 0 12px; |
| 130 |
|
| 131 |
.tablepress-button { |
| 132 |
cursor: pointer; |
| 133 |
border: 1px solid #ffffff; |
| 134 |
border-radius: 3px; |
| 135 |
align-items: center; |
| 136 |
margin: 10px 12px; |
| 137 |
padding: 6px 4px 6px 12px; |
| 138 |
font-size: 14px; |
| 139 |
line-height: 1; |
| 140 |
text-decoration: none; |
| 141 |
display: inline-flex; |
| 142 |
color: #ffffff; |
| 143 |
background-color: #16a34a; |
| 144 |
border-color: #16a34a; |
| 145 |
|
| 146 |
&:hover, |
| 147 |
&:active, |
| 148 |
&:focus { |
| 149 |
span:first-child { |
| 150 |
text-decoration: underline; |
| 151 |
} |
| 152 |
} |
| 153 |
|
| 154 |
&.renew { |
| 155 |
background-color: #ff5100; |
| 156 |
border-color: #ff5100; |
| 157 |
} |
| 158 |
|
| 159 |
.dashicons { |
| 160 |
margin: 0 6px 0 4px; |
| 161 |
} |
| 162 |
} |
| 163 |
} |
| 164 |
|
| 165 |
.postbox ul { |
| 166 |
list-style: disc inside; |
| 167 |
margin: 0; |
| 168 |
|
| 169 |
> li { |
| 170 |
margin: 0; |
| 171 |
} |
| 172 |
} |
| 173 |
|
| 174 |
/* Styling for the "Info" icon next to descriptions/notices. */ |
| 175 |
.components-h-stack { |
| 176 |
svg { |
| 177 |
min-width: 24px; |
| 178 |
} |
| 179 |
} |
| 180 |
|
| 181 |
.code input, |
| 182 |
.code textarea { |
| 183 |
font-family: Consolas, Monaco, monospace; |
| 184 |
direction: ltr; |
| 185 |
unicode-bidi: embed; |
| 186 |
} |
| 187 |
|
| 188 |
/* Reset style from postboxes that pollute components' styles. */ |
| 189 |
.components-panel__body { |
| 190 |
> .components-panel__body-title { |
| 191 |
padding: 0; |
| 192 |
} |
| 193 |
|
| 194 |
&.is-opened > .components-panel__body-title { |
| 195 |
margin: -16px -16px 5px; |
| 196 |
} |
| 197 |
} |
| 198 |
|
| 199 |
.components-card { |
| 200 |
box-shadow: none; |
| 201 |
border-radius: 0; |
| 202 |
border: 1px solid #c3c4c7; |
| 203 |
|
| 204 |
.components-card-header { |
| 205 |
padding: 0; |
| 206 |
border-bottom: 1px solid #c3c4c7; |
| 207 |
|
| 208 |
h2 { |
| 209 |
line-height: 24px; |
| 210 |
} |
| 211 |
} |
| 212 |
|
| 213 |
.components-card-body { |
| 214 |
padding: 16px; |
| 215 |
} |
| 216 |
|
| 217 |
.card-title { |
| 218 |
font-size: 13px; |
| 219 |
font-weight: 500; |
| 220 |
padding: 0 0 16px; |
| 221 |
} |
| 222 |
} |
| 223 |
|
| 224 |
.components-checkbox-control__input, |
| 225 |
.components-radio-control__input { |
| 226 |
&:checked:disabled { |
| 227 |
opacity: 0.4; |
| 228 |
} |
| 229 |
|
| 230 |
&:not(:checked):disabled { |
| 231 |
background: #f0f0f0; |
| 232 |
border-color: #cccccc; |
| 233 |
} |
| 234 |
} |
| 235 |
|
| 236 |
.components-text-control__input:disabled, |
| 237 |
.components-textarea-control__input:disabled { |
| 238 |
background: #f0f0f0; |
| 239 |
border-color: #cccccc; |
| 240 |
box-shadow: none; |
| 241 |
} |
| 242 |
|
| 243 |
/* Alignment of selects inside of checkbox labels. */ |
| 244 |
.checkbox-select-in-label { |
| 245 |
.components-h-stack { |
| 246 |
align-items: center; |
| 247 |
} |
| 248 |
.components-checkbox-control__label { |
| 249 |
display: flex; |
| 250 |
gap: 8px; |
| 251 |
align-items: center; |
| 252 |
} |
| 253 |
} |
| 254 |
|
| 255 |
.notice { |
| 256 |
margin: 20px 0 0; |
| 257 |
} |
| 258 |
|
| 259 |
.components-notice { |
| 260 |
@at-root body[class*="branch-6-"]*="branch-6-""] &.notice { |
| 261 |
box-shadow: none; |
| 262 |
padding: 8px 12px; |
| 263 |
border-top: none; |
| 264 |
border-right: none; |
| 265 |
border-bottom: none; |
| 266 |
|
| 267 |
&.is-info { |
| 268 |
border-left-color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9)); |
| 269 |
} |
| 270 |
|
| 271 |
&.is-dismissible { |
| 272 |
padding-right: 38px; |
| 273 |
|
| 274 |
.notice-dismiss { |
| 275 |
&:before { |
| 276 |
content: unicode("f335"); |
| 277 |
content: unicode("f335") / ""; |
| 278 |
font-size: 24px; |
| 279 |
padding-right: 4px; |
| 280 |
} |
| 281 |
|
| 282 |
&:hover:before { |
| 283 |
color: #1e1e1e; |
| 284 |
} |
| 285 |
} |
| 286 |
} |
| 287 |
} |
| 288 |
|
| 289 |
.components-notice__content { |
| 290 |
margin: 0; |
| 291 |
} |
| 292 |
} |
| 293 |
|
| 294 |
/* Notices for "Preview" and "Save Changes" buttons. */ |
| 295 |
.components-notice-list { |
| 296 |
display: flex; |
| 297 |
flex-direction: column; |
| 298 |
gap: 8px; |
| 299 |
|
| 300 |
@keyframes fadeIn { |
| 301 |
from { |
| 302 |
opacity: 0; |
| 303 |
} |
| 304 |
to { |
| 305 |
opacity: 1; |
| 306 |
} |
| 307 |
} |
| 308 |
|
| 309 |
.components-notice { |
| 310 |
animation: fadeIn 1s; /* Fade in new notices. */ |
| 311 |
transition: opacity 1s; /* Fade out notices before removing them. */ |
| 312 |
scroll-margin-bottom: 50px; /* Scroll into view offset for error notices. */ |
| 313 |
} |
| 314 |
|
| 315 |
} |
| 316 |
|
| 317 |
.components-snackbar-list { |
| 318 |
position: fixed; |
| 319 |
bottom: 24px; |
| 320 |
padding-left: 4px; |
| 321 |
} |
| 322 |
} |
| 323 |
|
| 324 |
/* Table Preview (CSS for actual preview is directly in the preview HTML). */ |
| 325 |
.table-preview-modal { |
| 326 |
.components-modal__content { |
| 327 |
padding: 0 16px 26px; |
| 328 |
} |
| 329 |
|
| 330 |
iframe { |
| 331 |
width: 100%; |
| 332 |
height: 100%; |
| 333 |
} |
| 334 |
|
| 335 |
.components-modal__header { |
| 336 |
padding: 20px 26px 8px; |
| 337 |
|
| 338 |
+ div { |
| 339 |
height: 100%; |
| 340 |
} |
| 341 |
} |
| 342 |
} |
| 343 |
|
| 344 |
/* Width of the columns on the "All Tables" list. */ |
| 345 |
.tablepress-all-tables { |
| 346 |
thead { |
| 347 |
.column-table_id { |
| 348 |
width: 50px; |
| 349 |
} |
| 350 |
.column-table_name { |
| 351 |
width: 30%; |
| 352 |
} |
| 353 |
.column-table_author { |
| 354 |
width: 12%; |
| 355 |
} |
| 356 |
.column-table_last_modified { |
| 357 |
width: 15%; |
| 358 |
} |
| 359 |
} |
| 360 |
|
| 361 |
/* Font weight for the table ID column. */ |
| 362 |
tbody .column-table_id { |
| 363 |
font-weight: bold; |
| 364 |
} |
| 365 |
|
| 366 |
/* Responsiveness on the All Tables screen. */ |
| 367 |
@media screen and (max-width: 782px) { |
| 368 |
.column-table_id { |
| 369 |
display: none !important; |
| 370 |
padding: 3px 8px 3px 35%; |
| 371 |
} |
| 372 |
} |
| 373 |
} |
| 374 |
|
| 375 |
/* Layout adjustments for the header row. */ |
| 376 |
table.widefat { |
| 377 |
thead, |
| 378 |
tfoot { |
| 379 |
td.check-column { |
| 380 |
padding-top: 0; |
| 381 |
|
| 382 |
@media screen and (max-width: 782px) { |
| 383 |
padding-top: 6px; |
| 384 |
} |
| 385 |
} |
| 386 |
} |
| 387 |
th { |
| 388 |
&.sortable, |
| 389 |
&.sorted { |
| 390 |
a { |
| 391 |
line-height: 24px; |
| 392 |
} |
| 393 |
} |
| 394 |
} |
| 395 |
.sorting-indicators { |
| 396 |
margin-top: 2px; |
| 397 |
} |
| 398 |
} |
| 399 |
|
| 400 |
/* Positioning of Search results of WP_List_Tables. */ |
| 401 |
#tablepress-page .subtitle { |
| 402 |
float: left; |
| 403 |
padding: 8px 0 0 0; |
| 404 |
} |
| 405 |
|
| 406 |
/* Tables in postboxes (on the "Edit" and "Plugin Options" screens). */ |
| 407 |
.tablepress-postbox-table { |
| 408 |
border-spacing: 0; |
| 409 |
max-width: 1000px; |
| 410 |
width: 100%; |
| 411 |
|
| 412 |
/* Default column widths. */ |
| 413 |
.column-1 { |
| 414 |
width: 25%; |
| 415 |
} |
| 416 |
.column-2 { |
| 417 |
width: 75%; |
| 418 |
} |
| 419 |
|
| 420 |
th { |
| 421 |
text-align: left; |
| 422 |
font-weight: normal; |
| 423 |
} |
| 424 |
th, |
| 425 |
td { |
| 426 |
padding: 2px; |
| 427 |
} |
| 428 |
.top-border { |
| 429 |
th, |
| 430 |
td { |
| 431 |
padding-top: 6px; |
| 432 |
} |
| 433 |
} |
| 434 |
.bottom-border { |
| 435 |
th, |
| 436 |
td { |
| 437 |
padding-bottom: 6px; |
| 438 |
border-bottom: 1px solid #eeeeee; |
| 439 |
} |
| 440 |
} |
| 441 |
.top-align { |
| 442 |
vertical-align: top; |
| 443 |
padding-top: 6px; |
| 444 |
} |
| 445 |
} |
| 446 |
|
| 447 |
/* Select dropdown alignment. */ |
| 448 |
#tablepress-page select { |
| 449 |
vertical-align: baseline; |
| 450 |
} |
| 451 |
|
| 452 |
/* Alignment of textareas and buttons in postboxes. */ |
| 453 |
#tablepress-page textarea:not(.components-textarea-control__input), |
| 454 |
.tablepress-postbox-table .button { |
| 455 |
margin: 1px; |
| 456 |
} |
| 457 |
|
| 458 |
/* Styling of pills in postbox headings. */ |
| 459 |
.postbox .postbox-header .hndle:not(:has(> .help-container)) { |
| 460 |
display: inline; |
| 461 |
|
| 462 |
.pill-label { |
| 463 |
display: inline-block; |
| 464 |
vertical-align: top; |
| 465 |
box-sizing: border-box; |
| 466 |
margin: 1px 0 -1px 6px; |
| 467 |
padding: 0 5px; |
| 468 |
min-width: 18px; |
| 469 |
height: 18px; |
| 470 |
border-radius: 9px; |
| 471 |
background-color: var(--wp-admin-theme-color); |
| 472 |
color: #ffffff; |
| 473 |
font-size: 11px; |
| 474 |
line-height: 1.6; |
| 475 |
text-align: center; |
| 476 |
z-index: 26; |
| 477 |
} |
| 478 |
} |
| 479 |
|