Better solution for tablet columns
[GitHub/WoltLab/WCF.git] / wcfsetup / install / files / style / ui / redactor.scss
CommitLineData
b8eab696 1.redactor-box {
b8eab696
AE
2 position: relative;
3
9d029724
AE
4 &:not(:first-child) {
5 margin-top: 20px;
6 }
7
b8eab696
AE
8 & + .messageTabMenu {
9 padding: 0;
10 }
11
12 & + .innerError,
13 > .innerError {
14 border-radius: 0;
15 box-shadow: none;
16 display: block;
17 margin-top: -1px;
18 }
19
20 > .innerError {
21 margin: -1px;
22 }
23
24 > .redactorAutosaveNotice {
f2b50825 25 background-color: $wcfContentBackground;
f027ba61 26 border: 1px solid $wcfContentBorderInner;
b8eab696
AE
27 border-width: 1px 0 0 1px;
28 bottom: 0;
b8eab696 29 opacity: 0;
f2b50825 30 padding: $wcfGapSmall;
b8eab696
AE
31 position: absolute;
32 right: 0;
33 transition: visibility 0s linear .3s, opacity .3s linear;
34 visibility: hidden;
35
36 &.open {
37 opacity: 1;
38 visibility: visible;
39 transition-delay: 0s;
40 }
41
42 &.redactorAutosaveNoticeIcons > span.fa-check {
f2b50825 43 margin-right: $wcfGapSmall;
b8eab696
AE
44 }
45
46 > span.redactorAutosaveMessage {
f2b50825 47 padding: 0 $wcfGapSmall;
b8eab696
AE
48 }
49 }
50}
51
52.redactor-editor {
bf5372fc
AE
53 border: 1px solid $wcfContentBorderInner;
54 border-top-width: 0;
b8eab696 55 max-height: 500px;
9e7b600c 56 padding: 10px;
b8eab696
AE
57 position: relative;
58 outline: none;
59 overflow: auto;
60
abc590f6
AE
61 * {
62 // setting min-width to "0" inside contenteditable causes
63 // IE11 to do all sort of funny things
64 min-width: auto;
65 }
66
af098b36
AE
67 &.redactor-placeholder::after {
68 color: $wcfContentDimmedText;
69 content: attr(placeholder);
70 display: block;
c2e8d0f6 71 pointer-events: none;
af098b36
AE
72 position: absolute;
73 }
74
b8eab696
AE
75 & + textarea {
76 border-width: 0;
77 box-shadow: none;
b8eab696
AE
78 outline: none;
79 padding: 10px;
80 resize: vertical;
81
82 &:focus {
83 box-shadow: none;
84 }
85 }
86
620a271a
AE
87 // enforce styles used in messages
88 @extend .htmlContent;
b8eab696 89
9e7b600c
AE
90 > :not(p) {
91 &:first-child {
92 margin-top: 10px !important;
93 }
94
95 &:last-child {
96 margin-bottom: 20px !important;
97 }
98 }
99
620a271a
AE
100 // remove margin top for the first paragraph in the editor to avoid a weird looking offset a the top
101 > p:first-child {
102 margin-top: 0;
b8eab696
AE
103 }
104
105 img {
b8eab696 106 max-width: 100%;
00e48dac
AE
107
108 &:not(.smiley) {
109 // show cursor to indicate editing capability excluding smilies
110 cursor: pointer;
111 }
b8eab696
AE
112 }
113
620a271a 114 // TODO: this is somewhat out of sync
b8eab696
AE
115 table {
116 border-collapse: collapse;
bf5372fc 117 //font-size: 14px; TODO
b8eab696
AE
118 line-height: 1.6em;
119
120 td {
121 border: 1px solid #ddd;
122 padding: 5px;
123 vertical-align: top;
124 }
125 }
1760080e
AE
126}
127
128.redactor-dropdown {
129 > .dropdownMenu {
130 display: block;
42af78b3
AE
131 visibility: visible;
132
133 /* we cannot influence the actual dropdown position as set by Redactor,
134 forces a gap while keeping the inline top-attribute unaffected */
135 transform: translateY(3px);
1760080e
AE
136
137 > li:hover {
138 background-color: transparent !important;
139 }
140
141 a:hover {
142 background-color: $wcfDropdownBackgroundActive;
143 }
144 }
145
146 .redactor-dropdown-link-inactive {
147 cursor: default;
148 opacity: .6;
149
150 &:hover {
151 background-color: transparent !important;
152 color: $wcfDropdownText !important;
153 }
b8eab696
AE
154 }
155}
156
b8eab696 157/* disable auto zoom in mobile safari */
ed02d9b7
AE
158@include screen-md-down {
159 .redactor-editor {
b8eab696
AE
160 font-size: 16px;
161 max-height: 500px;
162 }
163}
164
165.redactor-toolbar {
bf5372fc 166 background-color: $wcfHeaderBackground;
1760080e
AE
167 display: flex;
168 flex-wrap: wrap;
b8eab696
AE
169
170 > li {
1760080e 171 flex: 0 0 auto;
b8eab696 172 margin-bottom: 1px;
b8eab696 173
b8eab696 174 > a {
bf5372fc 175 color: $wcfHeaderMenuLink;
b8eab696 176 display: block;
b8eab696 177 outline: none;
a2c4f308 178 padding: 10px;
b8eab696 179 text-align: center;
b8eab696 180
5908f54f 181 @include wcfFontSmall;
bf5372fc 182
fd4c3c75
AE
183 &.redactor-button-disabled {
184 background-color: transparent !important;
185 color: $wcfButtonDisabledText !important;
186 cursor: default;
b8eab696
AE
187 }
188
b8eab696
AE
189 &.redactor-act,
190 &.dropact {
c4dc4aaa 191 background-color: $wcfHeaderMenuLinkBackgroundActive;
bf5372fc 192 color: $wcfHeaderMenuLinkActive;
b8eab696 193 }
fd4c3c75
AE
194
195 .icon {
196 color: inherit;
197 cursor: inherit !important;
198 }
5bf57072
AE
199
200 @include screen-lg {
201 // hover-styles on mobile are misleading as they stay much longer
202 // due to the click-like behavior
203 &:hover {
204 background-color: $wcfHeaderMenuLinkBackgroundActive;
205 color: $wcfHeaderMenuLinkActive;
206 }
207 }
b8eab696 208 }
8399847c
AE
209
210 @include screen-sm-up {
211 &.redactor-toolbar-separator {
212 margin-left: 11px;
213 position: relative;
214
215 &::before {
216 bottom: 7px;
217 border-left: 1px solid $wcfHeaderMenuLink;
218 content: "";
219 left: -6px;
220 opacity: .6;
221 position: absolute;
222 top: 7px;
223 }
224 }
225 }
226
227 @include screen-xs {
228 &[data-show-on-mobile="false"] {
229 display: none;
230 }
231 }
b8eab696
AE
232 }
233}
234
235.redactor-toolbar-tooltip {
f2b50825 236 @extend .balloonTooltip;
b8eab696
AE
237
238 opacity: 1;
239 visibility: visible;
240
241 &:before {
1223c43c 242 // TODO: border-color: $wcfTooltipBackgroundColor transparent;
b8eab696
AE
243 border-style: solid;
244 border-width: 0 5px 5px;
245 content: "";
246 display: block;
247 left: 50%;
248 position: absolute;
249 top: -5px;
250 transform: translateX(-50%);
251 }
252}
253
254#redactor-image-box {
255 border: 1px dashed rgba(0, 0, 0, .5);
256 display: inline-block;
257 line-height: 0;
258 max-width: 100%;
259 position: relative;
260
261 > img {
262 border-width: 0;
263 opacity: .5;
264 }
265}
266
267#redactor-image-editter {
f2b50825 268 @extend .balloonTooltip;
b8eab696
AE
269
270 cursor: pointer;
271 left: 50%;
1223c43c 272 // TODO: line-height: $wcfSmallFontSize;
b8eab696
AE
273 margin-top: -13px;
274 opacity: 1;
275 top: 50%;
276 visibility: visible;
277 z-index: 5;
278}
279
280#redactor-image-resizer {
281 background-color: rgba(0, 0, 0, 1);
282 border: 1px solid rgba(255, 255, 255, 1);
283 bottom: -4px;
284 cursor: nw-resize;
285 height: 8px;
286 line-height: 1;
287 position: absolute;
288 right: -5px;
289 width: 8px;
290 z-index: 10;
291}
292
293.redactorAttachmentContainer {
294 background-color: rgba(255, 255, 255, 1);
295 border: 1px solid rgba(238, 238, 238, 1);
296 border-top-width: 0;
297 padding: 7px 14px 7px;
298}
299
300.redactor-dropdown-box-fontcolor {
301 width: 200px;
302
303 > li.redactorColorPallet {
304 padding: 0 4px;
305
306 &:hover {
f2b50825 307 background-color: $wcfDropdownBackground !important;
b8eab696
AE
308 }
309
310 > a {
311 border: 2px solid rgba(255, 255, 255, 1);
312 border-bottom-width: 0;
313 display: inline-block;
bf5372fc 314 font-size: 0; // TODO
b8eab696
AE
315 height: 20px;
316 padding: 0;
317 margin: 0;
318 width: 20px;
319 }
320 }
321}
322
323.redactorDropArea {
324 background-color: rgba(255, 255, 204, 1);
325 border: 5px dashed rgba(255, 204, 0);
326 box-sizing: border-box;
bf5372fc 327 font-size: 1.4rem; // TODO
b8eab696
AE
328 position: absolute;
329 text-align: center;
330 vertical-align: middle;
331 z-index: 360;
332
333 &.active {
334 background-color: #CEF6CE;
335 border-color: #04B404;
336 }
337}
338
339.redactor-link-tooltip {
1223c43c 340 // TODO: background-color: $wcfTooltipBackgroundColor;
b8eab696 341 border-radius: 6px;
1223c43c
AE
342 // TODO: color: $wcfTooltipColor;
343 // TODO: font-size: $wcfSmallFontSize;
b8eab696
AE
344 padding: 5px 10px 7px;
345 position: absolute;
346 z-index: 800;
347
f2b50825 348 @include boxShadow(0, 3px, rgba(0, 0, 0, .3), 7px);
b8eab696
AE
349
350 > a {
1223c43c 351 // TODO: color: $wcfTooltipColor;
b8eab696
AE
352 }
353}
bf5372fc
AE
354
355.redactor-voice-label {
356 display: none;
357}
9dab3711 358
5840fdfd
AE
359/* format */
360.redactor-dropdown-h2 {
361 @include wcfFontSection;
362}
363
364.redactor-dropdown-h3 {
365 @include wcfFontHeadline;
366}
367
368.redactor-dropdown-h4 {
369 // TODO: add styling
370}
371
9dab3711
AE
372/* alignment plugin */
373.text-center {
374 text-align: center;
375}
376
377.text-right {
378 text-align: right;
379}
831dc0da 380
903a8623
AE
381/* alignment plugin / custom value */
382.text-justify {
383 text-align: justify;
384
385 -webkit-hyphens: auto;
386 -moz-hyphens: auto;
387 -ms-hyphens: auto;
388 hyphens: auto;
389}
390
831dc0da
AE
391/* text color */
392.woltlab-color-000000 { color: #000000 !important; }
393.woltlab-color-000080 { color: #000080 !important; }
394.woltlab-color-0000CD { color: #0000CD !important; }
395.woltlab-color-0000FF { color: #0000FF !important; }
396.woltlab-color-006400 { color: #006400 !important; }
397.woltlab-color-008000 { color: #008000 !important; }
398.woltlab-color-008080 { color: #008080 !important; }
399.woltlab-color-00FF00 { color: #00FF00 !important; }
400.woltlab-color-00FFFF { color: #00FFFF !important; }
401.woltlab-color-2F4F4F { color: #2F4F4F !important; }
402.woltlab-color-40E0D0 { color: #40E0D0 !important; }
403.woltlab-color-4B0082 { color: #4B0082 !important; }
404.woltlab-color-696969 { color: #696969 !important; }
405.woltlab-color-800000 { color: #800000 !important; }
406.woltlab-color-800080 { color: #800080 !important; }
407.woltlab-color-808080 { color: #808080 !important; }
408.woltlab-color-8B4513 { color: #8B4513 !important; }
409.woltlab-color-A52A2A { color: #A52A2A !important; }
410.woltlab-color-A9A9A9 { color: #A9A9A9 !important; }
411.woltlab-color-ADD8E6 { color: #ADD8E6 !important; }
412.woltlab-color-AFEEEE { color: #AFEEEE !important; }
413.woltlab-color-B22222 { color: #B22222 !important; }
414.woltlab-color-D3D3D3 { color: #D3D3D3 !important; }
415.woltlab-color-DAA520 { color: #DAA520 !important; }
416.woltlab-color-DDA0DD { color: #DDA0DD !important; }
417.woltlab-color-E6E6FA { color: #E6E6FA !important; }
418.woltlab-color-EE82EE { color: #EE82EE !important; }
419.woltlab-color-F0F8FF { color: #F0F8FF !important; }
420.woltlab-color-F0FFF0 { color: #F0FFF0 !important; }
421.woltlab-color-F0FFFF { color: #F0FFFF !important; }
422.woltlab-color-FAEBD7 { color: #FAEBD7 !important; }
423.woltlab-color-FF0000 { color: #FF0000 !important; }
424.woltlab-color-FF8C00 { color: #FF8C00 !important; }
425.woltlab-color-FFA07A { color: #FFA07A !important; }
426.woltlab-color-FFA500 { color: #FFA500 !important; }
427.woltlab-color-FFD700 { color: #FFD700 !important; }
428.woltlab-color-FFF0F5 { color: #FFF0F5 !important; }
429.woltlab-color-FFFF00 { color: #FFFF00 !important; }
430.woltlab-color-FFFFE0 { color: #FFFFE0 !important; }
431.woltlab-color-FFFFFF { color: #FFFFFF !important; }
432
433/* text color selection */
434.redactor-dropdown-box-woltlabColor {
435 > ul {
436 display: flex !important;
437 flex-wrap: wrap;
438 width: 272px;
439
440 > li:first-child {
441 flex: 0 0 100%;
fd4c3c75 442 margin-bottom: 10px;
831dc0da
AE
443 }
444 }
445
446 .woltlab-color-selection {
447 flex: 0 0 30px;
448 margin: 2px;
449 overflow: hidden;
450
451 > a {
452 background-color: currentColor !important;
453 color: inherit !important;
454 display: block;
455 height: 30px;
456 width: 30px;
457 }
458 }
459}
81011521
AE
460
461/* font size */
57c2412f
AE
462.woltlab-size-8 { font-size: 8pt; }
463.woltlab-size-10 { font-size: 10pt; }
464.woltlab-size-12 { font-size: 12pt; }
465.woltlab-size-14 { font-size: 14pt; }
466.woltlab-size-18 { font-size: 18pt; }
467.woltlab-size-24 { font-size: 24pt; }
468.woltlab-size-36 { font-size: 36pt; }
f06b38e2
AE
469
470/* image float */
471.messageFloatObjectLeft {
472 float: left;
473 margin: 0 20px 20px 0;
474}
475
476.messageFloatObjectRight {
477 float: right;
478 margin: 0 0 20px 20px;
479}
b025db3d
AE
480
481.smiley {
482 margin: 0 1px;
483}
c2e8d0f6
AE
484
485.wysiwygTextarea {
486 background-color: transparent !important;
487 border: 1px solid $wcfContentBorderInner !important;
488 color: transparent !important;
489 display: block;
490 height: 238px;
491 width: 100%;
492}
2f035ee4
AE
493
494.messageQuickReplyCollapsed {
8e8cc420
AE
495 border-bottom-width: 0 !important;
496
497 @include screen-sm-down {
498 margin-left: -10px;
499 margin-right: -10px;
500 }
501
2f035ee4 502 .messageSidebar {
8e8cc420 503 display: none;
2f035ee4
AE
504 }
505
506 .messageQuickReplyContent {
8e8cc420 507 background-color: $wcfSidebarBackground;
2f035ee4 508 cursor: pointer;
8e8cc420
AE
509 display: inline-block !important;
510 margin: 0 !important;
511 max-width: 100% !important;
512 overflow: hidden;
513 padding: 20px;
514 position: relative;
515 width: 100% !important;
2f035ee4 516
8e8cc420
AE
517 @include screen-md-up {
518 border-radius: 2px;
2f035ee4
AE
519 }
520
8e8cc420
AE
521 &::before {
522 color: $wcfSidebarText;
523 content: $fa-var-reply;
524 font-family: FontAwesome;
525 font-size: 28px;
526 height: 32px;
527 line-height: 32px;
528 margin-right: 10px;
529 width: 32px;
530 vertical-align: -5px;
2f035ee4
AE
531 }
532
8e8cc420
AE
533 &::after {
534 color: $wcfSidebarText;
535 content: attr(data-placeholder);
2f035ee4 536
8e8cc420
AE
537 @include screen-sm-up {
538 @include wcfFontSection;
2f035ee4
AE
539 }
540 }
541
8e8cc420
AE
542 > .messageBody {
543 left: 200%;
544 position: absolute;
545 top: -100%;
2f035ee4
AE
546 }
547
548 > .messageFooter {
549 display: none;
550 }
551 }
552}