| 1 | /* Ported from DeepSeek Harness c291e7961a (MIT). */ |
| 2 | .dsh-DiffBlock-block { |
| 3 | --dsl-diff-radius: 12px; |
| 4 | --dsl-diff-line-height: 22px; |
| 5 | |
| 6 | position: relative; |
| 7 | margin: 16px 0; |
| 8 | color: var(--dsw-alias-label-primary); |
| 9 | background: var(--dsw-alias-markdown-code-block); |
| 10 | border-radius: var(--dsl-diff-radius); |
| 11 | } |
| 12 | |
| 13 | /* The copy control floats in the top-right corner over the body, so the card |
| 14 | has no empty banner row above its first diff line (the TUI diff card has no |
| 15 | banner either — only the footer). The block is position: relative, so this |
| 16 | anchors to the card. */ |
| 17 | .dsh-DiffBlock-copyButton { |
| 18 | position: absolute; |
| 19 | top: 8px; |
| 20 | right: 12px; |
| 21 | z-index: 1; |
| 22 | background-color: transparent; |
| 23 | border: none; |
| 24 | padding: 0; |
| 25 | margin: 0; |
| 26 | color: var(--dsw-alias-label-secondary); |
| 27 | cursor: pointer; |
| 28 | font: var(--dsw-font-xs-13); |
| 29 | } |
| 30 | |
| 31 | .dsh-DiffBlock-body { |
| 32 | padding: 12px 14px; |
| 33 | font: var(--dsw-font-markdown-code-block); |
| 34 | overflow-x: auto; |
| 35 | overflow-y: hidden; |
| 36 | } |
| 37 | |
| 38 | /* No wrapping, no word-break: a diff is read by its indentation. */ |
| 39 | .dsh-DiffBlock-line { |
| 40 | min-height: var(--dsl-diff-line-height); |
| 41 | white-space: pre; |
| 42 | } |
| 43 | |
| 44 | /* A file header: the path in the primary tone, set apart by weight. The copy |
| 45 | button floats over this first row's top-right corner, so reserve space at the |
| 46 | line's end for it — a long path scrolls under the button otherwise, and the |
| 47 | button's hit area would eat clicks on the path's tail. */ |
| 48 | .dsh-DiffBlock-path { |
| 49 | color: var(--dsw-alias-label-primary); |
| 50 | font-weight: 600; |
| 51 | padding-right: 56px; |
| 52 | } |
| 53 | |
| 54 | /* A same-file second hunk's separator (a scattered edit), in the dim tone. */ |
| 55 | .dsh-DiffBlock-gap { |
| 56 | color: var(--dsw-alias-label-tertiary); |
| 57 | } |
| 58 | |
| 59 | /* The diff's own meaning-carrying colors: removed on the error token, added on |
| 60 | the success token. A `- `/`+ ` prefix is drawn here so a copied line and the |
| 61 | shown line agree, and so the sign reads without relying on color alone. */ |
| 62 | .dsh-DiffBlock-del::before { |
| 63 | content: '- '; |
| 64 | color: var(--dsw-alias-state-error-primary); |
| 65 | } |
| 66 | |
| 67 | .dsh-DiffBlock-del { |
| 68 | color: var(--dsw-alias-state-error-primary); |
| 69 | } |
| 70 | |
| 71 | .dsh-DiffBlock-add::before { |
| 72 | content: '+ '; |
| 73 | color: var(--dsw-alias-state-success-primary); |
| 74 | } |
| 75 | |
| 76 | .dsh-DiffBlock-add { |
| 77 | color: var(--dsw-alias-state-success-primary); |
| 78 | } |
| 79 | |
| 80 | .dsh-DiffBlock-expand { |
| 81 | display: block; |
| 82 | width: 100%; |
| 83 | padding: 0; |
| 84 | border: none; |
| 85 | background-color: transparent; |
| 86 | color: var(--dsw-alias-label-tertiary); |
| 87 | cursor: pointer; |
| 88 | font: inherit; |
| 89 | text-align: left; |
| 90 | } |
| 91 | |
| 92 | .dsh-DiffBlock-expand:hover { |
| 93 | color: var(--dsw-alias-label-secondary); |
| 94 | } |
| 95 | |
| 96 | /* The change summary, dim under the body: `└ +A -R · N file(s)`, the same |
| 97 | footer the TUI transcript's diff card draws. */ |
| 98 | .dsh-DiffBlock-footer { |
| 99 | padding: 0 14px 12px; |
| 100 | font: var(--dsw-font-markdown-code-block); |
| 101 | color: var(--dsw-alias-label-tertiary); |
| 102 | } |
| 103 |