PluginProbe
TablePress – Tables in WordPress made easy / 3.4
TablePress – Tables in WordPress made easy v3.4
3.4 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 All 45 releases
← All changes | admin/css/edit.scss +229 -145 2.1.8 → 3.4 View file →
@@ -6,30 +6,27 @@
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;
26 -}
27 -@media screen and (min-width: 783px) {
28 - .postbox-header .handle-actions .button-module-help {
29 - position: relative;
30 - top: -5px;
20 +.postbox .postbox-header .hndle {
21 + &:has(> .help-container) {
22 + justify-content: flex-start;
23 + gap: 12px;
31 24 }
25 +
26 + > .help-container {
27 + height: 24px;
28 + }
32 29 }
33 30
34 31 /* Allow wide postboxes to scroll sideways. */
35 32 body,
@@ -41,87 +38,170 @@
41 38 #tablepress-screen-options {
42 39 margin-top: 20px;
43 40 }
44 41
45 -/* Move backdrop of the wpLink dialog above the "Advanced Editor" dialog */
42 +/* Move backdrop of the wpLink dialog above the "Advanced Editor" dialog. */
46 43 body #wp-link-backdrop {
47 44 z-index: 100103;
48 45 }
49 46
50 -/* Table Preview (CSS for actual preview is directly in the preview HTML) */
51 -#table-preview {
52 - 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;
53 51 }
54 -#table-preview-iframe {
55 - width: 100%;
56 - height: 100%;
52 +
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. */
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
59 -/* Styling and positioning of buttons in wpdialogs */
60 -.ui-dialog .button {
61 - box-shadow: none;
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;
62 100 }
63 -.ui-dialog .ui-dialog-buttonset {
64 - width: 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 + }
65 150 }
66 -.ui-dialog .button-cancel,
67 -.ui-dialog .button-cancel:hover {
68 - color: #b32d2e;
69 - border-color: transparent;
70 - background-color: transparent;
71 - text-decoration: underline;
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 + }
72 158 }
73 -.ui-dialog .button-ok {
74 - float: right;
159 +
160 +/* Styling and positioning of buttons in wpdialogs. */
161 +.wp-core-ui .ui-dialog {
162 + .button {
163 + box-shadow: none;
164 + }
165 + .ui-dialog-buttonset {
166 + width: 100%;
167 + display: flex;
168 + justify-content: space-between;
169 + align-items: center;
170 + }
171 + .button-cancel,
172 + .button-cancel:hover {
173 + color: #cc1818;
174 + border-color: transparent;
175 + background-color: transparent;
176 + text-decoration: underline;
177 + }
178 + .button-cancel:hover {
179 + text-decoration: none;
180 + }
75 181 }
76 182
77 -/* Content of the Advanced Editor wpdialog */
183 +/* Content of the Advanced Editor wpdialog. */
78 184 #advanced-editor {
79 185 padding: 5px;
186 +
187 + .wp-editor-container {
188 + border: none;
189 + }
80 190 }
81 -#advanced-editor .wp-editor-container {
82 - border: none;
83 -}
84 191
85 192 #tablepress-page #tablepress_edit-table-data {
86 - display: inline-block; /* Stretch to the width of the table. */
87 - 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. */
88 195 }
89 196
90 -#tablepress-page .button {
91 - vertical-align: baseline;
92 -}
197 +/* Jspreadsheet CSS. */
93 198
94 -#table-id-shortcode-wrapper {
95 - display: flex;
96 - justify-content: space-between;
97 - flex-wrap: wrap;
98 - width: 99%;
99 - gap: 5px 0;
100 -}
101 -#table-information-shortcode {
102 - margin: 0 -1px 0 1px;
103 -}
104 -
105 -#tablepress_edit-table-manipulation .column-1,
106 -#tablepress_edit-table-manipulation .column-2 {
107 - width: 50%;
108 -}
109 -
110 -/* Align with checkbox labels */
111 -.checkbox-left {
112 - display: inline-block;
113 - padding-left: 1.25rem; /* Checkboxes are 1rem wide + 0.25rem margin. */
114 - padding-top: 8px;
115 -}
116 -
117 199 #table-editor {
118 200 font-size: 14px;
119 201 }
120 202
121 -/* Jspreadsheet CSS * /
122 -
123 -/* Minimum row height, using :after to keep resize animation */
203 +/* Minimum row height, using :after to keep resize animation. */
124 204 .jexcel > tbody > tr:after {
125 205 content: "";
126 206 display: inline-block;
127 207 min-height: 22px;
@@ -156,57 +236,56 @@
156 236 }
157 237
158 238 .jexcel > tbody > tr > td {
159 239 vertical-align: top;
160 - word-break: break-word;
240 + word-break: break-word; /* stylelint-disable-line declaration-property-value-keyword-no-deprecated */
161 241 padding: 0;
162 -}
163 -.jexcel > tbody > tr > td:first-child {
164 - padding: 4px;
165 -}
166 242
167 -/* Show all lines of text in an edited cell. */
168 -.jexcel > tbody > tr > td.editing {
169 - --table-editor-line-clamp-editing: 0;
170 -}
243 + &:first-child {
244 + padding: 4px;
245 + }
171 246
172 -.jexcel > tbody > tr > td > div {
173 - display: -webkit-box;
174 - -webkit-line-clamp: var(--table-editor-line-clamp-editing, var(--table-editor-line-clamp));
175 - -webkit-box-orient: vertical;
176 - overflow: hidden;
177 - padding: 4px;
247 + /* Show all lines of text in an edited cell. */
248 + &.editing {
249 + --table-editor-line-clamp-editing: 0;
250 + }
251 +
252 + > div {
253 + display: -webkit-box;
254 + -webkit-line-clamp: var(--table-editor-line-clamp-editing, var(--table-editor-line-clamp));
255 + -webkit-box-orient: vertical;
256 + overflow: hidden;
257 + padding: 4px;
258 + }
178 259 }
179 260
180 -/* Fixed header */
181 -@media screen and (min-width: 601px) {
182 - .admin-bar .jexcel > thead > tr > td {
183 - top: 46px;
261 +/* Fixed header. */
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. */
184 265 }
185 -}
186 -@media screen and (min-width: 783px) {
187 - .admin-bar .jexcel > thead > tr > td {
188 - top: 31px;
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. */
189 268 }
190 269 }
191 270
192 -/* Fixed left column, taking into account the width of the admin bar */
193 -body .jexcel > tbody > tr > .jexcel_row {
194 - position: sticky;
195 - z-index: 21; /* Prevent drag corner from floating above fixed left column. */
196 - left: 160px;
197 -}
198 -body.folded .jexcel > tbody > tr > .jexcel_row {
199 - left: 36px;
200 -}
201 -@media only screen and (max-width: 960px) {
202 - body.auto-fold .jexcel > tbody > tr > .jexcel_row {
271 +/* Fixed left column, taking into account the width of the admin menu. */
272 +.jexcel > tbody > tr > .jexcel_row {
273 + body & {
274 + position: sticky;
275 + z-index: 21; /* Prevent drag corner from floating above fixed left column. */
276 + left: 160px;
277 + }
278 + body.folded & {
203 279 left: 36px;
204 280 }
205 -}
206 -@media screen and (max-width: 782px) {
207 - body.auto-fold .jexcel > tbody > tr > .jexcel_row {
208 - left: 0;
281 + body.auto-fold & {
282 + @media only screen and (max-width: 960px) {
283 + left: 36px;
284 + }
285 + @media screen and (max-width: 782px) {
286 + left: 0;
287 + }
209 288 }
210 289 }
211 290
212 291 .jexcel tbody tr:nth-child(even) td:not(.jexcel_row) {
@@ -226,24 +305,23 @@
226 305 .jexcel_container .jexcel tbody tr td.column-hidden {
227 306 background-color: rgba(255, 224, 224, 0.7);
228 307 }
229 308
230 -.jexcel > tbody > tr > .highlight-top {
231 - border-top: 1px solid rgb(82, 146, 247);
309 +.jexcel > tbody > tr > .highlight {
310 + &-top {
311 + border-top: 1px solid rgb(82, 146, 247);
312 + }
313 + &-left {
314 + border-left: 1px solid rgb(82, 146, 247);
315 + }
316 + &-right {
317 + border-right: 1px solid rgb(82, 146, 247);
318 + }
319 + &-bottom {
320 + border-bottom: 1px solid rgb(82, 146, 247);
321 + }
232 322 }
233 323
234 -.jexcel > tbody > tr > .highlight-left {
235 - border-left: 1px solid rgb(82, 146, 247);
236 -}
237 -
238 -.jexcel > tbody > tr > .highlight-right {
239 - border-right: 1px solid rgb(82, 146, 247);
240 -}
241 -
242 -.jexcel > tbody > tr > .highlight-bottom {
243 - border-bottom: 1px solid rgb(82, 146, 247);
244 -}
245 -
246 324 .jexcel_corner {
247 325 background-color: rgb(82, 146, 247);
248 326 }
249 327
@@ -253,9 +331,9 @@
253 331 padding: 3px !important;
254 332 line-height: 1 !important;
255 333 }
256 334
257 -/* Fullscreen mode */
335 +/* Fullscreen mode. */
258 336 .admin-bar .jexcel_container.fullscreen .jexcel > thead > tr > td {
259 337 top: 0;
260 338 }
261 339 .jexcel_container.fullscreen {
@@ -261,32 +339,38 @@
261 339 .jexcel_container.fullscreen {
262 340 z-index: 99999;
263 341 }
264 342
265 -/* Context menu */
343 +/* Context menu. */
266 344 .jcontextmenu {
267 345 margin: 1px; /* Don't trigger actions by accident */
268 346 z-index: 99999; /* Hover above WP Admin bar */
269 -}
270 -.jcontextmenu > div.header {
271 - display: none !important;
272 -}
273 -.jcontextmenu > div a {
274 - color: #111111;
275 - font-size: 14px;
276 -}
277 -.jcontextmenu > div {
278 - padding: 4px 4px 4px 16px;
279 -}
280 -.jcontextmenu > .jcontextmenu-disabled,
281 -.jcontextmenu > .jcontextmenu-disabled a {
282 - color: #999999;
283 - cursor: default;
284 -}
285 -.jcontextmenu > div.jcontextmenu-disabled:hover {
286 - background: transparent;
287 -}
347 + background-color: var(--wpds-color-background-surface-neutral-strong, #ffffff); /* stylelint-disable-line plugin-wpds/no-token-fallback-values */
348 + border-radius: 4px;
288 349
289 -/* WP Feature Pointers */
290 -.pointer-tp21_edit_screen_options .wp-pointer-arrow {
291 - left: 225px;
350 + > div {
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 + }
367 + }
368 + > .jcontextmenu-disabled,
369 + > .jcontextmenu-disabled a {
370 + color: #999999;
371 + cursor: default;
372 + }
373 + > div.jcontextmenu-disabled:hover {
374 + background: transparent;
375 + }
292 376 }