| b69ab31 | | | 1 | /** |
| b69ab31 | | | 2 | * Copyright (c) Meta Platforms, Inc. and affiliates. |
| b69ab31 | | | 3 | * |
| b69ab31 | | | 4 | * This source code is licensed under the MIT license found in the |
| b69ab31 | | | 5 | * LICENSE file in the root directory of this source tree. |
| b69ab31 | | | 6 | */ |
| b69ab31 | | | 7 | |
| b69ab31 | | | 8 | .light-theme .rendered-markup { |
| b69ab31 | | | 9 | --pre-bg: #fdf5d4; |
| b69ab31 | | | 10 | --pre-border: 1px solid #f1c40f; |
| b69ab31 | | | 11 | --tt-bg: rgb(235, 233, 231); |
| b69ab31 | | | 12 | --th-bg: #ebecee; |
| b69ab31 | | | 13 | --td-bg: white; |
| b69ab31 | | | 14 | --table-border: #bdc7d8; |
| b69ab31 | | | 15 | --quote-fg: #8c98b8; |
| b69ab31 | | | 16 | } |
| b69ab31 | | | 17 | .dark-theme .rendered-markup { |
| b69ab31 | | | 18 | --pre-bg: #120b00; |
| b69ab31 | | | 19 | --pre-border: 1px solid #673b00; |
| b69ab31 | | | 20 | --tt-bg: #18191a; |
| b69ab31 | | | 21 | --th-bg: #18191a; |
| b69ab31 | | | 22 | --td-bg: black; |
| b69ab31 | | | 23 | --table-border: #323436; |
| b69ab31 | | | 24 | --quote-fg: #8c98b8; |
| b69ab31 | | | 25 | } |
| b69ab31 | | | 26 | |
| b69ab31 | | | 27 | .rendered-markup > p { |
| b69ab31 | | | 28 | margin: 0; |
| b69ab31 | | | 29 | } |
| b69ab31 | | | 30 | .rendered-markup > h1 { |
| b69ab31 | | | 31 | margin: 0; |
| b69ab31 | | | 32 | } |
| b69ab31 | | | 33 | |
| b69ab31 | | | 34 | .rendered-markup table { |
| b69ab31 | | | 35 | border: 1px solid var(--table-border); |
| b69ab31 | | | 36 | background: var(--table-border); |
| b69ab31 | | | 37 | border-collapse: separate; |
| b69ab31 | | | 38 | border-spacing: 1px; |
| b69ab31 | | | 39 | } |
| b69ab31 | | | 40 | |
| b69ab31 | | | 41 | .rendered-markup th { |
| b69ab31 | | | 42 | background: var(--th-bg); |
| b69ab31 | | | 43 | font-weight: bold; |
| b69ab31 | | | 44 | padding: 3px 6px; |
| b69ab31 | | | 45 | } |
| b69ab31 | | | 46 | |
| b69ab31 | | | 47 | .rendered-markup td { |
| b69ab31 | | | 48 | background: var(--td-bg); |
| b69ab31 | | | 49 | padding: 3px 6px; |
| b69ab31 | | | 50 | text-align: left; |
| b69ab31 | | | 51 | } |
| b69ab31 | | | 52 | |
| b69ab31 | | | 53 | .rendered-markup tt { |
| b69ab31 | | | 54 | background-color: var(--tt-bg); |
| b69ab31 | | | 55 | padding-inline: 4px; |
| b69ab31 | | | 56 | overflow-wrap: break-word; |
| b69ab31 | | | 57 | font-size: 110%; |
| b69ab31 | | | 58 | } |
| b69ab31 | | | 59 | |
| b69ab31 | | | 60 | .rendered-markup pre { |
| b69ab31 | | | 61 | background: var(--pre-bg); |
| b69ab31 | | | 62 | border: var(--pre-border); |
| b69ab31 | | | 63 | padding: var(--halfpad); |
| b69ab31 | | | 64 | font-size: 110%; |
| b69ab31 | | | 65 | white-space: pre-wrap; |
| b69ab31 | | | 66 | } |
| b69ab31 | | | 67 | |
| b69ab31 | | | 68 | .rendered-markup a { |
| b69ab31 | | | 69 | color: var(--link-foreground); |
| b69ab31 | | | 70 | text-decoration: none; |
| b69ab31 | | | 71 | } |
| b69ab31 | | | 72 | .rendered-markup a:hover { |
| b69ab31 | | | 73 | text-decoration: underline; |
| b69ab31 | | | 74 | } |
| b69ab31 | | | 75 | |
| b69ab31 | | | 76 | .rendered-markup blockquote { |
| b69ab31 | | | 77 | color: var(--quote-fg); |
| b69ab31 | | | 78 | border-left: 3px solid var(--quote-fg); |
| b69ab31 | | | 79 | padding-left: 10px; |
| b69ab31 | | | 80 | padding-block: 5px; |
| b69ab31 | | | 81 | font-style: italic; |
| b69ab31 | | | 82 | margin: 0; |
| b69ab31 | | | 83 | display: flex; |
| b69ab31 | | | 84 | } |
| b69ab31 | | | 85 | .rendered-markup blockquote > p { |
| b69ab31 | | | 86 | margin: 0; |
| b69ab31 | | | 87 | } |
| b69ab31 | | | 88 | |
| b69ab31 | | | 89 | .rendered-markup ul, |
| b69ab31 | | | 90 | .rendered-markup ol { |
| b69ab31 | | | 91 | padding-left: 30px; |
| b69ab31 | | | 92 | } |
| b69ab31 | | | 93 | |
| b69ab31 | | | 94 | .rendered-markup video, |
| b69ab31 | | | 95 | .rendered-markup img { |
| b69ab31 | | | 96 | max-width: 100%; |
| b69ab31 | | | 97 | } |
| b69ab31 | | | 98 | |
| b69ab31 | | | 99 | /* |
| b69ab31 | | | 100 | * GitHub Comment Suggested Changes come as a hardcoded <table> in the HTML, |
| b69ab31 | | | 101 | * which we need to aggressively re-style to look OK. |
| b69ab31 | | | 102 | * They intend for this to be used with tailwind classes, |
| b69ab31 | | | 103 | * but let's not bring in all of tailwind just for this. |
| b69ab31 | | | 104 | */ |
| b69ab31 | | | 105 | |
| b69ab31 | | | 106 | .rendered-markup .js-suggested-changes-blob.diff-view, |
| b69ab31 | | | 107 | .rendered-markup .js-suggested-changes-blob.diff-view div { |
| b69ab31 | | | 108 | white-space-collapse: collapse; |
| b69ab31 | | | 109 | } |
| b69ab31 | | | 110 | |
| b69ab31 | | | 111 | .rendered-markup .js-suggested-changes-blob.diff-view table { |
| b69ab31 | | | 112 | margin-block: 5px; |
| b69ab31 | | | 113 | border-radius: 2px; |
| b69ab31 | | | 114 | width: 100%; |
| b69ab31 | | | 115 | background-color: var(--background); |
| b69ab31 | | | 116 | border-width: 0; |
| b69ab31 | | | 117 | border-collapse: collapse; |
| b69ab31 | | | 118 | } |
| b69ab31 | | | 119 | |
| b69ab31 | | | 120 | .rendered-markup .js-suggested-changes-blob.diff-view td.blob-num::after { |
| b69ab31 | | | 121 | content: attr(data-line-number); |
| b69ab31 | | | 122 | } |
| b69ab31 | | | 123 | |
| b69ab31 | | | 124 | .rendered-markup .js-suggested-changes-blob.diff-view td { |
| b69ab31 | | | 125 | color: var(--diffEditor-foreground); |
| b69ab31 | | | 126 | font-family: var(--monospace-fontFamily); |
| b69ab31 | | | 127 | } |
| b69ab31 | | | 128 | |
| b69ab31 | | | 129 | .rendered-markup .js-suggested-changes-blob.diff-view td.blob-num-deletion { |
| b69ab31 | | | 130 | background-color: var(--diffEditor-removedLineHighlightBackground); |
| b69ab31 | | | 131 | width: 2em; |
| b69ab31 | | | 132 | } |
| b69ab31 | | | 133 | .rendered-markup .js-suggested-changes-blob.diff-view td.blob-code-deletion { |
| b69ab31 | | | 134 | background-color: var(--diffEditor-removedLineBackground); |
| b69ab31 | | | 135 | } |
| b69ab31 | | | 136 | .rendered-markup .js-suggested-changes-blob.diff-view td.blob-num-addition { |
| b69ab31 | | | 137 | background-color: var(--diffEditor-insertedLineHighlightBackground); |
| b69ab31 | | | 138 | width: 2em; |
| b69ab31 | | | 139 | } |
| b69ab31 | | | 140 | .rendered-markup .js-suggested-changes-blob.diff-view td.blob-code-addition { |
| b69ab31 | | | 141 | background-color: var(--diffEditor-insertedLineBackground); |
| b69ab31 | | | 142 | } |