|
134 | 134 | right: initial !important; |
135 | 135 | z-index: auto !important; |
136 | 136 | } |
| 137 | + |
| 138 | +/* Dark mode overrides for diff2html */ |
| 139 | +.dark .diff2html-wrapper { |
| 140 | + /* File header styling */ |
| 141 | + .d2h-file-header { |
| 142 | + background-color: oklch(0.2 0 0) !important; |
| 143 | + border-color: oklch(0.3 0 0) !important; |
| 144 | + color: oklch(0.9 0 0) !important; |
| 145 | + } |
| 146 | + |
| 147 | + /* File name styling */ |
| 148 | + .d2h-file-name { |
| 149 | + color: oklch(0.85 0 0) !important; |
| 150 | + } |
| 151 | + |
| 152 | + /* File stats */ |
| 153 | + .d2h-file-stats { |
| 154 | + color: oklch(0.7 0 0) !important; |
| 155 | + } |
| 156 | + |
| 157 | + /* Code line numbers */ |
| 158 | + .d2h-code-linenumber, |
| 159 | + .d2h-code-side-linenumber { |
| 160 | + background-color: oklch(0.18 0 0) !important; |
| 161 | + border-color: oklch(0.25 0 0) !important; |
| 162 | + color: oklch(0.65 0 0) !important; |
| 163 | + } |
| 164 | + |
| 165 | + /* Code lines */ |
| 166 | + .d2h-code-line { |
| 167 | + background-color: oklch(0.15 0 0) !important; |
| 168 | + color: oklch(0.9 0 0) !important; |
| 169 | + } |
| 170 | + |
| 171 | + /* Added lines (green) */ |
| 172 | + .d2h-ins { |
| 173 | + background-color: oklch(0.2 0.1 150) !important; |
| 174 | + border-color: oklch(0.4 0.15 150) !important; |
| 175 | + } |
| 176 | + |
| 177 | + .d2h-ins .d2h-code-line { |
| 178 | + background-color: oklch(0.18 0.08 150) !important; |
| 179 | + } |
| 180 | + |
| 181 | + .d2h-ins .d2h-code-linenumber, |
| 182 | + .d2h-ins .d2h-code-side-linenumber { |
| 183 | + background-color: oklch(0.16 0.06 150) !important; |
| 184 | + border-color: oklch(0.3 0.12 150) !important; |
| 185 | + } |
| 186 | + |
| 187 | + /* Deleted lines (red) */ |
| 188 | + .d2h-del { |
| 189 | + background-color: oklch(0.2 0.1 25) !important; |
| 190 | + border-color: oklch(0.4 0.15 25) !important; |
| 191 | + } |
| 192 | + |
| 193 | + .d2h-del .d2h-code-line { |
| 194 | + background-color: oklch(0.18 0.08 25) !important; |
| 195 | + } |
| 196 | + |
| 197 | + .d2h-del .d2h-code-linenumber, |
| 198 | + .d2h-del .d2h-code-side-linenumber { |
| 199 | + background-color: oklch(0.16 0.06 25) !important; |
| 200 | + border-color: oklch(0.3 0.12 25) !important; |
| 201 | + } |
| 202 | + |
| 203 | + /* Changed/context lines */ |
| 204 | + .d2h-cntx { |
| 205 | + background-color: oklch(0.15 0 0) !important; |
| 206 | + border-color: oklch(0.25 0 0) !important; |
| 207 | + } |
| 208 | + |
| 209 | + .d2h-cntx .d2h-code-line { |
| 210 | + background-color: oklch(0.15 0 0) !important; |
| 211 | + } |
| 212 | + |
| 213 | + .d2h-cntx .d2h-code-linenumber, |
| 214 | + .d2h-cntx .d2h-code-side-linenumber { |
| 215 | + background-color: oklch(0.18 0 0) !important; |
| 216 | + } |
| 217 | + |
| 218 | + /* Inline changes (word-level diffs) */ |
| 219 | + .d2h-ins .d2h-change { |
| 220 | + background-color: oklch(0.3 0.15 150) !important; |
| 221 | + color: oklch(0.95 0 0) !important; |
| 222 | + } |
| 223 | + |
| 224 | + .d2h-del .d2h-change { |
| 225 | + background-color: oklch(0.3 0.15 25) !important; |
| 226 | + color: oklch(0.95 0 0) !important; |
| 227 | + } |
| 228 | + |
| 229 | + /* Move detection */ |
| 230 | + .d2h-moved { |
| 231 | + background-color: oklch(0.2 0.1 270) !important; |
| 232 | + border-color: oklch(0.4 0.15 270) !important; |
| 233 | + } |
| 234 | + |
| 235 | + .d2h-moved .d2h-code-line { |
| 236 | + background-color: oklch(0.18 0.08 270) !important; |
| 237 | + } |
| 238 | + |
| 239 | + /* Info/metadata */ |
| 240 | + .d2h-info { |
| 241 | + background-color: oklch(0.22 0.05 240) !important; |
| 242 | + color: oklch(0.8 0 0) !important; |
| 243 | + border-color: oklch(0.3 0.08 240) !important; |
| 244 | + } |
| 245 | + |
| 246 | + /* Selection highlighting */ |
| 247 | + .d2h-code-line:hover { |
| 248 | + background-color: oklch(0.2 0 0) !important; |
| 249 | + } |
| 250 | + |
| 251 | + /* Side-by-side view specific styles */ |
| 252 | + .d2h-code-side-line { |
| 253 | + background-color: oklch(0.15 0 0) !important; |
| 254 | + } |
| 255 | + |
| 256 | + /* File wrapper borders */ |
| 257 | + .d2h-file-wrapper { |
| 258 | + border-color: oklch(0.25 0 0) !important; |
| 259 | + } |
| 260 | + |
| 261 | + /* Table borders and backgrounds */ |
| 262 | + table.d2h-diff-table { |
| 263 | + background-color: oklch(0.15 0 0) !important; |
| 264 | + border-color: oklch(0.25 0 0) !important; |
| 265 | + } |
| 266 | + |
| 267 | + /* Ensure proper text contrast */ |
| 268 | + .d2h-code-line-prefix { |
| 269 | + color: oklch(0.7 0 0) !important; |
| 270 | + } |
| 271 | + |
| 272 | + /* Fix any remaining light backgrounds */ |
| 273 | + .d2h-diff-tbody tr { |
| 274 | + background-color: oklch(0.15 0 0) !important; |
| 275 | + } |
| 276 | + |
| 277 | + .d2h-diff-tbody tr td { |
| 278 | + border-color: oklch(0.25 0 0) !important; |
| 279 | + } |
| 280 | +} |
0 commit comments