| 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 WordPress color schemes, which normally are only loaded on WP admin screens that use the block editor. */ |
| 11 |
@use "~@wordpress/base-styles/colors"; |
| 12 |
@use "~@wordpress/base-styles/mixins"; |
| 13 |
@include mixins.wordpress-admin-schemes(); |
| 14 |
|
| 15 |
/* Move down the header when the Screen Options or Help tabs are opened. */ |
| 16 |
#screen-meta[style$="block;"]$="block;""] ~ #tablepress-page { |
| 17 |
margin-top: 40px; |
| 18 |
} |
| 19 |
|
| 20 |
/* Move the Screen Options and Help link to their original position. Needed due to the full-width header. */ |
| 21 |
#screen-meta-links { |
| 22 |
position: absolute; |
| 23 |
right: 0; |
| 24 |
z-index: 10001; /* Ensure that the tab is always above the arrow of WP feature pointers. */ |
| 25 |
} |
| 26 |
|
| 27 |
#tablepress-page { |
| 28 |
margin: 0 0 0 -20px; |
| 29 |
|
| 30 |
/* Add space between WP core update nag and header navigation. */ |
| 31 |
.update-nag ~ & { |
| 32 |
margin-top: 25px; |
| 33 |
} |
| 34 |
|
| 35 |
#tablepress-body { |
| 36 |
padding: 0 20px; |
| 37 |
} |
| 38 |
|
| 39 |
.header { |
| 40 |
background: #ffffff; |
| 41 |
border-bottom: 1px solid #dedae6; |
| 42 |
align-items: center; |
| 43 |
display: flex; |
| 44 |
flex-wrap: wrap; |
| 45 |
padding-right: 260px; /* Space for the screen meta links. */ |
| 46 |
|
| 47 |
.name { |
| 48 |
border-right: 1px solid #dedae6; |
| 49 |
padding: 7px 20px; |
| 50 |
line-height: 0; |
| 51 |
} |
| 52 |
} |
| 53 |
|
| 54 |
#tablepress-nav { |
| 55 |
background: #ffffff; |
| 56 |
padding: 0 0 0 20px; |
| 57 |
} |
| 58 |
|
| 59 |
.nav-menu { |
| 60 |
margin: 0; |
| 61 |
padding: 0; |
| 62 |
list-style-type: none; |
| 63 |
list-style-image: none; |
| 64 |
display: flex; |
| 65 |
flex-wrap: wrap; |
| 66 |
|
| 67 |
.nav-item { |
| 68 |
margin-bottom: 0; |
| 69 |
} |
| 70 |
|
| 71 |
li:hover > a, |
| 72 |
li > a:focus { |
| 73 |
border-bottom-color: var(--wp-admin-theme-color); |
| 74 |
background-color: #f9f9f9; |
| 75 |
} |
| 76 |
} |
| 77 |
|
| 78 |
.nav-link { |
| 79 |
white-space: nowrap; |
| 80 |
border-bottom: 5px solid #ffffff; |
| 81 |
padding: 18px 18px 12px; |
| 82 |
font-size: 14px; |
| 83 |
display: inline-block; |
| 84 |
text-decoration: none; |
| 85 |
color: #1e1e1e; |
| 86 |
|
| 87 |
&.active { |
| 88 |
border-bottom-color: var(--wp-admin-theme-color); |
| 89 |
} |
| 90 |
|
| 91 |
&.separator { |
| 92 |
margin-right: 20px; |
| 93 |
} |
| 94 |
} |
| 95 |
|
| 96 |
.buttons { |
| 97 |
padding: 0 12px; |
| 98 |
|
| 99 |
.tablepress-button { |
| 100 |
cursor: pointer; |
| 101 |
border: 1px solid #ffffff; |
| 102 |
border-radius: 3px; |
| 103 |
align-items: center; |
| 104 |
margin: 10px 12px; |
| 105 |
padding: 6px 4px 6px 12px; |
| 106 |
font-size: 14px; |
| 107 |
line-height: 1; |
| 108 |
text-decoration: none; |
| 109 |
transition: color 0.1s, background-color 0.1s, border-color 0.1s; |
| 110 |
display: inline-flex; |
| 111 |
color: #ffffff; |
| 112 |
background-color: #8ab547; |
| 113 |
border-color: #8ab547; |
| 114 |
|
| 115 |
&:hover, |
| 116 |
&:active, |
| 117 |
&:focus { |
| 118 |
color: #ffffff; |
| 119 |
background-color: #69b547; |
| 120 |
border-color: #69b547; |
| 121 |
} |
| 122 |
|
| 123 |
&.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 |
} |
| 133 |
} |
| 134 |
|
| 135 |
.dashicons { |
| 136 |
margin: 0 6px 0 4px; |
| 137 |
} |
| 138 |
} |
| 139 |
} |
| 140 |
|
| 141 |
/* Margins for messages on screens */ |
| 142 |
div.notice { |
| 143 |
margin: 20px 0 0; |
| 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 |
background: #f0f0f0; |
| 213 |
border-color: #cccccc; |
| 214 |
} |
| 215 |
|
| 216 |
/* Alignment of selects inside of checkbox labels. */ |
| 217 |
.checkbox-select-in-label { |
| 218 |
.components-h-stack { |
| 219 |
align-items: center; |
| 220 |
} |
| 221 |
.components-checkbox-control__label { |
| 222 |
display: flex; |
| 223 |
gap: 8px; |
| 224 |
align-items: center; |
| 225 |
} |
| 226 |
} |
| 227 |
} |
| 228 |
|
| 229 |
/* Width of the columns on the "All Tables" list. */ |
| 230 |
.tablepress-all-tables { |
| 231 |
thead { |
| 232 |
.column-table_id { |
| 233 |
width: 50px; |
| 234 |
} |
| 235 |
.column-table_name { |
| 236 |
width: 30%; |
| 237 |
} |
| 238 |
.column-table_author { |
| 239 |
width: 12%; |
| 240 |
} |
| 241 |
.column-table_last_modified { |
| 242 |
width: 15%; |
| 243 |
} |
| 244 |
} |
| 245 |
|
| 246 |
/* Font weight for the table ID column. */ |
| 247 |
tbody .column-table_id { |
| 248 |
font-weight: bold; |
| 249 |
} |
| 250 |
|
| 251 |
/* Responsiveness on the All Tables screen. */ |
| 252 |
@media screen and (max-width: 782px) { |
| 253 |
.column-table_id { |
| 254 |
display: none !important; |
| 255 |
padding: 3px 8px 3px 35%; |
| 256 |
} |
| 257 |
} |
| 258 |
} |
| 259 |
|
| 260 |
/* Positioning of Search results of WP_List_Tables. */ |
| 261 |
#tablepress-page .subtitle { |
| 262 |
float: left; |
| 263 |
padding: 8px 0 0 0; |
| 264 |
} |
| 265 |
|
| 266 |
/* Tables in postboxes (on the "Edit" and "Plugin Options" screens). */ |
| 267 |
.tablepress-postbox-table { |
| 268 |
border-spacing: 0; |
| 269 |
max-width: 1000px; |
| 270 |
width: 100%; |
| 271 |
|
| 272 |
/* Default column widths */ |
| 273 |
.column-1 { |
| 274 |
width: 25%; |
| 275 |
} |
| 276 |
.column-2 { |
| 277 |
width: 75%; |
| 278 |
} |
| 279 |
|
| 280 |
th { |
| 281 |
text-align: left; |
| 282 |
font-weight: normal; |
| 283 |
} |
| 284 |
th, |
| 285 |
td { |
| 286 |
padding: 2px; |
| 287 |
} |
| 288 |
.top-border { |
| 289 |
th, |
| 290 |
td { |
| 291 |
padding-top: 6px; |
| 292 |
} |
| 293 |
} |
| 294 |
.bottom-border { |
| 295 |
th, |
| 296 |
td { |
| 297 |
padding-bottom: 6px; |
| 298 |
border-bottom: 1px solid #eeeeee; |
| 299 |
} |
| 300 |
} |
| 301 |
.top-align { |
| 302 |
vertical-align: top; |
| 303 |
padding-top: 6px; |
| 304 |
} |
| 305 |
} |
| 306 |
|
| 307 |
/* Select dropdown alignment. */ |
| 308 |
#tablepress-page select { |
| 309 |
vertical-align: baseline; |
| 310 |
} |
| 311 |
|
| 312 |
/* Alignment of textareas and buttons in postboxes. */ |
| 313 |
#tablepress-page textarea:not(.components-textarea-control__input), |
| 314 |
.tablepress-postbox-table .button { |
| 315 |
margin: 1px; |
| 316 |
} |
| 317 |
|
| 318 |
/* Styling of pills in postbox headings. */ |
| 319 |
.postbox .postbox-header .hndle { |
| 320 |
display: inline; |
| 321 |
|
| 322 |
.pill-label { |
| 323 |
display: inline-block; |
| 324 |
vertical-align: top; |
| 325 |
box-sizing: border-box; |
| 326 |
margin: 1px 0 -1px 6px; |
| 327 |
padding: 0 5px; |
| 328 |
min-width: 18px; |
| 329 |
height: 18px; |
| 330 |
border-radius: 9px; |
| 331 |
background-color: var(--wp-admin-theme-color); |
| 332 |
color: #ffffff; |
| 333 |
font-size: 11px; |
| 334 |
line-height: 1.6; |
| 335 |
text-align: center; |
| 336 |
z-index: 26; |
| 337 |
} |
| 338 |
} |
| 339 |
|