| @@ -6,8 +6,13 @@ | ||
| 6 | 6 | * @author Tobias Bäthge |
| 7 | 7 | * @since 1.0.0 |
| 8 | 8 | */ |
| 9 | 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 | + | |
| 10 | 15 | /* Move down the header when the Screen Options or Help tabs are opened. */ |
| 11 | 16 | #screen-meta[style$="block;"] ~ #tablepress-page { |
| 12 | 17 | margin-top: 40px; |
| 13 | 18 | } |
| @@ -40,15 +45,10 @@ | ||
| 40 | 45 | padding-right: 260px; /* Space for the screen meta links. */ |
| 41 | 46 | |
| 42 | 47 | .name { |
| 43 | 48 | border-right: 1px solid #dedae6; |
| 44 | - padding: 12px 24px 6px; | |
| 45 | - | |
| 46 | - img { | |
| 47 | - vertical-align: middle; | |
| 48 | - margin: 0 12px 6px 0; | |
| 49 | - height: 32px; | |
| 50 | - } | |
| 49 | + padding: 7px 20px; | |
| 50 | + line-height: 0; | |
| 51 | 51 | } |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | #tablepress-nav { |
| @@ -69,9 +69,9 @@ | ||
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | li:hover > a, |
| 72 | 72 | li > a:focus { |
| 73 | - border-bottom-color: #049cdb; | |
| 73 | + border-bottom-color: var(--wp-admin-theme-color); | |
| 74 | 74 | background-color: #f9f9f9; |
| 75 | 75 | } |
| 76 | 76 | } |
| 77 | 77 | |
| @@ -84,9 +84,9 @@ | ||
| 84 | 84 | text-decoration: none; |
| 85 | 85 | color: #1e1e1e; |
| 86 | 86 | |
| 87 | 87 | &.active { |
| 88 | - border-bottom-color: #049cdb; | |
| 88 | + border-bottom-color: var(--wp-admin-theme-color); | |
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | &.separator { |
| 92 | 92 | margin-right: 20px; |
| @@ -142,41 +142,89 @@ | ||
| 142 | 142 | div.notice { |
| 143 | 143 | margin: 20px 0 0; |
| 144 | 144 | } |
| 145 | 145 | |
| 146 | - /* Styling for the "Info" icon next to descriptions/notices. */ | |
| 147 | - .info-text { | |
| 148 | - display: flex; | |
| 149 | - gap: 6px; | |
| 146 | + .postbox ul { | |
| 147 | + list-style: disc inside; | |
| 150 | 148 | margin: 0; |
| 151 | 149 | |
| 150 | + > li { | |
| 151 | + margin: 0; | |
| 152 | + } | |
| 153 | + } | |
| 154 | + | |
| 155 | + /* Styling for the "Info" icon next to descriptions/notices. */ | |
| 156 | + .components-h-stack { | |
| 152 | 157 | svg { |
| 153 | 158 | min-width: 24px; |
| 154 | 159 | } |
| 160 | + } | |
| 155 | 161 | |
| 156 | - span { | |
| 157 | - margin-top: 2px; | |
| 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; | |
| 158 | 173 | } |
| 174 | + | |
| 175 | + &.is-opened > .components-panel__body-title { | |
| 176 | + margin: -16px -16px 5px; | |
| 177 | + } | |
| 159 | 178 | } |
| 160 | -} | |
| 161 | 179 | |
| 162 | -/* Styling for the "Add New Table" form. */ | |
| 163 | -#tablepress_add-add-table { | |
| 164 | - .form-wrap { | |
| 165 | - max-width: 500px; | |
| 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 | + } | |
| 166 | 197 | } |
| 167 | 198 | |
| 168 | - .form-field { | |
| 169 | - margin: 0; | |
| 199 | + .components-checkbox-control__input, | |
| 200 | + .components-radio-control__input { | |
| 201 | + &:checked:disabled { | |
| 202 | + opacity: 0.4; | |
| 203 | + } | |
| 170 | 204 | |
| 205 | + &:not(:checked):disabled { | |
| 206 | + background: #f0f0f0; | |
| 207 | + border-color: #cccccc; | |
| 208 | + } | |
| 171 | 209 | } |
| 172 | 210 | |
| 173 | - /* Number of rows/columns in the "Add New Table" form. */ | |
| 174 | - .form-field-small { | |
| 175 | - float: left; | |
| 176 | - width: 150px; | |
| 177 | - margin-right: 20px; | |
| 211 | + .components-text-control__input:disabled { | |
| 212 | + background: #f0f0f0; | |
| 213 | + border-color: #cccccc; | |
| 178 | 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 | + } | |
| 179 | 227 | } |
| 180 | 228 | |
| 181 | 229 | /* Width of the columns on the "All Tables" list. */ |
| 182 | 230 | .tablepress-all-tables { |
| @@ -235,9 +283,8 @@ | ||
| 235 | 283 | } |
| 236 | 284 | th, |
| 237 | 285 | td { |
| 238 | 286 | padding: 2px; |
| 239 | - word-wrap: break-word; | |
| 240 | 287 | } |
| 241 | 288 | .top-border { |
| 242 | 289 | th, |
| 243 | 290 | td { |
| @@ -262,23 +309,18 @@ | ||
| 262 | 309 | vertical-align: baseline; |
| 263 | 310 | } |
| 264 | 311 | |
| 265 | 312 | /* Alignment of textareas and buttons in postboxes. */ |
| 266 | -#tablepress-page textarea, | |
| 313 | +#tablepress-page textarea:not(.components-textarea-control__input), | |
| 267 | 314 | .tablepress-postbox-table .button { |
| 268 | 315 | margin: 1px; |
| 269 | 316 | } |
| 270 | 317 | |
| 271 | -/* Red color for the "Uninstall TablePress" button on the "Plugin Options" screen. */ | |
| 272 | -#uninstall-tablepress { | |
| 273 | - color: #bc0b0b; | |
| 274 | -} | |
| 275 | - | |
| 276 | 318 | /* Styling of pills in postbox headings. */ |
| 277 | 319 | .postbox .postbox-header .hndle { |
| 278 | 320 | display: inline; |
| 279 | 321 | |
| 280 | - .beta-label { | |
| 322 | + .pill-label { | |
| 281 | 323 | display: inline-block; |
| 282 | 324 | vertical-align: top; |
| 283 | 325 | box-sizing: border-box; |
| 284 | 326 | margin: 1px 0 -1px 6px; |
| @@ -285,9 +327,9 @@ | ||
| 285 | 327 | padding: 0 5px; |
| 286 | 328 | min-width: 18px; |
| 287 | 329 | height: 18px; |
| 288 | 330 | border-radius: 9px; |
| 289 | - background-color: #049cdb; | |
| 331 | + background-color: var(--wp-admin-theme-color); | |
| 290 | 332 | color: #ffffff; |
| 291 | 333 | font-size: 11px; |
| 292 | 334 | line-height: 1.6; |
| 293 | 335 | text-align: center; |