| @@ -6,28 +6,26 @@ | ||
| 6 | 6 | * @author Tobias Bäthge |
| 7 | 7 | * @since 1.0.0 |
| 8 | 8 | */ |
| 9 | 9 | |
| 10 | -/* Import spinner and alert box styling. */ | |
| 11 | -@import "spinner-alert"; | |
| 12 | - | |
| 13 | -/* Container for Table Preview, Advanced Editor, and Help Box dialogs. */ | |
| 10 | +/* Container for Advanced Editor and Help Box dialogs. */ | |
| 14 | 11 | .hidden-container { |
| 15 | 12 | display: none; |
| 16 | 13 | } |
| 17 | 14 | |
| 18 | -.help-box { | |
| 19 | - padding-top: 0; | |
| 20 | - padding-bottom: 0; | |
| 15 | +.postbox { | |
| 16 | + scroll-margin-top: 72px; | |
| 21 | 17 | } |
| 22 | 18 | |
| 23 | 19 | /* Positioning of the "Help" button in the header section of a postbox. */ |
| 24 | -.postbox-header .handle-actions .button-module-help { | |
| 25 | - margin-right: 10px; | |
| 20 | +.postbox .postbox-header .hndle { | |
| 21 | + &:has(> .help-container) { | |
| 22 | + justify-content: flex-start; | |
| 23 | + gap: 12px; | |
| 24 | + } | |
| 26 | 25 | |
| 27 | - @media screen and (min-width: 783px) { | |
| 28 | - position: relative; | |
| 29 | - top: -5px; | |
| 26 | + > .help-container { | |
| 27 | + height: 24px; | |
| 30 | 28 | } |
| 31 | 29 | } |
| 32 | 30 | |
| 33 | 31 | /* Allow wide postboxes to scroll sideways. */ |
| @@ -45,39 +43,145 @@ | ||
| 45 | 43 | body #wp-link-backdrop { |
| 46 | 44 | z-index: 100103; |
| 47 | 45 | } |
| 48 | 46 | |
| 49 | -/* Table Preview (CSS for actual preview is directly in the preview HTML). */ | |
| 50 | -#table-preview { | |
| 51 | - padding: 0; | |
| 47 | +/* Fix height of the wpLink dialog, to prevent vertical scrolling in WP 7.0+. */ | |
| 48 | +body[class*="branch-7-"] #wp-link-wrap { | |
| 49 | + height: 642px; | |
| 50 | + margin-top: -321px; | |
| 51 | +} | |
| 52 | 52 | |
| 53 | - &-iframe { | |
| 54 | - width: 100%; | |
| 55 | - height: 100%; | |
| 53 | +/* Header Bar. */ | |
| 54 | +#tablepress-header-bar-section { | |
| 55 | + margin-bottom: 20px; | |
| 56 | + padding: 8px 12px; | |
| 57 | + border: 1px solid #c3c4c7; | |
| 58 | + background: #ffffff; | |
| 59 | + | |
| 60 | + /* Sticky at top of page. */ | |
| 61 | + @media screen and (min-width: 601px) { | |
| 62 | + position: sticky; | |
| 63 | + top: calc(var(--wp-admin--admin-bar--height, 32px) - 1px); /* 1px offset to remove top border. */ | |
| 64 | + z-index: 9989; /* Above the table editor, but below the admin menu and WP Pointers. */ | |
| 56 | 65 | } |
| 66 | + /* Full width on smaller screens, to prevent the table editor from being visible near the right edge when scrolling. */ | |
| 67 | + @media screen and (min-width: 601px) and (max-width: 782px) { | |
| 68 | + margin-left: -11px; | |
| 69 | + margin-right: -21px; | |
| 70 | + } | |
| 71 | + | |
| 72 | + /* Fixed left header bar, taking into account the width of the admin menu. */ | |
| 73 | + .tablepress-header-bar-wrapper { | |
| 74 | + max-width: 1000px; | |
| 75 | + | |
| 76 | + body & { | |
| 77 | + position: sticky; | |
| 78 | + left: 172px; | |
| 79 | + } | |
| 80 | + body.folded & { | |
| 81 | + left: 48px; | |
| 82 | + } | |
| 83 | + body.auto-fold & { | |
| 84 | + @media only screen and (max-width: 960px) { | |
| 85 | + left: 48px; | |
| 86 | + } | |
| 87 | + @media screen and (max-width: 782px) { | |
| 88 | + left: 0; | |
| 89 | + } | |
| 90 | + } | |
| 91 | + } | |
| 57 | 92 | } |
| 58 | 93 | |
| 94 | +/* Table name and ID display in header. */ | |
| 95 | +.tablepress-header-table-name, | |
| 96 | +.tablepress-header-table-id { | |
| 97 | + white-space: nowrap; | |
| 98 | + overflow: hidden; | |
| 99 | + text-overflow: ellipsis; | |
| 100 | +} | |
| 101 | + | |
| 102 | +/* Table Editor Toolbar. */ | |
| 103 | +#tablepress-table-editor-toolbar-section { | |
| 104 | + margin: -6px 0 0; | |
| 105 | + padding: 4px 0; | |
| 106 | + background: #ffffff; | |
| 107 | + | |
| 108 | + /* Sticky at top of page. */ | |
| 109 | + @media screen and (min-width: 601px) { | |
| 110 | + position: sticky; | |
| 111 | + top: calc(var(--wp-admin--admin-bar--height, 32px) + 53px); | |
| 112 | + z-index: 9988; /* Above the table editor, but below the admin menu, WP Pointers, and the Header Bar. */ | |
| 113 | + } | |
| 114 | + @media screen and (min-width: 601px) and (max-width: 782px) { | |
| 115 | + top: calc(var(--wp-admin--admin-bar--height, 32px) + 60px); | |
| 116 | + } | |
| 117 | + | |
| 118 | + /* Fixed left toolbar, taking into account the width of the admin menu. */ | |
| 119 | + .tablepress-toolbar-scroll-wrapper { | |
| 120 | + body & { | |
| 121 | + position: sticky; | |
| 122 | + left: 172px; | |
| 123 | + width: auto; | |
| 124 | + } | |
| 125 | + body.folded & { | |
| 126 | + left: 48px; | |
| 127 | + } | |
| 128 | + body.auto-fold & { | |
| 129 | + @media only screen and (max-width: 960px) { | |
| 130 | + left: 48px; | |
| 131 | + } | |
| 132 | + @media screen and (max-width: 782px) { | |
| 133 | + left: 0; | |
| 134 | + } | |
| 135 | + } | |
| 136 | + } | |
| 137 | + | |
| 138 | + /* Backward compatibility with WP < 6.9. */ | |
| 139 | + .components-button.is-compact.has-icon:not(.has-text) { | |
| 140 | + width: auto; | |
| 141 | + } | |
| 142 | + | |
| 143 | + .tablepress-toolbar-button-text { | |
| 144 | + font-weight: normal; | |
| 145 | + | |
| 146 | + @media screen and (max-width: 600px) { | |
| 147 | + display: none; | |
| 148 | + } | |
| 149 | + } | |
| 150 | +} | |
| 151 | + | |
| 152 | +/* Background color for the readonly Shortcode text field. */ | |
| 153 | +#table-information-shortcode { | |
| 154 | + &, | |
| 155 | + + .components-input-control__suffix { | |
| 156 | + background-color: #f0f0f1; | |
| 157 | + } | |
| 158 | +} | |
| 159 | + | |
| 59 | 160 | /* Styling and positioning of buttons in wpdialogs. */ |
| 60 | -.ui-dialog { | |
| 161 | +.wp-core-ui .ui-dialog { | |
| 61 | 162 | .button { |
| 62 | 163 | box-shadow: none; |
| 63 | 164 | } |
| 64 | 165 | .ui-dialog-buttonset { |
| 65 | 166 | width: 100%; |
| 167 | + display: flex; | |
| 168 | + justify-content: space-between; | |
| 169 | + align-items: center; | |
| 66 | 170 | } |
| 67 | 171 | .button-cancel, |
| 68 | 172 | .button-cancel:hover { |
| 69 | - color: #b32d2e; | |
| 173 | + color: #cc1818; | |
| 70 | 174 | border-color: transparent; |
| 71 | 175 | background-color: transparent; |
| 72 | 176 | text-decoration: underline; |
| 73 | 177 | } |
| 74 | - .button-ok { | |
| 75 | - float: right; | |
| 178 | + .button-cancel:hover { | |
| 179 | + text-decoration: none; | |
| 76 | 180 | } |
| 77 | 181 | } |
| 78 | 182 | |
| 79 | -/* Content of the Advanced Editor wpdialog */ | |
| 183 | +/* Content of the Advanced Editor wpdialog. */ | |
| 80 | 184 | #advanced-editor { |
| 81 | 185 | padding: 5px; |
| 82 | 186 | |
| 83 | 187 | .wp-editor-container { |
| @@ -85,46 +189,19 @@ | ||
| 85 | 189 | } |
| 86 | 190 | } |
| 87 | 191 | |
| 88 | 192 | #tablepress-page #tablepress_edit-table-data { |
| 89 | - display: inline-block; /* Stretch to the width of the table. */ | |
| 90 | - min-width: 99.9%; /* but use the full width, minus approx. 1px as the box is wider than the others otherwise. */ | |
| 193 | + display: inline-block; /* Stretch to the width of the table... */ | |
| 194 | + min-width: calc(100% - 2px); /* but use the full width, minus 2px to account for the borders. */ | |
| 91 | 195 | } |
| 92 | 196 | |
| 93 | -#tablepress-page .button { | |
| 94 | - vertical-align: baseline; | |
| 95 | -} | |
| 197 | +/* Jspreadsheet CSS. */ | |
| 96 | 198 | |
| 97 | -#table-id-shortcode-wrapper { | |
| 98 | - display: flex; | |
| 99 | - justify-content: space-between; | |
| 100 | - flex-wrap: wrap; | |
| 101 | - width: 99%; | |
| 102 | - gap: 5px 0; | |
| 103 | -} | |
| 104 | -#table-information-shortcode { | |
| 105 | - margin: 0 -1px 0 1px; | |
| 106 | -} | |
| 107 | - | |
| 108 | -#tablepress_edit-table-manipulation .column-1, | |
| 109 | -#tablepress_edit-table-manipulation .column-2 { | |
| 110 | - width: 50%; | |
| 111 | -} | |
| 112 | - | |
| 113 | -/* Align with checkbox labels */ | |
| 114 | -.checkbox-left { | |
| 115 | - display: inline-block; | |
| 116 | - padding-left: 1.25rem; /* Checkboxes are 1rem wide + 0.25rem margin. */ | |
| 117 | - padding-top: 8px; | |
| 118 | -} | |
| 119 | - | |
| 120 | 199 | #table-editor { |
| 121 | 200 | font-size: 14px; |
| 122 | 201 | } |
| 123 | 202 | |
| 124 | -/* Jspreadsheet CSS * / | |
| 125 | - | |
| 126 | -/* Minimum row height, using :after to keep resize animation */ | |
| 203 | +/* Minimum row height, using :after to keep resize animation. */ | |
| 127 | 204 | .jexcel > tbody > tr:after { |
| 128 | 205 | content: ""; |
| 129 | 206 | display: inline-block; |
| 130 | 207 | min-height: 22px; |
| @@ -159,9 +236,9 @@ | ||
| 159 | 236 | } |
| 160 | 237 | |
| 161 | 238 | .jexcel > tbody > tr > td { |
| 162 | 239 | vertical-align: top; |
| 163 | - word-break: break-word; | |
| 240 | + word-break: break-word; /* stylelint-disable-line declaration-property-value-keyword-no-deprecated */ | |
| 164 | 241 | padding: 0; |
| 165 | 242 | |
| 166 | 243 | &:first-child { |
| 167 | 244 | padding: 4px; |
| @@ -181,15 +258,18 @@ | ||
| 181 | 258 | } |
| 182 | 259 | } |
| 183 | 260 | |
| 184 | 261 | /* Fixed header. */ |
| 185 | -@media screen and (min-width: 601px) { | |
| 186 | - .admin-bar .jexcel > thead > tr > td { | |
| 187 | - top: calc(var(--wp-admin--admin-bar--height) - 1px) /* 1px offset to remove top cell border. */; | |
| 262 | +.admin-bar .jexcel > thead > tr > td { | |
| 263 | + @media screen and (min-width: 601px) { | |
| 264 | + top: calc(var(--wp-admin--admin-bar--height) + 118px); /* Offset for the Header Bar and Toolbar, minus top and bottom borders. */ | |
| 188 | 265 | } |
| 266 | + @media screen and (min-width: 783px) { | |
| 267 | + top: calc(var(--wp-admin--admin-bar--height) + 111px); /* Offset for the Header Bar and Toolbar, minus top and bottom borders. */ | |
| 268 | + } | |
| 189 | 269 | } |
| 190 | 270 | |
| 191 | -/* Fixed left column, taking into account the width of the admin bar. */ | |
| 271 | +/* Fixed left column, taking into account the width of the admin menu. */ | |
| 192 | 272 | .jexcel > tbody > tr > .jexcel_row { |
| 193 | 273 | body & { |
| 194 | 274 | position: sticky; |
| 195 | 275 | z-index: 21; /* Prevent drag corner from floating above fixed left column. */ |
| @@ -263,18 +343,28 @@ | ||
| 263 | 343 | /* Context menu. */ |
| 264 | 344 | .jcontextmenu { |
| 265 | 345 | margin: 1px; /* Don't trigger actions by accident */ |
| 266 | 346 | z-index: 99999; /* Hover above WP Admin bar */ |
| 347 | + background-color: var(--wpds-color-background-surface-neutral-strong, #ffffff); /* stylelint-disable-line plugin-wpds/no-token-fallback-values */ | |
| 348 | + border-radius: 4px; | |
| 267 | 349 | |
| 268 | - > div.header { | |
| 269 | - display: none !important; | |
| 270 | - } | |
| 271 | - > div a { | |
| 272 | - color: #111111; | |
| 273 | - font-size: 14px; | |
| 274 | - } | |
| 275 | 350 | > div { |
| 276 | 351 | padding: 4px 4px 4px 16px; |
| 352 | + color: var(--wpds-color-foreground-interactive-neutral, #1e1e1e); /* stylelint-disable-line plugin-wpds/no-token-fallback-values */ | |
| 353 | + font-family: var(--wpds-typography-font-family-body, -apple-system, system-ui, "Segoe UI", "Roboto", "Oxygen-Sans", "Ubuntu", "Cantarell", "Helvetica Neue", sans-serif); /* stylelint-disable-line plugin-wpds/no-token-fallback-values */ | |
| 354 | + | |
| 355 | + &.header { | |
| 356 | + display: none !important; | |
| 357 | + } | |
| 358 | + | |
| 359 | + &:hover { | |
| 360 | + background-color: var(--wpds-color-background-interactive-brand-weak-active, color-mix(in oklch, var(--wp-admin-theme-color, #3858e9) 12%, #ffffff)); /* stylelint-disable-line plugin-wpds/no-token-fallback-values */ | |
| 361 | + } | |
| 362 | + | |
| 363 | + a { | |
| 364 | + font-size: 13px; | |
| 365 | + color: #1e1e1e; | |
| 366 | + } | |
| 277 | 367 | } |
| 278 | 368 | > .jcontextmenu-disabled, |
| 279 | 369 | > .jcontextmenu-disabled a { |
| 280 | 370 | color: #999999; |
| @@ -282,9 +372,5 @@ | ||
| 282 | 372 | } |
| 283 | 373 | > div.jcontextmenu-disabled:hover { |
| 284 | 374 | background: transparent; |
| 285 | 375 | } |
| 286 | -} | |
| 287 | -/* WP Feature Pointers */ | |
| 288 | -.pointer-tp21_edit_screen_options .wp-pointer-arrow { | |
| 289 | - left: 225px; | |
| 290 | 376 | } |