FossilRepo
Fix code line number padding — use !important to override Tailwind td reset
Commit
bb81b10a2b26ff32b41d62fcfd63fc310e68c419b68012fce847402210ea8f18
Parent
f3d894cc90e2682…
1 file changed
+8
-9
+8
-9
| --- templates/fossil/code_file.html | ||
| +++ templates/fossil/code_file.html | ||
| @@ -4,22 +4,21 @@ | ||
| 4 | 4 | {% block extra_head %} |
| 5 | 5 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css"> |
| 6 | 6 | <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> |
| 7 | 7 | <style> |
| 8 | 8 | .code-table { border-collapse: collapse; width: 100%; } |
| 9 | - .code-table td { padding: 0; vertical-align: top; } | |
| 10 | - .line-num { | |
| 11 | - width: 1%; white-space: nowrap; padding: 0 16px; | |
| 9 | + .code-table td.line-num { | |
| 10 | + width: 1%; white-space: nowrap; padding: 0 16px !important; | |
| 12 | 11 | text-align: right; user-select: none; cursor: pointer; |
| 13 | 12 | color: #4b5563; font-size: 0.75rem; line-height: 1.5rem; |
| 14 | - border-right: 1px solid #374151; | |
| 13 | + border-right: 1px solid #374151; vertical-align: top; | |
| 15 | 14 | } |
| 16 | - .line-num:hover { color: #DC394C; } | |
| 17 | - .line-num a { color: inherit; text-decoration: none; display: block; } | |
| 18 | - .line-code { | |
| 19 | - white-space: pre; padding: 0 16px; | |
| 20 | - font-size: 0.8125rem; line-height: 1.5rem; | |
| 15 | + .code-table td.line-num:hover { color: #DC394C; } | |
| 16 | + .code-table td.line-num a { color: inherit; text-decoration: none; display: block; } | |
| 17 | + .code-table td.line-code { | |
| 18 | + white-space: pre; padding: 0 16px !important; | |
| 19 | + font-size: 0.8125rem; line-height: 1.5rem; vertical-align: top; | |
| 21 | 20 | } |
| 22 | 21 | .line-row:hover { background: rgba(220, 57, 76, 0.05); } |
| 23 | 22 | .line-row:target { background: rgba(220, 57, 76, 0.12); } |
| 24 | 23 | .line-row:target .line-num { color: #DC394C; font-weight: 600; } |
| 25 | 24 | .line-row { scroll-margin-top: 40vh; } |
| 26 | 25 |
| --- templates/fossil/code_file.html | |
| +++ templates/fossil/code_file.html | |
| @@ -4,22 +4,21 @@ | |
| 4 | {% block extra_head %} |
| 5 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css"> |
| 6 | <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> |
| 7 | <style> |
| 8 | .code-table { border-collapse: collapse; width: 100%; } |
| 9 | .code-table td { padding: 0; vertical-align: top; } |
| 10 | .line-num { |
| 11 | width: 1%; white-space: nowrap; padding: 0 16px; |
| 12 | text-align: right; user-select: none; cursor: pointer; |
| 13 | color: #4b5563; font-size: 0.75rem; line-height: 1.5rem; |
| 14 | border-right: 1px solid #374151; |
| 15 | } |
| 16 | .line-num:hover { color: #DC394C; } |
| 17 | .line-num a { color: inherit; text-decoration: none; display: block; } |
| 18 | .line-code { |
| 19 | white-space: pre; padding: 0 16px; |
| 20 | font-size: 0.8125rem; line-height: 1.5rem; |
| 21 | } |
| 22 | .line-row:hover { background: rgba(220, 57, 76, 0.05); } |
| 23 | .line-row:target { background: rgba(220, 57, 76, 0.12); } |
| 24 | .line-row:target .line-num { color: #DC394C; font-weight: 600; } |
| 25 | .line-row { scroll-margin-top: 40vh; } |
| 26 |
| --- templates/fossil/code_file.html | |
| +++ templates/fossil/code_file.html | |
| @@ -4,22 +4,21 @@ | |
| 4 | {% block extra_head %} |
| 5 | <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/styles/github-dark.min.css"> |
| 6 | <script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.9.0/highlight.min.js"></script> |
| 7 | <style> |
| 8 | .code-table { border-collapse: collapse; width: 100%; } |
| 9 | .code-table td.line-num { |
| 10 | width: 1%; white-space: nowrap; padding: 0 16px !important; |
| 11 | text-align: right; user-select: none; cursor: pointer; |
| 12 | color: #4b5563; font-size: 0.75rem; line-height: 1.5rem; |
| 13 | border-right: 1px solid #374151; vertical-align: top; |
| 14 | } |
| 15 | .code-table td.line-num:hover { color: #DC394C; } |
| 16 | .code-table td.line-num a { color: inherit; text-decoration: none; display: block; } |
| 17 | .code-table td.line-code { |
| 18 | white-space: pre; padding: 0 16px !important; |
| 19 | font-size: 0.8125rem; line-height: 1.5rem; vertical-align: top; |
| 20 | } |
| 21 | .line-row:hover { background: rgba(220, 57, 76, 0.05); } |
| 22 | .line-row:target { background: rgba(220, 57, 76, 0.12); } |
| 23 | .line-row:target .line-num { color: #DC394C; font-weight: 600; } |
| 24 | .line-row { scroll-margin-top: 40vh; } |
| 25 |