| 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 |
/* Import spinner and alert box styling. */ |
| 11 |
@import "spinner-alert"; |
| 12 |
|
| 13 |
/* container for Table Preview, Advanced Editor, and Help Box dialogs */ |
| 14 |
.hidden-container { |
| 15 |
display: none; |
| 16 |
} |
| 17 |
|
| 18 |
.help-box { |
| 19 |
padding-top: 0; |
| 20 |
padding-bottom: 0; |
| 21 |
} |
| 22 |
|
| 23 |
/* 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; |
| 31 |
} |
| 32 |
} |
| 33 |
|
| 34 |
/* Allow wide postboxes to scroll sideways. */ |
| 35 |
body, |
| 36 |
div#post-body.metabox-holder.columns-1 { |
| 37 |
overflow: visible !important; |
| 38 |
} |
| 39 |
|
| 40 |
/* Add space between the screen options fieldsets. */ |
| 41 |
#tablepress-screen-options { |
| 42 |
margin-top: 20px; |
| 43 |
} |
| 44 |
|
| 45 |
/* Move backdrop of the wpLink dialog above the "Advanced Editor" dialog */ |
| 46 |
body #wp-link-backdrop { |
| 47 |
z-index: 100103; |
| 48 |
} |
| 49 |
|
| 50 |
/* Table Preview (CSS for actual preview is directly in the preview HTML) */ |
| 51 |
#table-preview { |
| 52 |
padding: 0; |
| 53 |
} |
| 54 |
#table-preview-iframe { |
| 55 |
width: 100%; |
| 56 |
height: 100%; |
| 57 |
} |
| 58 |
|
| 59 |
/* Styling and positioning of buttons in wpdialogs */ |
| 60 |
.ui-dialog .button { |
| 61 |
box-shadow: none; |
| 62 |
} |
| 63 |
.ui-dialog .ui-dialog-buttonset { |
| 64 |
width: 100%; |
| 65 |
} |
| 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; |
| 72 |
} |
| 73 |
.ui-dialog .button-ok { |
| 74 |
float: right; |
| 75 |
} |
| 76 |
|
| 77 |
/* Content of the Advanced Editor wpdialog */ |
| 78 |
#advanced-editor { |
| 79 |
padding: 5px; |
| 80 |
} |
| 81 |
#advanced-editor .wp-editor-container { |
| 82 |
border: none; |
| 83 |
} |
| 84 |
|
| 85 |
#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. */ |
| 88 |
} |
| 89 |
|
| 90 |
#tablepress-page .button { |
| 91 |
vertical-align: baseline; |
| 92 |
} |
| 93 |
|
| 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 |
#table-editor { |
| 118 |
font-size: 14px; |
| 119 |
} |
| 120 |
|
| 121 |
/* Jspreadsheet CSS * / |
| 122 |
|
| 123 |
/* Minimum row height, using :after to keep resize animation */ |
| 124 |
.jexcel > tbody > tr:after { |
| 125 |
content: ""; |
| 126 |
display: inline-block; |
| 127 |
min-height: 22px; |
| 128 |
} |
| 129 |
|
| 130 |
.jexcel > thead > tr > td { |
| 131 |
text-align: center !important; |
| 132 |
z-index: 22; /* Prevent drag corner from floating above fixed header. */ |
| 133 |
|
| 134 |
/* Use custom sorting arrow icons. */ |
| 135 |
&:not(:first-child,.dragging,.dragging-left,.dragging-right) { |
| 136 |
/* stylelint-disable-next-line function-url-quotes */ |
| 137 |
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"); |
| 138 |
background-position: center right 10px; |
| 139 |
background-repeat: no-repeat; |
| 140 |
} |
| 141 |
&.arrow-up:not(.dragging,.dragging-left,.dragging-right) { |
| 142 |
/* stylelint-disable-next-line function-url-quotes */ |
| 143 |
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"); |
| 144 |
} |
| 145 |
&.arrow-down:not(.dragging,.dragging-left,.dragging-right) { |
| 146 |
/* stylelint-disable-next-line function-url-quotes */ |
| 147 |
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"); |
| 148 |
} |
| 149 |
} |
| 150 |
|
| 151 |
/* Override default opacity, to not have text shine through when the header row/column is fixed to the top/left of the screen. */ |
| 152 |
.jexcel > thead > tr > td.dragging, |
| 153 |
.jexcel > tbody > tr.dragging > td { |
| 154 |
background-color: #ffffff; |
| 155 |
opacity: 1; |
| 156 |
} |
| 157 |
|
| 158 |
.jexcel > tbody > tr > td { |
| 159 |
vertical-align: top; |
| 160 |
word-break: break-word; |
| 161 |
padding: 0; |
| 162 |
} |
| 163 |
.jexcel > tbody > tr > td:first-child { |
| 164 |
padding: 4px; |
| 165 |
} |
| 166 |
|
| 167 |
/* Show all lines of text in an edited cell. */ |
| 168 |
.jexcel > tbody > tr > td.editing { |
| 169 |
--table-editor-line-clamp-editing: 0; |
| 170 |
} |
| 171 |
|
| 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; |
| 178 |
} |
| 179 |
|
| 180 |
/* Fixed header */ |
| 181 |
@media screen and (min-width: 601px) { |
| 182 |
.admin-bar .jexcel > thead > tr > td { |
| 183 |
top: 46px; |
| 184 |
} |
| 185 |
} |
| 186 |
@media screen and (min-width: 783px) { |
| 187 |
.admin-bar .jexcel > thead > tr > td { |
| 188 |
top: 31px; |
| 189 |
} |
| 190 |
} |
| 191 |
|
| 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 { |
| 203 |
left: 36px; |
| 204 |
} |
| 205 |
} |
| 206 |
@media screen and (max-width: 782px) { |
| 207 |
body.auto-fold .jexcel > tbody > tr > .jexcel_row { |
| 208 |
left: 0; |
| 209 |
} |
| 210 |
} |
| 211 |
|
| 212 |
.jexcel tbody tr:nth-child(even) td:not(.jexcel_row) { |
| 213 |
background-color: #f9f9f9; |
| 214 |
} |
| 215 |
|
| 216 |
.jexcel_container .jexcel tbody tr td.highlight { |
| 217 |
background-color: rgba(0, 94, 255, 0.05); |
| 218 |
} |
| 219 |
|
| 220 |
.jexcel_container .jexcel tbody tr.head-row td:not(.jexcel_row):not(.column-hidden), |
| 221 |
.jexcel_container .jexcel tbody tr.foot-row td:not(.jexcel_row):not(.column-hidden) { |
| 222 |
background-color: #d9edf7; |
| 223 |
} |
| 224 |
|
| 225 |
.jexcel_container .jexcel tbody tr.row-hidden td:not(.jexcel_row), |
| 226 |
.jexcel_container .jexcel tbody tr td.column-hidden { |
| 227 |
background-color: rgba(255, 224, 224, 0.7); |
| 228 |
} |
| 229 |
|
| 230 |
.jexcel > tbody > tr > .highlight-top { |
| 231 |
border-top: 1px solid rgb(82, 146, 247); |
| 232 |
} |
| 233 |
|
| 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 |
.jexcel_corner { |
| 247 |
background-color: rgb(82, 146, 247); |
| 248 |
} |
| 249 |
|
| 250 |
.jexcel > tbody > tr > td > textarea { |
| 251 |
font-size: inherit; |
| 252 |
box-shadow: none; |
| 253 |
padding: 3px !important; |
| 254 |
line-height: 1 !important; |
| 255 |
} |
| 256 |
|
| 257 |
/* Fullscreen mode */ |
| 258 |
.admin-bar .jexcel_container.fullscreen .jexcel > thead > tr > td { |
| 259 |
top: 0; |
| 260 |
} |
| 261 |
.jexcel_container.fullscreen { |
| 262 |
z-index: 99999; |
| 263 |
} |
| 264 |
|
| 265 |
/* Context menu */ |
| 266 |
.jcontextmenu { |
| 267 |
margin: 1px; /* Don't trigger actions by accident */ |
| 268 |
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 |
} |
| 288 |
|
| 289 |
/* WP Feature Pointers */ |
| 290 |
.pointer-tp21_edit_screen_options .wp-pointer-arrow { |
| 291 |
left: 225px; |
| 292 |
} |
| 293 |
|