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 -webkit-box-shadow: .125rem .125rem .5rem 0 rgba(0,0,0,.2); 266 -moz-box-shadow: .125rem .125rem .5rem 0 rgba(0,0,0,.2); 267 box-shadow: .125rem .125rem .5rem 0 rgba(0,0,0,.2); 268 } 269 button { 270 & { 271 color: @ini_text; 272 background-color: @ini_background; 273 border: @ini_border solid 1px; 274 min-width: 24px; min-height: 24px; 275 cursor: pointer; 276 margin: 1px; 277 } 278 &:hover { 279 background-color: @ini_text; 280 color: @ini_background; 281 } 282 } 283 &#picker1 { 284 /* width: 308px; max-width: 308px; min-width: 308px; */ 285 resize: both; 286 overflow: auto; 287 } 288 &#picker2 { 289 /* width: 585px; max-width: 585px; min-width: 585px; */ 290 resize: both; 291 overflow: auto; 292 } 293} 294 295/* preview 296********************************************************************/ 297 298.dokuwiki div.preview { 299 border: dotted #CCC; 300 border-width: .2em 0; 301 padding: 1.4em 0; 302 margin-bottom: 1.4em; 303} 304 305/* narrow screen overrides: */ 306@media (max-width: @ini_tablet_width) { 307 308 .dokuwiki div.editBar { 309 grid-template-columns: 1fr 5px auto; 310 } 311 .dokuwiki div.editBar .summary { 312 grid-row: 2; 313 grid-column: 1 / span 3; 314 } 315 .dokuwiki .editBar .summary #edit__summary { 316 margin-left: 8pt; 317 width: ~"calc(100% - 8px)"; 318 } 319 .dokuwiki .editBar .summary label:last-child { 320 /*text-align: right;*/ 321 } 322} 323@media (max-width: @ini_phone_width) { 324 325 .dokuwiki .editBar .summary, 326 .dokuwiki .editBar .summary > label:first-child { 327 grid-template-columns: 100%; 328 } 329} 330@media (max-width: 390px) { 331 332 .dokuwiki .editBar .editButtons button { 333 overflow: hidden; 334 height: 30px; 335 line-height: 24px; 336 } 337 .dokuwiki .editBar .summary #edit__summary { 338 margin-left: 4px; 339 width: 100%; 340 } 341 342} 343/* dark mode overrides */ 344@media (prefers-color-scheme: dark) { 345 346 body.darkmode .editBox > .toolbar { 347 background-color: fadeout(@ini_background_dark, 20%); 348 } 349 body.darkmode textarea.edit { 350 background-color: @ini_background_alt_dark; 351 border: @ini_headlines_dark solid 1px; 352 color: @ini_text_dark; 353 } 354 355 body.darkmode textarea::-webkit-scrollbar-track { 356 background: @ini_background_alt_dark; 357 } 358 body.darkmode textarea::-webkit-scrollbar-thumb { 359 background: @ini_background_dark; 360 } 361 body.darkmode textarea::-webkit-scrollbar-thumb:hover { 362 background: @ini_background_site_dark; 363 } 364 body.darkmode textarea { scrollbar-color: @ini_background_dark @ini_background_alt_dark; } 365 .dokuwiki textarea::-webkit-resizer { 366 background-color: @ini_background_alt_dark; 367 background: linear-gradient(135deg, @ini_background_alt_dark 0%, @ini_background_alt_dark 50%, @ini_text_alt_dark 50%, @ini_text_alt_dark 100%); 368 } 369 370 body.mode_edit.darkmode div.editBox button, 371 body.mode_preview.darkmode div.editBox button { 372 background-color: @ini_headlines_dark; 373 border-color: @ini_border_dark; 374 } 375 body.mode_edit.darkmode .editBar .editButtons button::before, 376 body.mode_preview.darkmode .editBar .editButtons button::before { 377 filter: invert(1) opacity(.67); 378 } 379 body.darkmode .editBar .editButtons button#edbtn__save { 380 background-color: #334466; 381 color: #CCDDFF; 382 } 383 body.darkmode .editBar .editButtons button#edbtn__preview { 384 background-color: #226633; 385 color: #CCFFDD; 386 } 387 body.darkmode .editBar .editButtons button[name="do[cancel]"] { 388 background-color: #663344; 389 color: #FFCCDD; 390 } 391 392 body.mode_edit.darkmode #tool__bar button, 393 body.mode_preview.darkmode #tool__bar button { 394 background-color: #8C8C8C; 395 border-color: @ini_border_dark; 396 } 397 body.mode_edit.darkmode #tool__bar button:hover, 398 body.mode_preview.darkmode #tool__bar button:hover { 399 background-color: @ini_text_dark; 400 } 401 body.mode_edit.darkmode .editBar .editButtons button, 402 body.mode_preview.darkmode .editBar .editButtons button { 403 border-color: @ini_border_dark; 404 } 405 body.mode_edit.darkmode #tool__bar button img, 406 body.mode_preview.darkmode #tool__bar button img { 407 filter: brightness(90%); 408 } 409 410 body.mode_edit.darkmode .editBar .summary #edit__summary, 411 body.mode_preview.darkmode .editBar .summary #edit__summary { 412 background-color: @ini_background_alt_dark; 413 border-color: @ini_headlines_dark; 414 color: @ini_text_dark; 415 } 416 417 body.darkmode #draft__status { 418 color: @ini_text_alt_dark; 419 } 420 421 422 body.darkmode div.picker { 423 & { 424 background-color: @ini_background_dark; 425 border: @ini_border_dark solid 1px; 426 } 427 button { 428 & { 429 color: @ini_text; 430 background-color: #8C8C8C; 431 border-color: @ini_border_dark; 432 } 433 &:hover { 434 background-color: @ini_text_dark; 435 color: @ini_background_alt_dark; 436 } 437 } 438 } 439 440}