1/** 2 * This file provides styles for the edit view (?do=edit), preview 3 * and section edit buttons. 4 */ 5 6/* edit view 7********************************************************************/ 8 9.mode_edit div.editBox { 10} 11 12.mode_edit div.editBox button { 13 border: #666 solid 1px; 14 border-radius: 1px; 15 padding: 3pt 6pt; 16 margin: 0 2px; 17 cursor: pointer; 18} 19 20.mode_edit div.editButtons button:hover { 21 text-decoration: underline; 22} 23.mode_edit div.editBox button:focus { 24 outline: @ini_focus_color solid 2px; 25 background-color: @ini_background; 26} 27 28/*____________ toolbar ____________*/ 29 30.mode_edit .editBox > .toolbar, 31.mode_preview .editBox > .toolbar { 32 display: block; 33 position: -webkit-sticky; 34 position: sticky; 35 top: 0; 36 background-color: fadeout(@ini_background, 20%); 37 padding-bottom: 2px; 38 z-index: 9; 39} 40 41 42.mode_edit div.toolbar, 43.mode_preview div.toolbar { 44 display: inline-block; 45} 46#draft__status { 47 font-size: small; 48 color: @ini_text_alt; 49 background-color: inherit; 50} 51[dir=rtl] #draft__status { 52 /* float: left; */ 53} 54#tool__bar { 55 float: left; 56} 57[dir=rtl] #tool__bar { 58 float: right; 59} 60 61#tool__bar button { 62 background: @ini_background_alt none center no-repeat; 63 background-size: 20px; 64 padding: 3pt 5pt 1pt 5pt; 65 border: @ini_border solid 1px; 66 margin-right: 2pt; 67} 68#tool__bar button:hover { 69 background-color: @ini_background_neu; 70} 71#tool__bar button[aria-haspopup=true]:after, 72#tool__bar button:nth-child(10):after, 73#tool__bar button:nth-child(15):after { 74 content: ''; 75 display: inline-block; 76 position: absolute; 77 width: 8px; 78 height: 8px; 79 margin-left: -2px; 80 margin-top: 14px; 81 background: transparent none center no-repeat; 82 background-size: 13px; 83} 84 85/* buttons inside of toolbar */ 86.mode_edit div.toolbar button.toolbutton { 87 margin: 0; 88} 89/* picker popups (outside of .dokuwiki) */ 90div.picker { 91 width: 300px; 92 border: 1px solid #CCC; 93 background-color: #EEE; 94 color: inherit; 95} 96/* picker for headlines */ 97div.picker.pk_hl { 98 width: auto; 99} 100 101/* buttons inside of picker */ 102body.dokuwiki div.picker { 103 button { 104 &:hover { 105 background-color: @ini_background_neu; 106 } 107 &.pickerbutton, 108 &.toolbutton { 109 padding: .1em .35em; 110 border-width: 0; 111 } 112 } 113} 114 115/*____________ edit textarea ____________*/ 116 117.dokuwiki textarea.edit { 118 width: 100%; 119 padding: 1px 0 0 2px; 120 margin-bottom: .5em; 121 min-height: 52pt; 122 background-color: #EEE; 123 font-family: 'Source Code Pro',Menlo,Consolas,'Courier New',Courier,monospace; 124 font-size: 12pt; 125 line-height: 17pt; 126 caret-color: #0078D7; 127 resize: vertical; 128} 129.dokuwiki textarea.edit:focus { 130 outline: transparent none 0; 131} 132 133.dokuwiki textarea::-webkit-scrollbar-track { 134 background: @ini_background_alt; 135} 136.dokuwiki textarea::-webkit-scrollbar-thumb { 137 background: @ini_blockquote; 138} 139.dokuwiki textarea::-webkit-scrollbar-thumb:hover { 140 background: @ini_separator; 141} 142.dokuwiki textarea::-webkit-resizer { 143 background-color: @ini_background_alt; 144 background: linear-gradient(135deg, @ini_background_alt 0%, @ini_background_alt 50%, @ini_blockquote 50%, @ini_blockquote 100%); 145} 146 147.dokuwiki textarea { scrollbar-color: @ini_blockquote @ini_background_alt; } 148 149/*____________ below the textarea ____________*/ 150 151.dokuwiki div.editBar { 152 display: grid; 153 grid-template-columns: 320px minmax(500px, 1fr) auto; 154 align-items: start; 155 margin-bottom: .5em; 156} 157 158/* size and wrap controls */ 159#size__ctl { 160 grid-row: 1; 161 grid-column: 3; 162 min-width: 64px; 163} 164#size__ctl img { 165 cursor: pointer; 166} 167 168/* edit buttons */ 169.dokuwiki .editBar .editButtons { 170 grid-row: 1; 171 grid-column: 1; 172 display: grid; 173 grid-template-columns: 1fr 1fr 1fr; 174} 175[dir=rtl] .dokuwiki .editBar .editButtons { 176 margin-right: 0; 177 margin-left: 1em; 178} 179.dokuwiki .editBar .editButtons button { 180 border: #CCC solid 1.5pt; 181 padding: .25em .5em; 182 margin: 0 2pt; 183} 184.dokuwiki .editBar .editButtons button::before { 185 content: ' '; 186 display: inline-block; 187 position: relative; 188 top: .1em; 189 width: 1em; 190 height: 1em; 191 background: none center bottom no-repeat; 192 background-size: 1em; 193 margin-right: 4px; 194} 195 196.dokuwiki .editBar .editButtons button#edbtn__save { 197 background-color: #ccddff; 198} 199.dokuwiki .editBar .editButtons button#edbtn__save::before { 200 background-image: url('images/editor/edit-save.svg'); 201} 202.dokuwiki .editBar .editButtons button#edbtn__preview { 203 background-color: #ccffdd; 204} 205.dokuwiki .editBar .editButtons button#edbtn__preview::before { 206 background-image: url('images/editor/edit-preview.svg'); 207} 208.dokuwiki .editBar .editButtons button[name="do[cancel]"] { 209 background-color: #ffccdd; 210} 211.dokuwiki .editBar .editButtons button[name="do[cancel]"]::before { 212 background-image: url('images/editor/edit-cancel.svg'); 213} 214 215/* summary input and minor changes checkbox */ 216.dokuwiki .editBar .summary { 217 grid-row: 1; 218 grid-column: 2; 219 display: grid; 220 grid-template-columns: 1fr auto; 221 line-height: 1em; 222 padding-top: 2pt; 223 padding-right: 5pt; 224} 225 226.dokuwiki .editBar .summary #edit__summary { 227 background-color: @ini_background_alt; 228 border-color: @ini_border; 229 color: @ini_text; 230 border-radius: 3pt; 231 margin-left: 0; 232 width: 100%; 233} 234 235.dokuwiki .editBar .summary label { 236 white-space: nowrap; 237} 238.dokuwiki .editBar .summary label:last-child { 239 padding: 2pt 0 2pt 4pt; 240} 241.dokuwiki .editBar .summary > label:first-child { 242 display: grid; 243 grid-template-columns: auto 1fr; 244 column-gap: 10px; 245 padding: 2pt 5pt 0 0; 246} 247.dokuwiki .editBar .summary label span { 248 font-size: small; 249 margin: 0 1pt 0 3pt; 250} 251.dokuwiki .editBar .summary input { 252} 253/* change background colour if summary is missing */ 254.dokuwiki .editBar .summary input.missing { 255 color: @ini_text; 256 background-color: #ffcccc; 257} 258 259/* toolbar popups */ 260.dokuwiki div.picker { 261 & { 262 background-color: @ini_background_alt; 263 border: @ini_border solid 1px; 264 padding: .125rem; 265 box-shadow: .125rem .125rem .5rem 0 rgba(0,0,0,.2); 266 } 267 button { 268 & { 269 color: @ini_text; 270 background-color: @ini_background; 271 border: @ini_border solid 1px; 272 min-width: 24px; min-height: 24px; 273 cursor: pointer; 274 margin: 1px; 275 } 276 &:hover { 277 background-color: @ini_text; 278 color: @ini_background; 279 } 280 } 281 &#picker1 { 282 /* width: 308px; max-width: 308px; min-width: 308px; */ 283 resize: both; 284 overflow: auto; 285 } 286 &#picker2 { 287 /* width: 585px; max-width: 585px; min-width: 585px; */ 288 resize: both; 289 overflow: auto; 290 } 291} 292 293/* preview 294********************************************************************/ 295 296.dokuwiki div.preview { 297 border: dotted #CCC; 298 border-width: .2em 0; 299 padding: 1.4em 0; 300 margin-bottom: 1.4em; 301} 302 303/* narrow screen overrides: */ 304@media (max-width: @ini_tablet_width) { 305 306 .dokuwiki div.editBar { 307 grid-template-columns: 1fr 5px auto; 308 } 309 .dokuwiki div.editBar .summary { 310 grid-row: 2; 311 grid-column: 1 / span 3; 312 } 313 .dokuwiki .editBar .summary #edit__summary { 314 margin-left: 8pt; 315 width: ~"calc(100% - 8px)"; 316 } 317 .dokuwiki .editBar .summary label:last-child { 318 /*text-align: right;*/ 319 } 320} 321@media (max-width: @ini_phone_width) { 322 323 .dokuwiki .editBar .summary, 324 .dokuwiki .editBar .summary > label:first-child { 325 grid-template-columns: 100%; 326 } 327} 328@media (max-width: 390px) { 329 330 .dokuwiki .editBar .editButtons button { 331 overflow: hidden; 332 height: 30px; 333 line-height: 24px; 334 } 335 .dokuwiki .editBar .summary #edit__summary { 336 margin-left: 4px; 337 width: 100%; 338 } 339 340} 341/* dark mode overrides */ 342@media (prefers-color-scheme: dark) { 343 344 body.darkmode .editBox > .toolbar { 345 background-color: fadeout(@ini_background_dark, 20%); 346 } 347 body.darkmode textarea.edit { 348 background-color: @ini_background_alt_dark; 349 border: @ini_headlines_dark solid 1px; 350 color: @ini_text_dark; 351 } 352 353 body.darkmode textarea::-webkit-scrollbar-track { 354 background: @ini_background_alt_dark; 355 } 356 body.darkmode textarea::-webkit-scrollbar-thumb { 357 background: @ini_background_dark; 358 } 359 body.darkmode textarea::-webkit-scrollbar-thumb:hover { 360 background: @ini_background_site_dark; 361 } 362 body.darkmode textarea { scrollbar-color: @ini_background_dark @ini_background_alt_dark; } 363 .dokuwiki textarea::-webkit-resizer { 364 background-color: @ini_background_alt_dark; 365 background: linear-gradient(135deg, @ini_background_alt_dark 0%, @ini_background_alt_dark 50%, @ini_text_alt_dark 50%, @ini_text_alt_dark 100%); 366 } 367 368 body.mode_edit.darkmode div.editBox button, 369 body.mode_preview.darkmode div.editBox button { 370 background-color: @ini_headlines_dark; 371 border-color: @ini_border_dark; 372 } 373 body.mode_edit.darkmode .editBar .editButtons button::before, 374 body.mode_preview.darkmode .editBar .editButtons button::before { 375 filter: invert(1) opacity(.67); 376 } 377 body.darkmode .editBar .editButtons button#edbtn__save { 378 background-color: #334466; 379 color: #CCDDFF; 380 } 381 body.darkmode .editBar .editButtons button#edbtn__preview { 382 background-color: #226633; 383 color: #CCFFDD; 384 } 385 body.darkmode .editBar .editButtons button[name="do[cancel]"] { 386 background-color: #663344; 387 color: #FFCCDD; 388 } 389 390 body.mode_edit.darkmode #tool__bar button, 391 body.mode_preview.darkmode #tool__bar button { 392 background-color: #8C8C8C; 393 border-color: @ini_border_dark; 394 } 395 body.mode_edit.darkmode #tool__bar button:hover, 396 body.mode_preview.darkmode #tool__bar button:hover { 397 background-color: @ini_text_dark; 398 } 399 body.mode_edit.darkmode .editBar .editButtons button, 400 body.mode_preview.darkmode .editBar .editButtons button { 401 border-color: @ini_border_dark; 402 } 403 body.mode_edit.darkmode #tool__bar button img, 404 body.mode_preview.darkmode #tool__bar button img { 405 filter: brightness(90%); 406 } 407 408 body.mode_edit.darkmode .editBar .summary #edit__summary, 409 body.mode_preview.darkmode .editBar .summary #edit__summary { 410 background-color: @ini_background_alt_dark; 411 border-color: @ini_headlines_dark; 412 color: @ini_text_dark; 413 } 414 415 body.darkmode #draft__status { 416 color: @ini_text_alt_dark; 417 } 418 419 420 body.darkmode div.picker { 421 & { 422 background-color: @ini_background_dark; 423 border: @ini_border_dark solid 1px; 424 } 425 button { 426 & { 427 color: @ini_text; 428 background-color: #8C8C8C; 429 border-color: @ini_border_dark; 430 } 431 &:hover { 432 background-color: @ini_text_dark; 433 color: @ini_background_alt_dark; 434 } 435 } 436 } 437 438}