##// END OF EJS Templates
css: fix overflow problem in diffs
ergo -
r819:7d20ce32 default
parent child Browse files
Show More
@@ -1,642 +1,643 b''
1 1 // Default styles
2 2
3 3 .diff-collapse {
4 4 margin: @padding 0;
5 5 text-align: right;
6 6 }
7 7
8 8 .diff-container {
9 9 margin-bottom: @space;
10 10
11 11 .diffblock {
12 12 margin-bottom: @space;
13 13 }
14 14
15 15 &.hidden {
16 16 display: none;
17 17 overflow: hidden;
18 18 }
19 19 }
20 20
21 21 .compare_view_files {
22 22
23 23 .diff-container {
24 24
25 25 .diffblock {
26 26 margin-bottom: 0;
27 27 }
28 28 }
29 29 }
30 30
31 31 div.diffblock .sidebyside {
32 32 background: #ffffff;
33 33 }
34 34
35 35 div.diffblock {
36 36 overflow-x: auto;
37 37 overflow-y: hidden;
38 38 clear: both;
39 39 padding: 0px;
40 40 background: @grey6;
41 41 border: @border-thickness solid @grey5;
42 42 -webkit-border-radius: @border-radius @border-radius 0px 0px;
43 43 border-radius: @border-radius @border-radius 0px 0px;
44 44
45 45
46 46 .comments-number {
47 47 float: right;
48 48 }
49 49
50 50 // BEGIN CODE-HEADER STYLES
51 51
52 52 .code-header {
53 53 background: @grey6;
54 54 padding: 10px 0 10px 0;
55 55 height: auto;
56 56 width: 100%;
57 57
58 58 .hash {
59 59 float: left;
60 60 padding: 2px 0 0 2px;
61 61 }
62 62
63 63 .date {
64 64 float: left;
65 65 text-transform: uppercase;
66 66 padding: 4px 0px 0px 2px;
67 67 }
68 68
69 69 div {
70 70 margin-left: 4px;
71 71 }
72 72
73 73 div.compare_header {
74 74 min-height: 40px;
75 75 margin: 0;
76 76 padding: 0 @padding;
77 77
78 78 .drop-menu {
79 79 float:left;
80 80 display: block;
81 81 margin:0 0 @padding 0;
82 82 }
83 83
84 84 .compare-label {
85 85 float: left;
86 86 clear: both;
87 87 display: inline-block;
88 88 min-width: 5em;
89 89 margin: 0;
90 90 padding: @button-padding @button-padding @button-padding 0;
91 91 font-family: @text-semibold;
92 92 }
93 93
94 94 .compare-buttons {
95 95 float: left;
96 96 margin: 0;
97 97 padding: 0 0 @padding;
98 98
99 99 .btn {
100 100 margin: 0 @padding 0 0;
101 101 }
102 102 }
103 103 }
104 104
105 105 }
106 106
107 107 .parents {
108 108 float: left;
109 109 width: 100px;
110 110 font-weight: 400;
111 111 vertical-align: middle;
112 112 padding: 0px 2px 0px 2px;
113 113 background-color: @grey6;
114 114
115 115 #parent_link {
116 116 margin: 00px 2px;
117 117
118 118 &.double {
119 119 margin: 0px 2px;
120 120 }
121 121
122 122 &.disabled{
123 123 margin-right: @padding;
124 124 }
125 125 }
126 126 }
127 127
128 128 .children {
129 129 float: right;
130 130 width: 100px;
131 131 font-weight: 400;
132 132 vertical-align: middle;
133 133 text-align: right;
134 134 padding: 0px 2px 0px 2px;
135 135 background-color: @grey6;
136 136
137 137 #child_link {
138 138 margin: 0px 2px;
139 139
140 140 &.double {
141 141 margin: 0px 2px;
142 142 }
143 143
144 144 &.disabled{
145 145 margin-right: @padding;
146 146 }
147 147 }
148 148 }
149 149
150 150 .changeset_header {
151 151 height: 16px;
152 152
153 153 & > div{
154 154 margin-right: @padding;
155 155 }
156 156 }
157 157
158 158 .changeset_file {
159 159 text-align: left;
160 160 float: left;
161 161 padding: 0;
162 162
163 163 a{
164 164 display: inline-block;
165 165 margin-right: 0.5em;
166 166 }
167 167
168 168 #selected_mode{
169 169 margin-left: 0;
170 170 }
171 171 }
172 172
173 173 .diff-menu-wrapper {
174 174 float: left;
175 175 }
176 176
177 177 .diff-menu {
178 178 position: absolute;
179 179 background: none repeat scroll 0 0 #FFFFFF;
180 180 border-color: #003367 @grey3 @grey3;
181 181 border-right: 1px solid @grey3;
182 182 border-style: solid solid solid;
183 183 border-width: @border-thickness;
184 184 box-shadow: 2px 8px 4px rgba(0, 0, 0, 0.2);
185 185 margin-top: 5px;
186 186 margin-left: 1px;
187 187 }
188 188
189 189 .diff-actions, .editor-actions {
190 190 float: left;
191 191
192 192 input{
193 193 margin: 0 0.5em 0 0;
194 194 }
195 195 }
196 196
197 197 // END CODE-HEADER STYLES
198 198
199 199 // BEGIN CODE-BODY STYLES
200 200
201 201 .code-body {
202 202 background: white;
203 203 padding: 0;
204 204 background-color: #ffffff;
205 205 position: relative;
206 206 max-width: none;
207 207 box-sizing: border-box;
208 208 // TODO: johbo: Parent has overflow: auto, this forces the child here
209 209 // to have the intended size and to scroll. Should be simplified.
210 210 width: 100%;
211 211 overflow-x: auto;
212 212 }
213 213
214 214 pre.raw {
215 215 background: white;
216 216 color: @grey1;
217 217 }
218 218 // END CODE-BODY STYLES
219 219
220 220 }
221 221
222 222
223 223 table.code-difftable {
224 224 border-collapse: collapse;
225 225 width: 99%;
226 226 border-radius: 0px !important;
227 227
228 228 td {
229 229 padding: 0 !important;
230 230 background: none !important;
231 231 border: 0 !important;
232 232 }
233 233
234 234 .context {
235 235 background: none repeat scroll 0 0 #DDE7EF;
236 236 }
237 237
238 238 .add {
239 239 background: none repeat scroll 0 0 #DDFFDD;
240 240
241 241 ins {
242 242 background: none repeat scroll 0 0 #AAFFAA;
243 243 text-decoration: none;
244 244 }
245 245 }
246 246
247 247 .del {
248 248 background: none repeat scroll 0 0 #FFDDDD;
249 249
250 250 del {
251 251 background: none repeat scroll 0 0 #FFAAAA;
252 252 text-decoration: none;
253 253 }
254 254 }
255 255
256 256 /** LINE NUMBERS **/
257 257 .lineno {
258 258 padding-left: 2px !important;
259 259 padding-right: 2px;
260 260 text-align: right;
261 261 width: 32px;
262 262 -moz-user-select: none;
263 263 -webkit-user-select: none;
264 264 border-right: @border-thickness solid @grey5 !important;
265 265 border-left: 0px solid #CCC !important;
266 266 border-top: 0px solid #CCC !important;
267 267 border-bottom: none !important;
268 268
269 269 a {
270 270 &:extend(pre);
271 271 text-align: right;
272 272 padding-right: 2px;
273 273 cursor: pointer;
274 274 display: block;
275 275 width: 32px;
276 276 }
277 277 }
278 278
279 279 .context {
280 280 cursor: auto;
281 281 &:extend(pre);
282 282 }
283 283
284 284 .lineno-inline {
285 285 background: none repeat scroll 0 0 #FFF !important;
286 286 padding-left: 2px;
287 287 padding-right: 2px;
288 288 text-align: right;
289 289 width: 30px;
290 290 -moz-user-select: none;
291 291 -webkit-user-select: none;
292 292 }
293 293
294 294 /** CODE **/
295 295 .code {
296 296 display: block;
297 297 width: 100%;
298 298
299 299 td {
300 300 margin: 0;
301 301 padding: 0;
302 302 }
303 303
304 304 pre {
305 305 margin: 0;
306 306 padding: 0;
307 307 margin-left: .5em;
308 308 }
309 309 }
310 310 }
311 311
312 312
313 313 // Comments
314 314
315 315 div.comment:target {
316 316 border-left: 6px solid @comment-highlight-color;
317 317 padding-left: 3px;
318 318 margin-left: -9px;
319 319 }
320 320
321 321 //TODO: anderson: can't get an absolute number out of anything, so had to put the
322 322 //current values that might change. But to make it clear I put as a calculation
323 323 @comment-max-width: 1065px;
324 324 @pr-extra-margin: 34px;
325 325 @pr-border-spacing: 4px;
326 326 @pr-comment-width: @comment-max-width - @pr-extra-margin - @pr-border-spacing;
327 327
328 328 // Pull Request
329 329 .cs_files .code-difftable {
330 330 border: @border-thickness solid @grey5; //borders only on PRs
331 331
332 332 .comment-inline-form,
333 333 div.comment {
334 334 width: @pr-comment-width;
335 335 }
336 336 }
337 337
338 338 // Changeset
339 339 .code-difftable {
340 340 .comment-inline-form,
341 341 div.comment {
342 342 width: @comment-max-width;
343 343 }
344 344 }
345 345
346 346 //Style page
347 347 @style-extra-margin: @sidebar-width + (@sidebarpadding * 3) + @padding;
348 348 #style-page .code-difftable{
349 349 .comment-inline-form,
350 350 div.comment {
351 351 width: @comment-max-width - @style-extra-margin;
352 352 }
353 353 }
354 354
355 355 #context-bar > h2 {
356 356 font-size: 20px;
357 357 }
358 358
359 359 #context-bar > h2> a {
360 360 font-size: 20px;
361 361 }
362 362 // end of defaults
363 363
364 364 .file_diff_buttons {
365 365 padding: 0 0 @padding;
366 366
367 367 .drop-menu {
368 368 float: left;
369 369 margin: 0 @padding 0 0;
370 370 }
371 371 .btn {
372 372 margin: 0 @padding 0 0;
373 373 }
374 374 }
375 375
376 376 .code-body.textarea.editor {
377 377 max-width: none;
378 378 padding: 15px;
379 379 }
380 380
381 381 td.injected_diff{
382 382 max-width: 1178px;
383 383 overflow-x: auto;
384 384 overflow-y: hidden;
385 385
386 386 div.diff-container,
387 387 div.diffblock{
388 388 max-width: 100%;
389 389 }
390 390
391 391 div.code-body {
392 392 max-width: 1124px;
393 393 overflow-x: auto;
394 overflow-y: hidden;
394 395 padding: 0;
395 396 }
396 397 div.diffblock {
397 398 border: none;
398 399 }
399 400
400 401 &.inline-form {
401 402 width: 99%
402 403 }
403 404 }
404 405
405 406
406 407 table.code-difftable {
407 408 width: 100%;
408 409 }
409 410
410 411 /** PYGMENTS COLORING **/
411 412 div.codeblock {
412 413
413 414 // TODO: johbo: Added interim to get rid of the margin around
414 415 // Select2 widgets. This needs further cleanup.
415 416 margin-top: @padding;
416 417
417 418 overflow: auto;
418 419 padding: 0px;
419 420 border: @border-thickness solid @grey5;
420 421 background: @grey6;
421 422 .border-radius(@border-radius);
422 423
423 424 #remove_gist {
424 425 float: right;
425 426 }
426 427
427 428 .author {
428 429 clear: both;
429 430 vertical-align: middle;
430 431 font-family: @text-bold;
431 432 }
432 433
433 434 .btn-mini {
434 435 float: left;
435 436 margin: 0 5px 0 0;
436 437 }
437 438
438 439 .code-header {
439 440 padding: @padding;
440 441 border-bottom: @border-thickness solid @grey5;
441 442
442 443 .rc-user {
443 444 min-width: 0;
444 445 margin-right: .5em;
445 446 }
446 447
447 448 .stats {
448 449 clear: both;
449 450 margin: 0 0 @padding 0;
450 451 padding: 0;
451 452 .left {
452 453 float: left;
453 454 clear: left;
454 455 max-width: 75%;
455 456 margin: 0 0 @padding 0;
456 457
457 458 &.item {
458 459 margin-right: @padding;
459 460 &.last { border-right: none; }
460 461 }
461 462 }
462 463 .buttons { float: right; }
463 464 .author {
464 465 height: 25px; margin-left: 15px; font-weight: bold;
465 466 }
466 467 }
467 468
468 469 .commit {
469 470 margin: 5px 0 0 26px;
470 471 font-weight: normal;
471 472 white-space: pre-wrap;
472 473 }
473 474 }
474 475
475 476 .message {
476 477 position: relative;
477 478 margin: @padding;
478 479
479 480 .codeblock-label {
480 481 margin: 0 0 1em 0;
481 482 }
482 483 }
483 484
484 485 .code-body {
485 486 padding: @padding;
486 487 background-color: #ffffff;
487 488 min-width: 100%;
488 489 box-sizing: border-box;
489 490 // TODO: johbo: Parent has overflow: auto, this forces the child here
490 491 // to have the intended size and to scroll. Should be simplified.
491 492 width: 100%;
492 493 overflow-x: auto;
493 494 }
494 495 }
495 496
496 497 .code-highlighttable,
497 498 div.codeblock {
498 499
499 500 &.readme {
500 501 background-color: white;
501 502 }
502 503
503 504 .markdown-block table {
504 505 border-collapse: collapse;
505 506
506 507 th,
507 508 td {
508 509 padding: .5em !important;
509 510 border: @border-thickness solid @border-default-color !important;
510 511 }
511 512 }
512 513
513 514 table {
514 515 width: 0 !important;
515 516 border: 0px !important;
516 517 margin: 0;
517 518 letter-spacing: normal;
518 519
519 520
520 521 td {
521 522 border: 0px !important;
522 523 vertical-align: top;
523 524 }
524 525 }
525 526 }
526 527
527 528 div.codeblock .code-header .search-path { padding: 0 0 0 10px; }
528 529 div.search-code-body {
529 530 background-color: #ffffff; padding: 5px 0 5px 10px;
530 531 pre {
531 532 .match { background-color: #faffa6;}
532 533 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
533 534 }
534 535 .code-highlighttable {
535 536 border-collapse: collapse;
536 537
537 538 tr:hover {
538 539 background: #fafafa;
539 540 }
540 541 td.code {
541 542 padding-left: 10px;
542 543 }
543 544 td.line {
544 545 border-right: 1px solid #ccc !important;
545 546 padding-right: 10px;
546 547 text-align: right;
547 548 font-family: "Lucida Console",Monaco,monospace;
548 549 span {
549 550 white-space: pre-wrap;
550 551 color: #666666;
551 552 }
552 553 }
553 554 }
554 555 }
555 556
556 557 div.annotatediv { margin-left: 2px; margin-right: 4px; }
557 558 .code-highlight {
558 559 margin: 0; padding: 0; border-left: @border-thickness solid @grey5;
559 560 pre, .linenodiv pre { padding: 0 5px; margin: 0; }
560 561 pre div:target {background-color: @comment-highlight-color !important;}
561 562 }
562 563
563 564 .linenos a { text-decoration: none; }
564 565
565 566 .CodeMirror-selected { background: @rchighlightblue; }
566 567 .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; }
567 568 .CodeMirror ::selection { background: @rchighlightblue; }
568 569 .CodeMirror ::-moz-selection { background: @rchighlightblue; }
569 570
570 571 .code { display: block; border:0px !important; }
571 572 .code-highlight,
572 573 .codehilite {
573 574 .hll { background-color: #ffffcc }
574 575 .c { color: #408080; font-style: italic } /* Comment */
575 576 .err, .codehilite .err { border: @border-thickness solid #FF0000 } /* Error */
576 577 .k { color: #008000; font-weight: bold } /* Keyword */
577 578 .o { color: #666666 } /* Operator */
578 579 .cm { color: #408080; font-style: italic } /* Comment.Multiline */
579 580 .cp { color: #BC7A00 } /* Comment.Preproc */
580 581 .c1 { color: #408080; font-style: italic } /* Comment.Single */
581 582 .cs { color: #408080; font-style: italic } /* Comment.Special */
582 583 .gd { color: #A00000 } /* Generic.Deleted */
583 584 .ge { font-style: italic } /* Generic.Emph */
584 585 .gr { color: #FF0000 } /* Generic.Error */
585 586 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
586 587 .gi { color: #00A000 } /* Generic.Inserted */
587 588 .go { color: #808080 } /* Generic.Output */
588 589 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
589 590 .gs { font-weight: bold } /* Generic.Strong */
590 591 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
591 592 .gt { color: #0040D0 } /* Generic.Traceback */
592 593 .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
593 594 .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
594 595 .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
595 596 .kp { color: #008000 } /* Keyword.Pseudo */
596 597 .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
597 598 .kt { color: #B00040 } /* Keyword.Type */
598 599 .m { color: #666666 } /* Literal.Number */
599 600 .s { color: #BA2121 } /* Literal.String */
600 601 .na { color: #7D9029 } /* Name.Attribute */
601 602 .nb { color: #008000 } /* Name.Builtin */
602 603 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
603 604 .no { color: #880000 } /* Name.Constant */
604 605 .nd { color: #AA22FF } /* Name.Decorator */
605 606 .ni { color: #999999; font-weight: bold } /* Name.Entity */
606 607 .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
607 608 .nf { color: #0000FF } /* Name.Function */
608 609 .nl { color: #A0A000 } /* Name.Label */
609 610 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
610 611 .nt { color: #008000; font-weight: bold } /* Name.Tag */
611 612 .nv { color: #19177C } /* Name.Variable */
612 613 .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
613 614 .w { color: #bbbbbb } /* Text.Whitespace */
614 615 .mf { color: #666666 } /* Literal.Number.Float */
615 616 .mh { color: #666666 } /* Literal.Number.Hex */
616 617 .mi { color: #666666 } /* Literal.Number.Integer */
617 618 .mo { color: #666666 } /* Literal.Number.Oct */
618 619 .sb { color: #BA2121 } /* Literal.String.Backtick */
619 620 .sc { color: #BA2121 } /* Literal.String.Char */
620 621 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
621 622 .s2 { color: #BA2121 } /* Literal.String.Double */
622 623 .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
623 624 .sh { color: #BA2121 } /* Literal.String.Heredoc */
624 625 .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
625 626 .sx { color: #008000 } /* Literal.String.Other */
626 627 .sr { color: #BB6688 } /* Literal.String.Regex */
627 628 .s1 { color: #BA2121 } /* Literal.String.Single */
628 629 .ss { color: #19177C } /* Literal.String.Symbol */
629 630 .bp { color: #008000 } /* Name.Builtin.Pseudo */
630 631 .vc { color: #19177C } /* Name.Variable.Class */
631 632 .vg { color: #19177C } /* Name.Variable.Global */
632 633 .vi { color: #19177C } /* Name.Variable.Instance */
633 634 .il { color: #666666 } /* Literal.Number.Integer.Long */
634 635 }
635 636
636 637 /* customized pre blocks for markdown/rst */
637 638 pre.literal-block, .codehilite pre{
638 639 padding: @padding;
639 640 border: 1px solid @grey6;
640 641 .border-radius(@border-radius);
641 642 background-color: @grey7;
642 643 }
General Comments 0
You need to be logged in to leave comments. Login now