PluginProbe
TablePress – Tables in WordPress made easy / 3.3.4
TablePress – Tables in WordPress made easy v3.3.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
tablepress / admin / css / edit.scss

edit.scss in TablePress – Tables in WordPress made easy 3.3.4, at admin/css/edit.scss

301 lines 7.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * CSS code for the "Edit" screen
3 *
4 * @package TablePress
5 * @subpackage Views CSS
6 * @author Tobias Bäthge
7 * @since 1.0.0
8 */
9
10 /* Container for Advanced Editor and Help Box dialogs. */
11 .hidden-container {
12 display: none;
13 }
14
15 .postbox {
16 scroll-margin-top: 72px;
17 }
18
19 /* Positioning of the "Help" button in the header section of a postbox. */
20 .postbox .postbox-header .hndle {
21 &:has(> .help-container) {
22 justify-content: flex-start;
23 gap: 12px;
24 }
25
26 > .help-container {
27 height: 24px;
28 }
29 }
30
31 /* Allow wide postboxes to scroll sideways. */
32 body,
33 div#post-body.metabox-holder.columns-1 {
34 overflow: visible !important;
35 }
36
37 /* Add space between the screen options fieldsets. */
38 #tablepress-screen-options {
39 margin-top: 20px;
40 }
41
42 /* Move backdrop of the wpLink dialog above the "Advanced Editor" dialog. */
43 body #wp-link-backdrop {
44 z-index: 100103;
45 }
46
47 /* Fix height of the wpLink dialog, to prevent vertical scrolling in WP 7.0+. */
48 body[class*="branch-7-"]*="branch-7-""] #wp-link-wrap {
49 height: 642px;
50 margin-top: -321px;
51 }
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
73 /* Table name and ID display in header. */
74 .tablepress-header-table-name,
75 .tablepress-header-table-id {
76 white-space: nowrap;
77 overflow: hidden;
78 text-overflow: ellipsis;
79 }
80
81 /* Background color for the readonly Shortcode text field. */
82 #table-information-shortcode {
83 &,
84 + .components-input-control__suffix {
85 background-color: #f0f0f1;
86 }
87 }
88
89 /* Styling and positioning of buttons in wpdialogs. */
90 .wp-core-ui .ui-dialog {
91 .button {
92 box-shadow: none;
93 }
94 .ui-dialog-buttonset {
95 width: 100%;
96 display: flex;
97 justify-content: space-between;
98 align-items: center;
99 }
100 .button-cancel,
101 .button-cancel:hover {
102 color: #cc1818;
103 border-color: transparent;
104 background-color: transparent;
105 text-decoration: underline;
106 }
107 .button-cancel:hover {
108 text-decoration: none;
109 }
110 }
111
112 /* Content of the Advanced Editor wpdialog. */
113 #advanced-editor {
114 padding: 5px;
115
116 .wp-editor-container {
117 border: none;
118 }
119 }
120
121 #tablepress-page #tablepress_edit-table-data {
122 display: inline-block; /* Stretch to the width of the table... */
123 min-width: calc(100% - 2px); /* but use the full width, minus 2px to account for the borders. */
124 }
125
126 #tablepress_edit-table-manipulation .column-1,
127 #tablepress_edit-table-manipulation .column-2 {
128 width: 50%;
129 }
130
131 /* Jspreadsheet CSS. */
132
133 #table-editor {
134 font-size: 14px;
135 }
136
137 /* Minimum row height, using :after to keep resize animation. */
138 .jexcel > tbody > tr:after {
139 content: "";
140 display: inline-block;
141 min-height: 22px;
142 }
143
144 .jexcel > thead > tr > td {
145 text-align: center !important;
146 z-index: 22; /* Prevent drag corner from floating above fixed header. */
147
148 /* Use custom sorting arrow icons. */
149 &:not(:first-child,.dragging,.dragging-left,.dragging-right) {
150 /* stylelint-disable-next-line function-url-quotes */
151 background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 1792 1792' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23999' d='M1408 1088q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45zm0-384q0 26-19 45t-45 19h-896q-26 0-45-19t-19-45 19-45l448-448q19-19 45-19t45 19l448 448q19 19 19 45z'/%3E%3C/svg%3E");
152 background-position: center right 10px;
153 background-repeat: no-repeat;
154 }
155 &.arrow-up:not(.dragging,.dragging-left,.dragging-right) {
156 /* stylelint-disable-next-line function-url-quotes */
157 background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 1792 1792' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1408 1088q0 26-19 45l-448 448q-19 19-45 19t-45-19l-448-448q-19-19-19-45t19-45 45-19h896q26 0 45 19t19 45z'/%3E%3C/svg%3E");
158 }
159 &.arrow-down:not(.dragging,.dragging-left,.dragging-right) {
160 /* stylelint-disable-next-line function-url-quotes */
161 background-image: url("data:image/svg+xml,%3Csvg width='14' height='14' viewBox='0 0 1792 1792' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1408 704q0 26-19 45t-45 19h-896q-26 0-45-19t-19-45 19-45l448-448q19-19 45-19t45 19l448 448q19 19 19 45z'/%3E%3C/svg%3E");
162 }
163 }
164
165 /* Override default opacity, to not have text shine through when the header row/column is fixed to the top/left of the screen. */
166 .jexcel > thead > tr > td.dragging,
167 .jexcel > tbody > tr.dragging > td {
168 background-color: #ffffff;
169 opacity: 1;
170 }
171
172 .jexcel > tbody > tr > td {
173 vertical-align: top;
174 word-break: break-word;
175 padding: 0;
176
177 &:first-child {
178 padding: 4px;
179 }
180
181 /* Show all lines of text in an edited cell. */
182 &.editing {
183 --table-editor-line-clamp-editing: 0;
184 }
185
186 > div {
187 display: -webkit-box;
188 -webkit-line-clamp: var(--table-editor-line-clamp-editing, var(--table-editor-line-clamp));
189 -webkit-box-orient: vertical;
190 overflow: hidden;
191 padding: 4px;
192 }
193 }
194
195 /* Fixed header. */
196 .admin-bar .jexcel > thead > tr > td {
197 @media screen and (min-width: 601px) {
198 top: calc(var(--wp-admin--admin-bar--height) + 59px); /* Offset of 61px for the Header Bar and 2px to remove top and bottom border. */
199 }
200 @media screen and (min-width: 783px) {
201 top: calc(var(--wp-admin--admin-bar--height) + 52px); /* Offset of 54px for the Header Bar and 2px to remove top and bottom border. */
202 }
203 }
204
205 /* Fixed left column, taking into account the width of the admin bar. */
206 .jexcel > tbody > tr > .jexcel_row {
207 body & {
208 position: sticky;
209 z-index: 21; /* Prevent drag corner from floating above fixed left column. */
210 left: 160px;
211 }
212 body.folded & {
213 left: 36px;
214 }
215 body.auto-fold & {
216 @media only screen and (max-width: 960px) {
217 left: 36px;
218 }
219 @media screen and (max-width: 782px) {
220 left: 0;
221 }
222 }
223 }
224
225 .jexcel tbody tr:nth-child(even) td:not(.jexcel_row) {
226 background-color: #f9f9f9;
227 }
228
229 .jexcel_container .jexcel tbody tr td.highlight {
230 background-color: rgba(0, 94, 255, 0.05);
231 }
232
233 .jexcel_container .jexcel tbody tr.head-row td:not(.jexcel_row):not(.column-hidden),
234 .jexcel_container .jexcel tbody tr.foot-row td:not(.jexcel_row):not(.column-hidden) {
235 background-color: #d9edf7;
236 }
237
238 .jexcel_container .jexcel tbody tr.row-hidden td:not(.jexcel_row),
239 .jexcel_container .jexcel tbody tr td.column-hidden {
240 background-color: rgba(255, 224, 224, 0.7);
241 }
242
243 .jexcel > tbody > tr > .highlight {
244 &-top {
245 border-top: 1px solid rgb(82, 146, 247);
246 }
247 &-left {
248 border-left: 1px solid rgb(82, 146, 247);
249 }
250 &-right {
251 border-right: 1px solid rgb(82, 146, 247);
252 }
253 &-bottom {
254 border-bottom: 1px solid rgb(82, 146, 247);
255 }
256 }
257
258 .jexcel_corner {
259 background-color: rgb(82, 146, 247);
260 }
261
262 .jexcel > tbody > tr > td > textarea {
263 font-size: inherit;
264 box-shadow: none;
265 padding: 3px !important;
266 line-height: 1 !important;
267 }
268
269 /* Fullscreen mode. */
270 .admin-bar .jexcel_container.fullscreen .jexcel > thead > tr > td {
271 top: 0;
272 }
273 .jexcel_container.fullscreen {
274 z-index: 99999;
275 }
276
277 /* Context menu. */
278 .jcontextmenu {
279 margin: 1px; /* Don't trigger actions by accident */
280 z-index: 99999; /* Hover above WP Admin bar */
281
282 > div.header {
283 display: none !important;
284 }
285 > div a {
286 color: #111111;
287 font-size: 14px;
288 }
289 > div {
290 padding: 4px 4px 4px 16px;
291 }
292 > .jcontextmenu-disabled,
293 > .jcontextmenu-disabled a {
294 color: #999999;
295 cursor: default;
296 }
297 > div.jcontextmenu-disabled:hover {
298 background: transparent;
299 }
300 }
301