##// END OF EJS Templates
styles: replace adjacent selector with sibling selctor
ergo -
r1165:718c385a default
parent child Browse files
Show More
@@ -1,1176 +1,1176 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 394 overflow-y: hidden;
395 395 padding: 0;
396 396 }
397 397 div.diffblock {
398 398 border: none;
399 399 }
400 400
401 401 &.inline-form {
402 402 width: 99%
403 403 }
404 404 }
405 405
406 406
407 407 table.code-difftable {
408 408 width: 100%;
409 409 }
410 410
411 411 /** PYGMENTS COLORING **/
412 412 div.codeblock {
413 413
414 414 // TODO: johbo: Added interim to get rid of the margin around
415 415 // Select2 widgets. This needs further cleanup.
416 416 margin-top: @padding;
417 417
418 418 overflow: auto;
419 419 padding: 0px;
420 420 border: @border-thickness solid @grey5;
421 421 background: @grey6;
422 422 .border-radius(@border-radius);
423 423
424 424 #remove_gist {
425 425 float: right;
426 426 }
427 427
428 428 .author {
429 429 clear: both;
430 430 vertical-align: middle;
431 431 font-family: @text-bold;
432 432 }
433 433
434 434 .btn-mini {
435 435 float: left;
436 436 margin: 0 5px 0 0;
437 437 }
438 438
439 439 .code-header {
440 440 padding: @padding;
441 441 border-bottom: @border-thickness solid @grey5;
442 442
443 443 .rc-user {
444 444 min-width: 0;
445 445 margin-right: .5em;
446 446 }
447 447
448 448 .stats {
449 449 clear: both;
450 450 margin: 0 0 @padding 0;
451 451 padding: 0;
452 452 .left {
453 453 float: left;
454 454 clear: left;
455 455 max-width: 75%;
456 456 margin: 0 0 @padding 0;
457 457
458 458 &.item {
459 459 margin-right: @padding;
460 460 &.last { border-right: none; }
461 461 }
462 462 }
463 463 .buttons { float: right; }
464 464 .author {
465 465 height: 25px; margin-left: 15px; font-weight: bold;
466 466 }
467 467 }
468 468
469 469 .commit {
470 470 margin: 5px 0 0 26px;
471 471 font-weight: normal;
472 472 white-space: pre-wrap;
473 473 }
474 474 }
475 475
476 476 .message {
477 477 position: relative;
478 478 margin: @padding;
479 479
480 480 .codeblock-label {
481 481 margin: 0 0 1em 0;
482 482 }
483 483 }
484 484
485 485 .code-body {
486 486 padding: @padding;
487 487 background-color: #ffffff;
488 488 min-width: 100%;
489 489 box-sizing: border-box;
490 490 // TODO: johbo: Parent has overflow: auto, this forces the child here
491 491 // to have the intended size and to scroll. Should be simplified.
492 492 width: 100%;
493 493 overflow-x: auto;
494 494 }
495 495 }
496 496
497 497 .code-highlighttable,
498 498 div.codeblock {
499 499
500 500 &.readme {
501 501 background-color: white;
502 502 }
503 503
504 504 .markdown-block table {
505 505 border-collapse: collapse;
506 506
507 507 th,
508 508 td {
509 509 padding: .5em;
510 510 border: @border-thickness solid @border-default-color;
511 511 }
512 512 }
513 513
514 514 table {
515 515 border: 0px;
516 516 margin: 0;
517 517 letter-spacing: normal;
518 518
519 519
520 520 td {
521 521 border: 0px;
522 522 vertical-align: top;
523 523 }
524 524 }
525 525 }
526 526
527 527 div.codeblock .code-header .search-path { padding: 0 0 0 10px; }
528 528 div.search-code-body {
529 529 background-color: #ffffff; padding: 5px 0 5px 10px;
530 530 pre {
531 531 .match { background-color: #faffa6;}
532 532 .break { display: block; width: 100%; background-color: #DDE7EF; color: #747474; }
533 533 }
534 534 .code-highlighttable {
535 535 border-collapse: collapse;
536 536
537 537 tr:hover {
538 538 background: #fafafa;
539 539 }
540 540 td.code {
541 541 padding-left: 10px;
542 542 }
543 543 td.line {
544 544 border-right: 1px solid #ccc !important;
545 545 padding-right: 10px;
546 546 text-align: right;
547 547 font-family: "Lucida Console",Monaco,monospace;
548 548 span {
549 549 white-space: pre-wrap;
550 550 color: #666666;
551 551 }
552 552 }
553 553 }
554 554 }
555 555
556 556 div.annotatediv { margin-left: 2px; margin-right: 4px; }
557 557 .code-highlight {
558 558 margin: 0; padding: 0; border-left: @border-thickness solid @grey5;
559 559 pre, .linenodiv pre { padding: 0 5px; margin: 0; }
560 560 pre div:target {background-color: @comment-highlight-color !important;}
561 561 }
562 562
563 563 .linenos a { text-decoration: none; }
564 564
565 565 .CodeMirror-selected { background: @rchighlightblue; }
566 566 .CodeMirror-focused .CodeMirror-selected { background: @rchighlightblue; }
567 567 .CodeMirror ::selection { background: @rchighlightblue; }
568 568 .CodeMirror ::-moz-selection { background: @rchighlightblue; }
569 569
570 570 .code { display: block; border:0px !important; }
571 571 .code-highlight, /* TODO: dan: merge codehilite into code-highlight */
572 572 .codehilite {
573 573 .hll { background-color: #ffffcc }
574 574 .c { color: #408080; font-style: italic } /* Comment */
575 575 .err, .codehilite .err { border: @border-thickness solid #FF0000 } /* Error */
576 576 .k { color: #008000; font-weight: bold } /* Keyword */
577 577 .o { color: #666666 } /* Operator */
578 578 .cm { color: #408080; font-style: italic } /* Comment.Multiline */
579 579 .cp { color: #BC7A00 } /* Comment.Preproc */
580 580 .c1 { color: #408080; font-style: italic } /* Comment.Single */
581 581 .cs { color: #408080; font-style: italic } /* Comment.Special */
582 582 .gd { color: #A00000 } /* Generic.Deleted */
583 583 .ge { font-style: italic } /* Generic.Emph */
584 584 .gr { color: #FF0000 } /* Generic.Error */
585 585 .gh { color: #000080; font-weight: bold } /* Generic.Heading */
586 586 .gi { color: #00A000 } /* Generic.Inserted */
587 587 .go { color: #808080 } /* Generic.Output */
588 588 .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
589 589 .gs { font-weight: bold } /* Generic.Strong */
590 590 .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
591 591 .gt { color: #0040D0 } /* Generic.Traceback */
592 592 .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
593 593 .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
594 594 .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
595 595 .kp { color: #008000 } /* Keyword.Pseudo */
596 596 .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
597 597 .kt { color: #B00040 } /* Keyword.Type */
598 598 .m { color: #666666 } /* Literal.Number */
599 599 .s { color: #BA2121 } /* Literal.String */
600 600 .na { color: #7D9029 } /* Name.Attribute */
601 601 .nb { color: #008000 } /* Name.Builtin */
602 602 .nc { color: #0000FF; font-weight: bold } /* Name.Class */
603 603 .no { color: #880000 } /* Name.Constant */
604 604 .nd { color: #AA22FF } /* Name.Decorator */
605 605 .ni { color: #999999; font-weight: bold } /* Name.Entity */
606 606 .ne { color: #D2413A; font-weight: bold } /* Name.Exception */
607 607 .nf { color: #0000FF } /* Name.Function */
608 608 .nl { color: #A0A000 } /* Name.Label */
609 609 .nn { color: #0000FF; font-weight: bold } /* Name.Namespace */
610 610 .nt { color: #008000; font-weight: bold } /* Name.Tag */
611 611 .nv { color: #19177C } /* Name.Variable */
612 612 .ow { color: #AA22FF; font-weight: bold } /* Operator.Word */
613 613 .w { color: #bbbbbb } /* Text.Whitespace */
614 614 .mf { color: #666666 } /* Literal.Number.Float */
615 615 .mh { color: #666666 } /* Literal.Number.Hex */
616 616 .mi { color: #666666 } /* Literal.Number.Integer */
617 617 .mo { color: #666666 } /* Literal.Number.Oct */
618 618 .sb { color: #BA2121 } /* Literal.String.Backtick */
619 619 .sc { color: #BA2121 } /* Literal.String.Char */
620 620 .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
621 621 .s2 { color: #BA2121 } /* Literal.String.Double */
622 622 .se { color: #BB6622; font-weight: bold } /* Literal.String.Escape */
623 623 .sh { color: #BA2121 } /* Literal.String.Heredoc */
624 624 .si { color: #BB6688; font-weight: bold } /* Literal.String.Interpol */
625 625 .sx { color: #008000 } /* Literal.String.Other */
626 626 .sr { color: #BB6688 } /* Literal.String.Regex */
627 627 .s1 { color: #BA2121 } /* Literal.String.Single */
628 628 .ss { color: #19177C } /* Literal.String.Symbol */
629 629 .bp { color: #008000 } /* Name.Builtin.Pseudo */
630 630 .vc { color: #19177C } /* Name.Variable.Class */
631 631 .vg { color: #19177C } /* Name.Variable.Global */
632 632 .vi { color: #19177C } /* Name.Variable.Instance */
633 633 .il { color: #666666 } /* Literal.Number.Integer.Long */
634 634 }
635 635
636 636 /* customized pre blocks for markdown/rst */
637 637 pre.literal-block, .codehilite pre{
638 638 padding: @padding;
639 639 border: 1px solid @grey6;
640 640 .border-radius(@border-radius);
641 641 background-color: @grey7;
642 642 }
643 643
644 644
645 645 /* START NEW CODE BLOCK CSS */
646 646
647 647 @cb-line-height: 18px;
648 648 @cb-line-code-padding: 10px;
649 649 @cb-text-padding: 5px;
650 650
651 651 @pill-padding: 2px 7px;
652 652
653 653 input.filediff-collapse-state {
654 654 display: none;
655 655
656 656 &:checked + .filediff { /* file diff is collapsed */
657 657 .cb {
658 658 display: none
659 659 }
660 660 .filediff-collapse-indicator {
661 661 border-width: 9px 0 9px 15.6px;
662 662 border-color: transparent transparent transparent #ccc;
663 663 }
664 664 .filediff-menu {
665 665 display: none;
666 666 }
667 667 margin: -1px 0 0 0;
668 668 }
669 669
670 670 &+ .filediff { /* file diff is expanded */
671 671 .filediff-collapse-indicator {
672 672 border-width: 15.6px 9px 0 9px;
673 673 border-color: #ccc transparent transparent transparent;
674 674 }
675 675 .filediff-menu {
676 676 display: block;
677 677 }
678 678 margin: 20px 0;
679 679 &:nth-child(2) {
680 680 margin: 0;
681 681 }
682 682 }
683 683 }
684 684 .cs_files {
685 685 clear: both;
686 686 }
687 687
688 688 .diffset-menu {
689 689 margin-bottom: 20px;
690 690 }
691 691 .diffset {
692 692 margin: 20px auto;
693 693 .diffset-heading {
694 694 border: 1px solid @grey5;
695 695 margin-bottom: -1px;
696 696 // margin-top: 20px;
697 697 h2 {
698 698 margin: 0;
699 699 line-height: 38px;
700 700 padding-left: 10px;
701 701 }
702 702 .btn {
703 703 margin: 0;
704 704 }
705 705 background: @grey6;
706 706 display: block;
707 707 padding: 5px;
708 708 }
709 709 .diffset-heading-warning {
710 710 background: @alert3-inner;
711 711 border: 1px solid @alert3;
712 712 }
713 713 &.diffset-comments-disabled {
714 714 .cb-comment-box-opener, .comment-inline-form, .cb-comment-add-button {
715 715 display: none !important;
716 716 }
717 717 }
718 718 }
719 719
720 720 .pill {
721 721 display: block;
722 722 float: left;
723 723 padding: @pill-padding;
724 724 }
725 725 .pill-group {
726 726 .pill {
727 727 opacity: .8;
728 728 &:first-child {
729 729 border-radius: @border-radius 0 0 @border-radius;
730 730 }
731 731 &:last-child {
732 732 border-radius: 0 @border-radius @border-radius 0;
733 733 }
734 734 &:only-child {
735 735 border-radius: @border-radius;
736 736 }
737 737 }
738 738 }
739 739
740 740 .filediff {
741 741 border: 1px solid @grey5;
742 742
743 743 /* START OVERRIDES */
744 744 .code-highlight {
745 745 border: none; // TODO: remove this border from the global
746 746 // .code-highlight, it doesn't belong there
747 747 }
748 748 label {
749 749 margin: 0; // TODO: remove this margin definition from global label
750 750 // it doesn't belong there - if margin on labels
751 751 // are needed for a form they should be defined
752 752 // in the form's class
753 753 }
754 754 /* END OVERRIDES */
755 755
756 756 * {
757 757 box-sizing: border-box;
758 758 }
759 759 .filediff-anchor {
760 760 visibility: hidden;
761 761 }
762 762 &:hover {
763 763 .filediff-anchor {
764 764 visibility: visible;
765 765 }
766 766 }
767 767
768 768 .filediff-collapse-indicator {
769 769 width: 0;
770 770 height: 0;
771 771 border-style: solid;
772 772 float: left;
773 773 margin: 2px 2px 0 0;
774 774 cursor: pointer;
775 775 }
776 776
777 777 .filediff-heading {
778 778 background: @grey7;
779 779 cursor: pointer;
780 780 display: block;
781 781 padding: 5px 10px;
782 782 }
783 783 .filediff-heading:after {
784 784 content: "";
785 785 display: table;
786 786 clear: both;
787 787 }
788 788 .filediff-heading:hover {
789 789 background: #e1e9f4 !important;
790 790 }
791 791
792 792 .filediff-menu {
793 793 float: right;
794 794
795 795 &> a, &> span {
796 796 padding: 5px;
797 797 display: block;
798 798 float: left
799 799 }
800 800 }
801 801
802 802 .pill {
803 803 &[op="name"] {
804 804 background: none;
805 805 color: @grey2;
806 806 opacity: 1;
807 807 color: white;
808 808 }
809 809 &[op="limited"] {
810 810 background: @grey2;
811 811 color: white;
812 812 }
813 813 &[op="binary"] {
814 814 background: @color7;
815 815 color: white;
816 816 }
817 817 &[op="modified"] {
818 818 background: @alert1;
819 819 color: white;
820 820 }
821 821 &[op="renamed"] {
822 822 background: @color4;
823 823 color: white;
824 824 }
825 825 &[op="mode"] {
826 826 background: @grey3;
827 827 color: white;
828 828 }
829 829 &[op="symlink"] {
830 830 background: @color8;
831 831 color: white;
832 832 }
833 833
834 834 &[op="added"] { /* added lines */
835 835 background: @alert1;
836 836 color: white;
837 837 }
838 838 &[op="deleted"] { /* deleted lines */
839 839 background: @alert2;
840 840 color: white;
841 841 }
842 842
843 843 &[op="created"] { /* created file */
844 844 background: @alert1;
845 845 color: white;
846 846 }
847 847 &[op="removed"] { /* deleted file */
848 848 background: @color5;
849 849 color: white;
850 850 }
851 851 }
852 852
853 853 .filediff-collapse-button, .filediff-expand-button {
854 854 cursor: pointer;
855 855 }
856 856 .filediff-collapse-button {
857 857 display: inline;
858 858 }
859 859 .filediff-expand-button {
860 860 display: none;
861 861 }
862 862 .filediff-collapsed .filediff-collapse-button {
863 863 display: none;
864 864 }
865 865 .filediff-collapsed .filediff-expand-button {
866 866 display: inline;
867 867 }
868 868
869 869 @comment-padding: 5px;
870 870
871 871 /**** COMMENTS ****/
872 872
873 873 .filediff-menu {
874 874 .show-comment-button {
875 875 display: none;
876 876 }
877 877 }
878 878 &.hide-comments {
879 879 .inline-comments {
880 880 display: none;
881 881 }
882 882 .filediff-menu {
883 883 .show-comment-button {
884 884 display: inline;
885 885 }
886 886 .hide-comment-button {
887 887 display: none;
888 888 }
889 889 }
890 890 }
891 891
892 892 .hide-line-comments {
893 893 .inline-comments {
894 894 display: none;
895 895 }
896 896 }
897 897 .inline-comments {
898 898 border-radius: @border-radius;
899 899 background: @grey6;
900 900 .comment {
901 901 margin: 0;
902 902 border-radius: @border-radius;
903 903 }
904 904 .comment-outdated {
905 905 opacity: 0.5;
906 906 }
907 907 .comment-inline {
908 908 background: white;
909 909 padding: (@comment-padding + 3px) @comment-padding;
910 910 border: @comment-padding solid @grey6;
911 911
912 912 .text {
913 913 border: none;
914 914 }
915 915 .meta {
916 916 border-bottom: 1px solid @grey6;
917 917 padding-bottom: 10px;
918 918 }
919 919 }
920 920 .comment-selected {
921 921 border-left: 6px solid @comment-highlight-color;
922 922 }
923 923 .comment-inline-form {
924 924 padding: @comment-padding;
925 925 display: none;
926 926 }
927 927 .cb-comment-add-button {
928 928 margin: @comment-padding;
929 929 }
930 930 /* hide add comment button when form is open */
931 .comment-inline-form-open + .cb-comment-add-button {
931 .comment-inline-form-open ~ .cb-comment-add-button {
932 932 display: none;
933 933 }
934 934 .comment-inline-form-open {
935 935 display: block;
936 936 }
937 937 /* hide add comment button when form but no comments */
938 938 .comment-inline-form:first-child + .cb-comment-add-button {
939 939 display: none;
940 940 }
941 941 /* hide add comment button when no comments or form */
942 942 .cb-comment-add-button:first-child {
943 943 display: none;
944 944 }
945 945 /* hide add comment button when only comment is being deleted */
946 946 .comment-deleting:first-child + .cb-comment-add-button {
947 947 display: none;
948 948 }
949 949 }
950 950 /**** END COMMENTS ****/
951 951
952 952 }
953 953
954 954
955 955 table.cb {
956 956 width: 100%;
957 957 border-collapse: collapse;
958 958
959 959 .cb-text {
960 960 padding: @cb-text-padding;
961 961 }
962 962 .cb-hunk {
963 963 padding: @cb-text-padding;
964 964 }
965 965 .cb-expand {
966 966 display: none;
967 967 }
968 968 .cb-collapse {
969 969 display: inline;
970 970 }
971 971 &.cb-collapsed {
972 972 .cb-line {
973 973 display: none;
974 974 }
975 975 .cb-expand {
976 976 display: inline;
977 977 }
978 978 .cb-collapse {
979 979 display: none;
980 980 }
981 981 }
982 982
983 983 /* intentionally general selector since .cb-line-selected must override it
984 984 and they both use !important since the td itself may have a random color
985 985 generated by annotation blocks. TLDR: if you change it, make sure
986 986 annotated block selection and line selection in file view still work */
987 987 .cb-line-fresh .cb-content {
988 988 background: white !important;
989 989 }
990 990 .cb-warning {
991 991 background: #fff4dd;
992 992 }
993 993
994 994 &.cb-diff-sideside {
995 995 td {
996 996 &.cb-content {
997 997 width: 50%;
998 998 }
999 999 }
1000 1000 }
1001 1001
1002 1002 tr {
1003 1003 &.cb-annotate {
1004 1004 border-top: 1px solid #eee;
1005 1005
1006 1006 &+ .cb-line {
1007 1007 border-top: 1px solid #eee;
1008 1008 }
1009 1009
1010 1010 &:first-child {
1011 1011 border-top: none;
1012 1012 &+ .cb-line {
1013 1013 border-top: none;
1014 1014 }
1015 1015 }
1016 1016 }
1017 1017
1018 1018 &.cb-hunk {
1019 1019 font-family: @font-family-monospace;
1020 1020 color: rgba(0, 0, 0, 0.3);
1021 1021
1022 1022 td {
1023 1023 &:first-child {
1024 1024 background: #edf2f9;
1025 1025 }
1026 1026 &:last-child {
1027 1027 background: #f4f7fb;
1028 1028 }
1029 1029 }
1030 1030 }
1031 1031 }
1032 1032
1033 1033
1034 1034 td {
1035 1035 vertical-align: top;
1036 1036 padding: 0;
1037 1037
1038 1038 &.cb-content {
1039 1039 font-size: 12.35px;
1040 1040
1041 1041 &.cb-line-selected .cb-code {
1042 1042 background: @comment-highlight-color !important;
1043 1043 }
1044 1044
1045 1045 span.cb-code {
1046 1046 line-height: @cb-line-height;
1047 1047 padding-left: @cb-line-code-padding;
1048 1048 padding-right: @cb-line-code-padding;
1049 1049 display: block;
1050 1050 white-space: pre-wrap;
1051 1051 font-family: @font-family-monospace;
1052 1052 word-break: break-word;
1053 1053 .nonl {
1054 1054 color: @color5;
1055 1055 }
1056 1056 }
1057 1057
1058 1058 &> button.cb-comment-box-opener {
1059 1059
1060 1060 padding: 2px 5px 1px 5px;
1061 1061 margin-left: 0px;
1062 1062 margin-top: -1px;
1063 1063
1064 1064 border-radius: @border-radius;
1065 1065 position: absolute;
1066 1066 display: none;
1067 1067 }
1068 1068 .cb-comment {
1069 1069 margin-top: 10px;
1070 1070 white-space: normal;
1071 1071 }
1072 1072 }
1073 1073 &:hover {
1074 1074 button.cb-comment-box-opener {
1075 1075 display: block;
1076 1076 }
1077 1077 &+ td button.cb-comment-box-opener {
1078 1078 display: block
1079 1079 }
1080 1080 }
1081 1081
1082 1082 &.cb-data {
1083 1083 text-align: right;
1084 1084 width: 30px;
1085 1085 font-family: @font-family-monospace;
1086 1086
1087 1087 .icon-comment {
1088 1088 cursor: pointer;
1089 1089 }
1090 1090 &.cb-line-selected > div {
1091 1091 display: block;
1092 1092 background: @comment-highlight-color !important;
1093 1093 line-height: @cb-line-height;
1094 1094 color: rgba(0, 0, 0, 0.3);
1095 1095 }
1096 1096 }
1097 1097
1098 1098 &.cb-lineno {
1099 1099 padding: 0;
1100 1100 width: 50px;
1101 1101 color: rgba(0, 0, 0, 0.3);
1102 1102 text-align: right;
1103 1103 border-right: 1px solid #eee;
1104 1104 font-family: @font-family-monospace;
1105 1105
1106 1106 a::before {
1107 1107 content: attr(data-line-no);
1108 1108 }
1109 1109 &.cb-line-selected a {
1110 1110 background: @comment-highlight-color !important;
1111 1111 }
1112 1112
1113 1113 a {
1114 1114 display: block;
1115 1115 padding-right: @cb-line-code-padding;
1116 1116 padding-left: @cb-line-code-padding;
1117 1117 line-height: @cb-line-height;
1118 1118 color: rgba(0, 0, 0, 0.3);
1119 1119 }
1120 1120 }
1121 1121
1122 1122 &.cb-empty {
1123 1123 background: @grey7;
1124 1124 }
1125 1125
1126 1126 ins {
1127 1127 color: black;
1128 1128 background: #a6f3a6;
1129 1129 text-decoration: none;
1130 1130 }
1131 1131 del {
1132 1132 color: black;
1133 1133 background: #f8cbcb;
1134 1134 text-decoration: none;
1135 1135 }
1136 1136 &.cb-addition {
1137 1137 background: #ecffec;
1138 1138
1139 1139 &.blob-lineno {
1140 1140 background: #ddffdd;
1141 1141 }
1142 1142 }
1143 1143 &.cb-deletion {
1144 1144 background: #ffecec;
1145 1145
1146 1146 &.blob-lineno {
1147 1147 background: #ffdddd;
1148 1148 }
1149 1149 }
1150 1150
1151 1151 &.cb-annotate-info {
1152 1152 width: 320px;
1153 1153 min-width: 320px;
1154 1154 max-width: 320px;
1155 1155 padding: 5px 2px;
1156 1156 font-size: 13px;
1157 1157
1158 1158 strong.cb-annotate-message {
1159 1159 padding: 5px 0;
1160 1160 white-space: pre-line;
1161 1161 display: inline-block;
1162 1162 }
1163 1163 .rc-user {
1164 1164 float: none;
1165 1165 padding: 0 6px 0 17px;
1166 1166 min-width: auto;
1167 1167 min-height: auto;
1168 1168 }
1169 1169 }
1170 1170
1171 1171 &.cb-annotate-revision {
1172 1172 cursor: pointer;
1173 1173 text-align: right;
1174 1174 }
1175 1175 }
1176 1176 }
General Comments 0
You need to be logged in to leave comments. Login now