1/** 2 * This file provides styles for the diff view, which shows you 3 * differences between two versions of a page (?do=diff). 4 */ 5 6.dokuwiki div.table { 7 border-radius: 0.25rem; 8 background-color: var(--color-dark-7); 9 padding: 0.75rem; 10} 11 12.dokuwiki table.diff { 13 width: 100%; 14 border-width: 0; 15} 16.dokuwiki table.diff th, 17.dokuwiki table.diff td { 18 vertical-align: top; 19 padding: 0; 20 border-width: 0; 21 /* no style.ini colours because deleted and added lines have a fixed background colour */ 22 background-color: var(--color-dark-7); 23 color: var(--color-dark-1); 24} 25 26.dokuwiki table.diff.diff_inline tr:nth-child(n + 6) td:last-child { 27 background-color: var(--color-dark-6); 28} 29 30/* table header */ 31.dokuwiki table.diff th { 32 border-bottom: 1px solid @ini_border; 33 font-size: 110%; 34 font-weight: normal; 35 color: var(--color-dark-2); 36 padding: 0.25rem 0.3125rem; 37} 38.dokuwiki table.diff th a { 39 font-weight: bold; 40} 41.dokuwiki table.diff th span.user { 42 font-size: .75em; 43} 44.dokuwiki table.diff th span.sum { 45 font-size: .9em; 46 font-weight: bold; 47} 48.dokuwiki table.diff th.minor { 49 color: var(--color-dark-2); 50} 51.dokuwiki table.diff_sidebyside th { 52 width: 50%; 53} 54 55/* table body */ 56.dokuwiki table.diff .diff-lineheader { 57 width: .7em; 58 text-align: center; 59 padding: 0 0.25rem 0 0.5rem; 60} 61[dir=rtl] .dokuwiki table.diff .diff-lineheader { 62 text-align: left; 63} 64 65.dokuwiki table.diff .diff-lineheader, 66.dokuwiki table.diff td { 67 font-family: Consolas, "Andale Mono WT", "Andale Mono", "Bitstream Vera Sans Mono", "Nimbus Mono L", Monaco, "Courier New", monospace; 68 font-weight: bold; 69 vertical-align: middle; 70} 71.dokuwiki table.diff td.diff-blockheader { 72 font-weight: bold; 73 padding: 0.3125rem; 74 padding-bottom: 0.125rem; 75} 76 77.dokuwiki table.diff .diff-addedline, 78.dokuwiki table.diff .diff-deletedline, 79.dokuwiki table.diff td.diff-context { 80 padding: 0.5rem; 81} 82 83.dokuwiki table.diff.diff_inline .diff-addedline, 84.dokuwiki table.diff.diff_inline .diff-deletedline, 85.dokuwiki table.diff.diff_inline td.diff-context { 86 padding: 0.0625rem 0.5rem; 87} 88 89.dokuwiki table.diff .diff-addedline { 90 background-color: rgba(64,192,87,.15); 91 color: var(--color-green-3); 92 width: ~"calc(50% - .7em)"; 93} 94.dokuwiki table.diff .diff-deletedline { 95 background-color: rgba(250,82,82,.15); 96 color: var(--color-red-3); 97 width: ~"calc(50% - .7em)"; 98} 99.dokuwiki table.diff td.diff-context { 100 background-color: var(--color-dark-5); 101 color: var(--color-white); 102 width: ~"calc(50% - .7em)"; 103} 104.dokuwiki table.diff td.diff-addedline strong, 105.dokuwiki table.diff td.diff-deletedline strong { 106 background-color: transparent; 107 font-weight: bold; 108} 109 110.dokuwiki table.diff .diff-lineheader:has(+ td.diff-deletedline) { 111 color: var(--color-red-3); 112} 113 114.dokuwiki table.diff .diff-lineheader:has(+ td.diff-addedline) { 115 color: var(--color-green-3); 116} 117 118/* diff options */ 119 120.dokuwiki .diffoptions form { 121 float: left; 122} 123.dokuwiki .diffoptions p { 124 float: right; 125} 126 127/* diff nav */ 128 129.dokuwiki table.diff_sidebyside td.diffnav { 130 padding-bottom: 1rem; 131 margin: 0; 132} 133 134.dokuwiki table.diff_sidebyside td.diffnav:last-child { 135 text-align: right; 136 padding-right: 0; 137} 138 139.dokuwiki table.diff_sidebyside td.diffnav:last-child a:last-child { 140 margin-right: 0; 141} 142 143.dokuwiki .diffnav a { 144 display: inline-block; 145 vertical-align: middle; 146 height: 2.125em; 147 border-radius: 0.25rem; 148 border: 1px solid @ini_border; 149} 150.dokuwiki .diffnav a span { 151 display: none; 152} 153 154.dokuwiki .diffnav a, 155.dokuwiki table.diff_sidebyside td.diffnav form select, 156.dokuwiki table.diff.diff_inline td.diffnav form select { 157 margin-right: 0.25rem; 158} 159 160.dokuwiki table.diff.diff_inline tr:nth-child(3) td { 161 padding-top: 0.25rem; 162} 163 164 165.dokuwiki .diffnav a:hover, 166.dokuwiki .diffnav a:active, 167.dokuwiki .diffnav a:focus { 168 background-color: var(--color-dark-6); 169 text-decoration: none; 170 border-radius: 0.25rem; 171} 172 173.dokuwiki .diffnav a:before { 174 display: inline-block; 175 color: @ini_text; 176 height: 100%; 177 margin-top: 0.3125rem; 178} 179 180.dokuwiki .diffnav a.diffprevrev:before { 181 content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-left" width="16" height="14" viewBox="0 0 24 17" stroke-width="1.5" stroke="%23c9c9c9" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M15 6l-6 6l6 6" /></svg>');; 182} 183.dokuwiki .diffnav a.diffnextrev:before, 184.dokuwiki .diffnav a.difflastrev:before { 185 content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevron-right" width="16" height="14" viewBox="0 0 24 18" stroke-width="1.5" stroke="%23c9c9c9" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M9 6l6 6l-6 6" /></svg>'); 186} 187.dokuwiki .diffnav a.diffbothprevrev:before { 188 content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevrons-left" width="20" height="14" viewBox="0 0 24 18" stroke-width="1.5" stroke="%23c9c9c9" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M11 7l-5 5l5 5" /><path d="M17 7l-5 5l5 5" /></svg>'); 189} 190.dokuwiki .diffnav a.diffbothnextrev:before { 191 content: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-chevrons-right" width="20" height="14" viewBox="0 0 24 18" stroke-width="1.5" stroke="%23c9c9c9" fill="none" stroke-linecap="round" stroke-linejoin="round"><path stroke="none" d="M0 0h24v24H0z" fill="none"/><path d="M7 7l5 5l-5 5" /><path d="M13 7l5 5l-5 5" /></svg>'); 192} 193 194.dokuwiki .diffnav select { 195 width: 60%; 196 min-width: 9em; 197 height: 2.25em; /* height is necessary for longer options in Webkit */ 198} 199 200.dokuwiki .diffnav select option[selected] { 201 font-weight: bold; 202} 203