diff options
| author | Tolmachev Igor <me@igorek.dev> | 2026-04-21 02:39:10 +0300 |
|---|---|---|
| committer | Tolmachev Igor <me@igorek.dev> | 2026-04-21 02:39:10 +0300 |
| commit | 6cdb266ec747c455a9b32f0585973cc2be61c74b (patch) | |
| tree | 1e46126f7fbf268c605de1ad51bfbb4d8e0bb5c1 | |
| parent | 85e2387443c74062a4004e7aab27780fb691f323 (diff) | |
| download | cgit_material_docker-main.tar.gz cgit_material_docker-main.zip | |
Fix submit hover contrast and add missing cgit element stylesmain
- Fix input[type=submit]:hover contrast in light theme (white-on-pale-orange)
- Use on-error-container for error text pairing
- Shrink commit-subject decorations to 0.7rem
- Add :focus styles for inputs
- Add styles for age-* gradient, insertions/deletions, .oid
- Add logheader/logsubject/logmsg, reposection, sublevel-repo
- Add colored commitgraph channels (column1..6)
- Add ls-dir/ls-blob/ls-mod, ls-size/ls-mode
- Add pager, diffstat, notes, blame, ssdiff *_dark variants
- Add stats/vgraph/hgraph, cgit-panel, #downloads
| -rw-r--r-- | www/cgit.css | 465 |
1 files changed, 461 insertions, 4 deletions
diff --git a/www/cgit.css b/www/cgit.css index 1329a01..9f41e85 100644 --- a/www/cgit.css +++ b/www/cgit.css | |||
| @@ -116,6 +116,14 @@ textarea { | |||
| 116 | font-family: inherit; | 116 | font-family: inherit; |
| 117 | } | 117 | } |
| 118 | 118 | ||
| 119 | input:focus, | ||
| 120 | select:focus, | ||
| 121 | textarea:focus { | ||
| 122 | outline: 2px solid var(--color-primary); | ||
| 123 | outline-offset: 1px; | ||
| 124 | border-color: var(--color-primary); | ||
| 125 | } | ||
| 126 | |||
| 119 | input[type="submit"] { | 127 | input[type="submit"] { |
| 120 | background-color: var(--color-primary); | 128 | background-color: var(--color-primary); |
| 121 | color: var(--color-on-primary); | 129 | color: var(--color-on-primary); |
| @@ -126,7 +134,8 @@ input[type="submit"] { | |||
| 126 | } | 134 | } |
| 127 | 135 | ||
| 128 | input[type="submit"]:hover { | 136 | input[type="submit"]:hover { |
| 129 | background-color: var(--color-primary-fixed-dim); | 137 | background-color: var(--color-primary-container); |
| 138 | color: var(--color-on-primary-container); | ||
| 130 | } | 139 | } |
| 131 | 140 | ||
| 132 | /* 4. Tabs Navigation */ | 141 | /* 4. Tabs Navigation */ |
| @@ -296,7 +305,7 @@ div#cgit table.ssdiff td.lineno { | |||
| 296 | 305 | ||
| 297 | div#cgit table.ssdiff td:not(.lineno) { | 306 | div#cgit table.ssdiff td:not(.lineno) { |
| 298 | width: 48%; | 307 | width: 48%; |
| 299 | min-width: 50ch; | 308 | max-width: 50ch; |
| 300 | white-space: break-spaces; | 309 | white-space: break-spaces; |
| 301 | } | 310 | } |
| 302 | 311 | ||
| @@ -434,6 +443,15 @@ div#cgit a.deco { | |||
| 434 | color: var(--color-on-secondary-fixed); | 443 | color: var(--color-on-secondary-fixed); |
| 435 | } | 444 | } |
| 436 | 445 | ||
| 446 | div#cgit div.commit-subject a.branch-deco, | ||
| 447 | div#cgit div.commit-subject a.tag-deco, | ||
| 448 | div#cgit div.commit-subject a.tag-annotated-deco, | ||
| 449 | div#cgit div.commit-subject a.remote-deco, | ||
| 450 | div#cgit div.commit-subject a.deco { | ||
| 451 | font-size: 0.7rem; | ||
| 452 | vertical-align: middle; | ||
| 453 | } | ||
| 454 | |||
| 437 | /* 9. Commit Info Table */ | 455 | /* 9. Commit Info Table */ |
| 438 | div#cgit table.commit-info { | 456 | div#cgit table.commit-info { |
| 439 | background-color: var(--color-surface-container); | 457 | background-color: var(--color-surface-container); |
| @@ -487,14 +505,441 @@ div#cgit div.footer { | |||
| 487 | } | 505 | } |
| 488 | 506 | ||
| 489 | div#cgit div.error { | 507 | div#cgit div.error { |
| 490 | color: var(--color-error); | 508 | color: var(--color-on-error-container); |
| 491 | background: var(--color-error-container); | 509 | background: var(--color-error-container); |
| 492 | padding: 1rem; | 510 | padding: 1rem; |
| 493 | border-radius: 4px; | 511 | border-radius: 4px; |
| 494 | margin: 1rem 0; | 512 | margin: 1rem 0; |
| 495 | } | 513 | } |
| 496 | 514 | ||
| 497 | /* 11. Responsive Adjustments */ | 515 | /* 11. Log / tree / listing extras */ |
| 516 | div#cgit table.list tr.logheader { | ||
| 517 | background: var(--color-surface-container); | ||
| 518 | color: var(--color-on-surface-variant); | ||
| 519 | font-weight: 600; | ||
| 520 | } | ||
| 521 | |||
| 522 | div#cgit table.list td.logsubject { | ||
| 523 | font-weight: 600; | ||
| 524 | color: var(--color-on-surface); | ||
| 525 | white-space: normal; | ||
| 526 | } | ||
| 527 | |||
| 528 | div#cgit table.list td.logmsg { | ||
| 529 | font-family: monospace; | ||
| 530 | white-space: pre; | ||
| 531 | color: var(--color-on-surface-variant); | ||
| 532 | padding: 0.75rem 0.5rem; | ||
| 533 | } | ||
| 534 | |||
| 535 | div#cgit table.list td a.ls-dir, | ||
| 536 | div#cgit a.ls-dir { | ||
| 537 | font-family: monospace; | ||
| 538 | font-weight: 600; | ||
| 539 | color: var(--color-primary); | ||
| 540 | } | ||
| 541 | |||
| 542 | div#cgit table.list td a.ls-blob, | ||
| 543 | div#cgit a.ls-blob, | ||
| 544 | div#cgit .ls-mod { | ||
| 545 | font-family: monospace; | ||
| 546 | } | ||
| 547 | |||
| 548 | div#cgit td.ls-size, | ||
| 549 | div#cgit td.ls-mode { | ||
| 550 | font-family: monospace; | ||
| 551 | text-align: right; | ||
| 552 | color: var(--color-on-surface-variant); | ||
| 553 | } | ||
| 554 | |||
| 555 | div#cgit td.ls-size { | ||
| 556 | width: 10em; | ||
| 557 | } | ||
| 558 | |||
| 559 | div#cgit td.ls-mode { | ||
| 560 | width: 10em; | ||
| 561 | text-align: left; | ||
| 562 | } | ||
| 563 | |||
| 564 | div#cgit table.list td.reposection { | ||
| 565 | font-style: italic; | ||
| 566 | color: var(--color-on-surface-variant); | ||
| 567 | background: var(--color-surface-container-low); | ||
| 568 | font-weight: 500; | ||
| 569 | } | ||
| 570 | |||
| 571 | div#cgit table.list td.sublevel-repo { | ||
| 572 | padding-left: 1.5em; | ||
| 573 | } | ||
| 574 | |||
| 575 | /* Commit graph colored channels */ | ||
| 576 | div#cgit table.list td.commitgraph .column1 { | ||
| 577 | color: var(--color-primary); | ||
| 578 | } | ||
| 579 | div#cgit table.list td.commitgraph .column2 { | ||
| 580 | color: var(--color-tertiary); | ||
| 581 | } | ||
| 582 | div#cgit table.list td.commitgraph .column3 { | ||
| 583 | color: var(--color-secondary); | ||
| 584 | } | ||
| 585 | div#cgit table.list td.commitgraph .column4 { | ||
| 586 | color: var(--color-primary-fixed-dim); | ||
| 587 | } | ||
| 588 | div#cgit table.list td.commitgraph .column5 { | ||
| 589 | color: var(--color-tertiary-fixed-dim); | ||
| 590 | } | ||
| 591 | div#cgit table.list td.commitgraph .column6 { | ||
| 592 | color: var(--color-secondary-fixed-dim); | ||
| 593 | } | ||
| 594 | |||
| 595 | /* Object ids and inline stats */ | ||
| 596 | div#cgit .oid { | ||
| 597 | font-family: monospace; | ||
| 598 | font-size: 0.9em; | ||
| 599 | color: var(--color-on-surface-variant); | ||
| 600 | } | ||
| 601 | |||
| 602 | div#cgit span.insertions { | ||
| 603 | color: var(--color-tertiary); | ||
| 604 | font-weight: 600; | ||
| 605 | } | ||
| 606 | |||
| 607 | div#cgit span.deletions { | ||
| 608 | color: var(--color-error); | ||
| 609 | font-weight: 600; | ||
| 610 | } | ||
| 611 | |||
| 612 | /* Age gradient: fresh = strong accent, stale = muted */ | ||
| 613 | div#cgit span.age-mins { | ||
| 614 | color: var(--color-primary); | ||
| 615 | font-weight: 600; | ||
| 616 | } | ||
| 617 | div#cgit span.age-hours { | ||
| 618 | color: var(--color-primary); | ||
| 619 | } | ||
| 620 | div#cgit span.age-days { | ||
| 621 | color: var(--color-on-surface); | ||
| 622 | } | ||
| 623 | div#cgit span.age-weeks { | ||
| 624 | color: var(--color-on-surface-variant); | ||
| 625 | } | ||
| 626 | div#cgit span.age-months { | ||
| 627 | color: var(--color-outline); | ||
| 628 | } | ||
| 629 | div#cgit span.age-years { | ||
| 630 | color: var(--color-outline); | ||
| 631 | opacity: 0.75; | ||
| 632 | } | ||
| 633 | |||
| 634 | /* Pager */ | ||
| 635 | div#cgit ul.pager { | ||
| 636 | list-style: none; | ||
| 637 | text-align: center; | ||
| 638 | padding: 0; | ||
| 639 | margin: 1.5rem 0 0 0; | ||
| 640 | } | ||
| 641 | |||
| 642 | div#cgit ul.pager li { | ||
| 643 | display: inline-block; | ||
| 644 | margin: 0 0.25rem; | ||
| 645 | } | ||
| 646 | |||
| 647 | div#cgit ul.pager a { | ||
| 648 | display: inline-block; | ||
| 649 | padding: 0.25rem 0.6rem; | ||
| 650 | border-radius: 4px; | ||
| 651 | color: var(--color-on-surface-variant); | ||
| 652 | background: var(--color-surface-container-low); | ||
| 653 | } | ||
| 654 | |||
| 655 | div#cgit ul.pager a:hover { | ||
| 656 | background: var(--color-surface-container-high); | ||
| 657 | text-decoration: none; | ||
| 658 | } | ||
| 659 | |||
| 660 | div#cgit ul.pager .current { | ||
| 661 | display: inline-block; | ||
| 662 | padding: 0.25rem 0.6rem; | ||
| 663 | border-radius: 4px; | ||
| 664 | background: var(--color-primary-container); | ||
| 665 | color: var(--color-on-primary-container); | ||
| 666 | font-weight: 600; | ||
| 667 | } | ||
| 668 | |||
| 669 | /* Diffstat (commit page: changed files + bar) */ | ||
| 670 | div#cgit div.diffstat-header { | ||
| 671 | font-weight: 600; | ||
| 672 | color: var(--color-primary); | ||
| 673 | margin-top: 1.5rem; | ||
| 674 | padding-top: 0; | ||
| 675 | } | ||
| 676 | |||
| 677 | div#cgit table.diffstat { | ||
| 678 | border-collapse: collapse; | ||
| 679 | width: 100%; | ||
| 680 | background: var(--color-surface-container-lowest); | ||
| 681 | border: 1px solid var(--color-outline-variant); | ||
| 682 | border-radius: 4px; | ||
| 683 | margin-top: 0.5rem; | ||
| 684 | } | ||
| 685 | |||
| 686 | div#cgit table.diffstat td { | ||
| 687 | padding: 0.25rem 0.5rem; | ||
| 688 | border: none; | ||
| 689 | font-size: 0.9rem; | ||
| 690 | } | ||
| 691 | |||
| 692 | div#cgit table.diffstat td.mode { | ||
| 693 | white-space: nowrap; | ||
| 694 | font-family: monospace; | ||
| 695 | color: var(--color-on-surface-variant); | ||
| 696 | } | ||
| 697 | |||
| 698 | div#cgit table.diffstat td span.modechange { | ||
| 699 | padding-left: 1em; | ||
| 700 | color: var(--color-error); | ||
| 701 | } | ||
| 702 | |||
| 703 | div#cgit table.diffstat td.add a { | ||
| 704 | color: var(--color-tertiary); | ||
| 705 | } | ||
| 706 | div#cgit table.diffstat td.del a { | ||
| 707 | color: var(--color-error); | ||
| 708 | } | ||
| 709 | div#cgit table.diffstat td.upd a { | ||
| 710 | color: var(--color-primary); | ||
| 711 | } | ||
| 712 | |||
| 713 | div#cgit table.diffstat td.graph { | ||
| 714 | width: 500px; | ||
| 715 | vertical-align: middle; | ||
| 716 | } | ||
| 717 | |||
| 718 | div#cgit table.diffstat td.graph table { | ||
| 719 | border: none; | ||
| 720 | width: 100%; | ||
| 721 | } | ||
| 722 | |||
| 723 | div#cgit table.diffstat td.graph td { | ||
| 724 | padding: 0; | ||
| 725 | border: 0; | ||
| 726 | height: 8px; | ||
| 727 | } | ||
| 728 | |||
| 729 | div#cgit table.diffstat td.graph td.add { | ||
| 730 | background-color: var(--diff-add-bg); | ||
| 731 | } | ||
| 732 | div#cgit table.diffstat td.graph td.rem { | ||
| 733 | background-color: var(--diff-del-bg); | ||
| 734 | } | ||
| 735 | |||
| 736 | div#cgit div.diffstat-summary { | ||
| 737 | color: var(--color-on-surface-variant); | ||
| 738 | padding-top: 0.5rem; | ||
| 739 | font-size: 0.9rem; | ||
| 740 | } | ||
| 741 | |||
| 742 | /* Notes */ | ||
| 743 | div#cgit div.notes-header { | ||
| 744 | font-weight: 600; | ||
| 745 | color: var(--color-primary); | ||
| 746 | padding-top: 1.5rem; | ||
| 747 | } | ||
| 748 | |||
| 749 | div#cgit div.notes { | ||
| 750 | white-space: pre-wrap; | ||
| 751 | font-family: monospace; | ||
| 752 | border: 1px solid var(--color-outline-variant); | ||
| 753 | background-color: var(--color-surface-container-low); | ||
| 754 | color: var(--color-on-surface); | ||
| 755 | padding: 0.75rem 1rem; | ||
| 756 | border-radius: 4px; | ||
| 757 | margin-top: 0.5rem; | ||
| 758 | } | ||
| 759 | |||
| 760 | div#cgit div.notes-footer { | ||
| 761 | clear: left; | ||
| 762 | } | ||
| 763 | |||
| 764 | /* Blame */ | ||
| 765 | div#cgit table.blame td.hashes, | ||
| 766 | div#cgit table.blame td.lines, | ||
| 767 | div#cgit table.blame td.linenumbers { | ||
| 768 | padding: 0; | ||
| 769 | vertical-align: top; | ||
| 770 | } | ||
| 771 | |||
| 772 | div#cgit table.blame td.hashes { | ||
| 773 | background: var(--color-surface-container); | ||
| 774 | border-right: 1px solid var(--color-outline-variant); | ||
| 775 | } | ||
| 776 | |||
| 777 | div#cgit table.blame td.hashes div.alt, | ||
| 778 | div#cgit table.blame td.lines div.alt, | ||
| 779 | div#cgit table.blame td.linenumbers div.alt { | ||
| 780 | padding: 0 0.5em; | ||
| 781 | } | ||
| 782 | |||
| 783 | div#cgit table.blame div.alt:nth-child(even) { | ||
| 784 | background: var(--color-surface-container-low); | ||
| 785 | } | ||
| 786 | |||
| 787 | div#cgit table.blame div.alt:nth-child(odd) { | ||
| 788 | background: var(--color-surface-container-lowest); | ||
| 789 | } | ||
| 790 | |||
| 791 | div#cgit table.blame td.lines > div { | ||
| 792 | position: relative; | ||
| 793 | } | ||
| 794 | |||
| 795 | div#cgit table.blame td.lines > div > pre { | ||
| 796 | padding: 0 0 0 0.5em; | ||
| 797 | position: absolute; | ||
| 798 | top: 0; | ||
| 799 | margin: 0; | ||
| 800 | } | ||
| 801 | |||
| 802 | /* Side-by-side diff: intra-line dark-shaded variants */ | ||
| 803 | div#cgit table.ssdiff td.add_dark { | ||
| 804 | background-color: var(--diff-add-bg); | ||
| 805 | color: var(--diff-add-fg); | ||
| 806 | filter: brightness(0.92); | ||
| 807 | } | ||
| 808 | |||
| 809 | div#cgit table.ssdiff td.del_dark { | ||
| 810 | background-color: var(--diff-del-bg); | ||
| 811 | color: var(--diff-del-fg); | ||
| 812 | filter: brightness(0.92); | ||
| 813 | } | ||
| 814 | |||
| 815 | div#cgit table.ssdiff td.changed_dark { | ||
| 816 | background-color: var(--diff-changed-bg); | ||
| 817 | color: var(--diff-changed-fg); | ||
| 818 | filter: brightness(0.92); | ||
| 819 | } | ||
| 820 | |||
| 821 | div#cgit table.ssdiff span.add { | ||
| 822 | background: var(--diff-add-bg); | ||
| 823 | color: var(--diff-add-fg); | ||
| 824 | font-weight: 600; | ||
| 825 | } | ||
| 826 | |||
| 827 | div#cgit table.ssdiff span.del { | ||
| 828 | background: var(--diff-del-bg); | ||
| 829 | color: var(--diff-del-fg); | ||
| 830 | font-weight: 600; | ||
| 831 | } | ||
| 832 | |||
| 833 | div#cgit table.diff td div.head, | ||
| 834 | div#cgit table.ssdiff td.head div.head { | ||
| 835 | font-weight: 600; | ||
| 836 | margin-top: 1rem; | ||
| 837 | color: var(--color-primary); | ||
| 838 | } | ||
| 839 | |||
| 840 | /* Stats (vgraph / hgraph / stats table) */ | ||
| 841 | div#cgit table.stats, | ||
| 842 | div#cgit table.vgraph, | ||
| 843 | div#cgit table.hgraph { | ||
| 844 | border: 1px solid var(--color-outline-variant); | ||
| 845 | border-collapse: collapse; | ||
| 846 | margin-top: 1rem; | ||
| 847 | background: var(--color-surface-container-lowest); | ||
| 848 | } | ||
| 849 | |||
| 850 | div#cgit table.stats th, | ||
| 851 | div#cgit table.vgraph th, | ||
| 852 | div#cgit table.hgraph th { | ||
| 853 | background: var(--color-surface-container); | ||
| 854 | color: var(--color-primary); | ||
| 855 | font-weight: 600; | ||
| 856 | text-align: left; | ||
| 857 | padding: 0.5rem 0.75rem; | ||
| 858 | border: 1px solid var(--color-outline-variant); | ||
| 859 | } | ||
| 860 | |||
| 861 | div#cgit table.stats td { | ||
| 862 | text-align: right; | ||
| 863 | padding: 0.25rem 0.75rem; | ||
| 864 | border: 1px solid var(--color-outline-variant); | ||
| 865 | } | ||
| 866 | |||
| 867 | div#cgit table.stats td.total { | ||
| 868 | font-weight: 600; | ||
| 869 | text-align: left; | ||
| 870 | color: var(--color-on-surface); | ||
| 871 | } | ||
| 872 | |||
| 873 | div#cgit table.stats td.sum { | ||
| 874 | color: var(--color-primary); | ||
| 875 | font-weight: 600; | ||
| 876 | } | ||
| 877 | |||
| 878 | div#cgit table.stats td.left { | ||
| 879 | text-align: left; | ||
| 880 | } | ||
| 881 | |||
| 882 | div#cgit table.vgraph { | ||
| 883 | height: 200px; | ||
| 884 | } | ||
| 885 | |||
| 886 | div#cgit table.vgraph td { | ||
| 887 | vertical-align: bottom; | ||
| 888 | padding: 0 10px; | ||
| 889 | } | ||
| 890 | |||
| 891 | div#cgit table.vgraph div.bar, | ||
| 892 | div#cgit table.hgraph div.bar { | ||
| 893 | background-color: var(--color-primary-container); | ||
| 894 | } | ||
| 895 | |||
| 896 | div#cgit table.hgraph { | ||
| 897 | width: 100%; | ||
| 898 | } | ||
| 899 | |||
| 900 | div#cgit table.hgraph td { | ||
| 901 | vertical-align: middle; | ||
| 902 | padding: 2px; | ||
| 903 | } | ||
| 904 | |||
| 905 | div#cgit table.hgraph div.bar { | ||
| 906 | height: 1em; | ||
| 907 | } | ||
| 908 | |||
| 909 | /* Cgit-panel (side panel on some pages) */ | ||
| 910 | div#cgit div.cgit-panel table { | ||
| 911 | border-collapse: collapse; | ||
| 912 | border: 1px solid var(--color-outline-variant); | ||
| 913 | background-color: var(--color-surface-container-low); | ||
| 914 | } | ||
| 915 | |||
| 916 | div#cgit div.cgit-panel th { | ||
| 917 | text-align: center; | ||
| 918 | background: var(--color-surface-container); | ||
| 919 | color: var(--color-primary); | ||
| 920 | padding: 0.25rem 0.5rem; | ||
| 921 | } | ||
| 922 | |||
| 923 | div#cgit div.cgit-panel td { | ||
| 924 | padding: 0.25rem 0.5rem; | ||
| 925 | } | ||
| 926 | |||
| 927 | /* Summary page download table */ | ||
| 928 | div#cgit table#downloads { | ||
| 929 | float: right; | ||
| 930 | border-collapse: collapse; | ||
| 931 | border: 1px solid var(--color-outline-variant); | ||
| 932 | margin: 0 0 0.5rem 0.5rem; | ||
| 933 | } | ||
| 934 | |||
| 935 | div#cgit table#downloads th { | ||
| 936 | background-color: var(--color-surface-container); | ||
| 937 | color: var(--color-primary); | ||
| 938 | padding: 0.25rem 0.5rem; | ||
| 939 | text-align: left; | ||
| 940 | } | ||
| 941 | |||
| 942 | /* 12. Responsive Adjustments */ | ||
| 498 | @media only screen and (max-width: 768px) { | 943 | @media only screen and (max-width: 768px) { |
| 499 | div#cgit table#header td.logo img { | 944 | div#cgit table#header td.logo img { |
| 500 | max-height: 40px; | 945 | max-height: 40px; |
| @@ -536,4 +981,16 @@ div#cgit div.error { | |||
| 536 | white-space: normal; | 981 | white-space: normal; |
| 537 | min-width: 200px; | 982 | min-width: 200px; |
| 538 | } | 983 | } |
| 984 | |||
| 985 | div#cgit div.cgit-panel, | ||
| 986 | div#cgit table#downloads { | ||
| 987 | float: none; | ||
| 988 | width: 100%; | ||
| 989 | margin: 0.5rem 0; | ||
| 990 | } | ||
| 991 | |||
| 992 | div#cgit table.diffstat td.graph { | ||
| 993 | width: auto; | ||
| 994 | min-width: 120px; | ||
| 995 | } | ||
| 539 | } | 996 | } |
