diff options
author | Jake Leahy <jake@leahy.dev> | 2024-09-09 17:42:45 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-09 09:42:45 +0200 |
commit | 6a5aa007010f90141199f3a4eb14ab85105ddac7 (patch) | |
tree | e03d6f08d7824a9752c2e8293cfffbf91e5ef6ac /doc | |
parent | 79a65da22a56eaeafce24b7c08c9d7db017173ac (diff) | |
download | Nim-6a5aa007010f90141199f3a4eb14ab85105ddac7.tar.gz |
Fix CSS for `number-lines` code blocks (#24081)
Adds a few fixes for when using code blocks with lines numbered - Use CSS variables for the colours so that it works in dark mode - Don't turn on normal table effects like hover and smaller font when its a line number table - With dochack.nim, don't add a clipboard copy button for the line numbers at the side [Example page showing the changes](https://66dcde6e4a655efb70771d9a--dazzling-kitten-6c3419.netlify.app/)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/nimdoc.css | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/doc/nimdoc.css b/doc/nimdoc.css index a9e4ac9c6..0c399e4c1 100644 --- a/doc/nimdoc.css +++ b/doc/nimdoc.css @@ -623,8 +623,8 @@ pre { table.line-nums-table { border-radius: 4px; - border: 1px solid #cccccc; - background-color: ghostwhite; + border: 1px solid var(--border); + background-color: var(--secondary-background); border-collapse: separate; margin-top: 15px; margin-bottom: 25px; } @@ -660,6 +660,9 @@ table { border-collapse: collapse; border-color: var(--third-background); border-spacing: 0; +} + +table:not(.line-nums-table) { font-size: 0.9em; } @@ -678,7 +681,7 @@ table th.docinfo-name { text-align: right; } -table tr:hover { +table:not(.line-nums-table) tr:hover { background-color: var(--third-background); } |