Skip to content

Commit f96104b

Browse files
author
Vladimir Kotal
committed
Merge pull request #717 from vladak/src-id-CSS
Src id css
2 parents b001a5a + e6b0a01 commit f96104b

File tree

4 files changed

+55
-43
lines changed

4 files changed

+55
-43
lines changed

web/default/style.css

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -458,18 +458,18 @@ table#dirlist { /* the "Name" column */
458458
}
459459

460460
/* file display */
461-
#src {
461+
div[id^='src'] {
462462
}
463463

464-
#src pre {
464+
div[id^='src'] pre {
465465
margin: 0;
466466
}
467467

468-
#src .l-hide, #src .hl-hide, .blame-hidden { /* hidden line number/annotation block */
468+
div[id^='src'] .l-hide, #src .hl-hide, .blame-hidden { /* hidden line number/annotation block */
469469
display: none
470470
}
471471

472-
#src .l, #src .hl, .blame .r, .blame .a,
472+
div[id^='src'] .l, div[id^='src'] .hl, .blame .r, .blame .a,
473473
#results .l, #more .l,
474474
#difftable i, del.d { /* line number/annotation block */
475475
display: inline-block;
@@ -481,12 +481,12 @@ table#dirlist { /* the "Name" column */
481481
color: #666;
482482
}
483483

484-
#src .hl { /* highlighted line number */
484+
div[id^='src'] .hl { /* highlighted line number */
485485
color: #000;
486486
}
487487

488488
/* highlight line number with anchor */
489-
#src a.l:target, #src a.hl:target {
489+
div[id^='src'] a.l:target, div[id^='src'] a.hl:target {
490490
background: orange;
491491
color:yellow;
492492
}
@@ -500,12 +500,12 @@ table#dirlist { /* the "Name" column */
500500
}
501501

502502
/* source code highlighting - see org/opengrok/analysis/$lang/*Xref.lex */
503-
#src .n { /* numbers/label */ color: #a52a2a; }
504-
#src .s { /* strings */ color: green; }
505-
#src .c { /* comment */ color: #666; }
506-
#src .b { /* heading/title/bold */ color: #000; font-weight: bold; }
507-
#src .k { /* block display */ color: #000; font-family: monospace; }
508-
#src a.d { /* symbol definition */ color: #909; font-weight: bold; }
503+
div[id^='src'] .n { /* numbers/label */ color: #a52a2a; }
504+
div[id^='src'] .s { /* strings */ color: green; }
505+
div[id^='src'] .c { /* comment */ color: #666; }
506+
div[id^='src'] .b { /* heading/title/bold */ color: #000; font-weight: bold; }
507+
div[id^='src'] .k { /* block display */ color: #000; font-family: monospace; }
508+
div[id^='src'] a.d { /* symbol definition */ color: #909; font-weight: bold; }
509509

510510
a.xm { /* macro */ color: #c66; font-weight: bold; }
511511
a.xa { /* argument */ color: #60c; font-weight: bold; }
@@ -609,7 +609,7 @@ a.xsr { /* subroutine */ color: #00f; font-weight: bold; }
609609
}
610610

611611
#results .con .all {
612-
margin-left: 6ex; /* width(#src .l) + 1ex */
612+
margin-left: 6ex; /* width(div[id^='src'] .l) + 1ex */
613613
}
614614

615615
#results .s, #more .s { /* matched line contents */

web/offwhite/style.css

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -486,28 +486,34 @@ table#dirlist { /* the "Name" column */
486486
background-position: -69px 0;
487487
}
488488

489-
#dirlist td:nth-child(n+2) { /* all but the first column */
489+
#dirlist td:nth-child(n+3) { /* all but the first 2 columns */
490490
padding-right: 1em;
491491
}
492492

493-
#dirlist tbody td:nth-child(4) {
493+
#dirlist tbody td:nth-child(5) {
494494
text-align: right; /* CSS3 may allow " " (single space char) */
495495
}
496496

497+
#dirlist td.q { /* 2nd column: H A D */
498+
white-space: nowrap;
499+
font-size: small;
500+
padding-left: 16px;
501+
width: 3em;
502+
}
497503

498504
/* file display */
499-
#src {
505+
div[id^='src'] {
500506
}
501507

502-
#src pre {
508+
div[id^='src'] pre {
503509
margin: 0;
504510
}
505511

506-
#src .l-hide, #src .hl-hide, .blame-hidden { /* hidden line number/annotation block */
512+
div[id^='src'] .l-hide, div[id^='src'] .hl-hide, .blame-hidden { /* hidden line number/annotation block */
507513
display: none
508514
}
509515

510-
#src .l, #src .hl, .blame .r, .blame .a,
516+
div[id^='src'] .l, div[id^='src'] .hl, .blame .r, .blame .a,
511517
#results .l, #more .l,
512518
#difftable i, del.d { /* line number/annotation block */
513519
display: inline-block;
@@ -520,12 +526,12 @@ table#dirlist { /* the "Name" column */
520526
color: #888;
521527
}
522528

523-
#src .hl { /* highlighted line number */
529+
div[id^='src'] .hl { /* highlighted line number */
524530
color: #000;
525531
}
526532

527533
/* highlight line number with anchor */
528-
#src a.l:target, #src a.hl:target {
534+
div[id^='src'] a.l:target, div[id^='src'] a.hl:target {
529535
background: orange;
530536
color:yellow;
531537
}
@@ -539,12 +545,12 @@ table#dirlist { /* the "Name" column */
539545
}
540546

541547
/* source code highlighting - see org/opengrok/analysis/$lang/*Xref.lex */
542-
#src .n { /* numbers/label */ color: #a52a2a; }
543-
#src .s { /* strings */ color: green; }
544-
#src .c { /* comment */ color: #666; }
545-
#src .b { /* heading/title/bold */ color: #000; font-weight: bold; }
546-
#src .k { /* block display */ color: #000; font-family: monospace; }
547-
#src a.d { /* symbol definition */ color: #909; font-weight: bold; }
548+
div[id^='src'] .n { /* numbers/label */ color: #a52a2a; }
549+
div[id^='src'] .s { /* strings */ color: green; }
550+
div[id^='src'] .c { /* comment */ color: #666; }
551+
div[id^='src'] .b { /* heading/title/bold */ color: #000; font-weight: bold; }
552+
div[id^='src'] .k { /* block display */ color: #000; font-family: monospace; }
553+
div[id^='src'] a.d { /* symbol definition */ color: #909; font-weight: bold; }
548554

549555
a.xm { /* macro */ color: #c66; font-weight: bold; }
550556
a.xa { /* argument */ color: #60c; font-weight: bold; }

web/polished/style.css

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -542,29 +542,35 @@ table#dirlist { /* the "Name" column */
542542
background-position: -69px 0;
543543
}
544544

545-
#dirlist td:nth-child(n+2) { /* all but the first column */
545+
#dirlist td:nth-child(n+3) { /* all but the first 2 columns */
546546
padding-right: 1em;
547547
}
548548

549-
#dirlist tbody td:nth-child(4) {
549+
#dirlist tbody td:nth-child(5) {
550550
text-align: right; /* CSS3 may allow " " (single space char) */
551551
}
552552

553+
#dirlist td.q { /* 2nd column: H A D */
554+
white-space: nowrap;
555+
font-size: small;
556+
padding-left: 16px;
557+
width: 3em;
558+
}
553559

554560
/* file display */
555-
#src {
561+
div[id^='src'] {
556562
background: white;
557563
}
558564

559-
#src pre {
565+
div[id^='src'] pre {
560566
margin: 0;
561567
}
562568

563-
#src .l-hide, #src .hl-hide, .blame-hidden { /* hidden line number/annotation block */
569+
div[id^='src'] .l-hide, div[id^='src'] .hl-hide, .blame-hidden { /* hidden line number/annotation block */
564570
display: none
565571
}
566572

567-
#src .l, #src .hl, .blame .r, .blame .a,
573+
div[id^='src'] .l, div[id^='src'] .hl, .blame .r, .blame .a,
568574
#results .l, #more .l,
569575
#difftable i, del.d { /* line number/annotation block */
570576
display: inline-block;
@@ -577,12 +583,12 @@ table#dirlist { /* the "Name" column */
577583
color: #888;
578584
}
579585

580-
#src .hl { /* highlighted line number */
586+
div[id^='src'] .hl { /* highlighted line number */
581587
color: #000;
582588
}
583589

584590
/* highlight line number with anchor */
585-
#src a.l:target, #src a.hl:target {
591+
div[id^='src'] a.l:target, div[id^='src'] a.hl:target {
586592
background: orange;
587593
color:yellow;
588594
}
@@ -596,12 +602,12 @@ table#dirlist { /* the "Name" column */
596602
}
597603

598604
/* source code highlighting - see org/opengrok/analysis/$lang/*Xref.lex */
599-
#src .n { /* numbers/label */ color: #a52a2a; }
600-
#src .s { /* strings */ color: green; }
601-
#src .c { /* comment */ color: #666; }
602-
#src .b { /* heading/title/bold */ color: #000; font-weight: bold; }
603-
#src .k { /* block display */ color: #000; font-family: monospace; }
604-
#src a.d { /* symbol definition */ color: #909; font-weight: bold; }
605+
div[id^='src'] .n { /* numbers/label */ color: #a52a2a; }
606+
div[id^='src'] .s { /* strings */ color: green; }
607+
div[id^='src'] .c { /* comment */ color: #666; }
608+
div[id^='src'] .b { /* heading/title/bold */ color: #000; font-weight: bold; }
609+
div[id^='src'] .k { /* block display */ color: #000; font-family: monospace; }
610+
div[id^='src'] a.d { /* symbol definition */ color: #909; font-weight: bold; }
605611

606612
a.xm { /* macro */ color: #c66; font-weight: bold; }
607613
a.xa { /* argument */ color: #60c; font-weight: bold; }
@@ -704,7 +710,7 @@ a.xsr { /* subroutine */ color: #00f; font-weight: bold; }
704710
}
705711

706712
#results .con .all {
707-
margin-left: 6ex; /* width(#src .l) + 1ex */
713+
margin-left: 6ex; /* width(div[id^='src'] .l) + 1ex */
708714
}
709715

710716
#results .s, #more .s { /* matched line contents */

web/utils.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function resizeContent() {
5151
}
5252

5353
function domReadyMast() {
54-
var h = document.locHash;
54+
var h = document.hash;
5555
if (!window.location.hash) {
5656
if (h != null && h != "null") {
5757
window.location.hash=h

0 commit comments

Comments
 (0)