Fix line numbers display and alignment
ci/woodpecker/push/woodpecker Pipeline failed Details

- Set consistent line-height (18.2px) across linenos, code box, and hljs
- Fix linenos z-index to ensure visibility
- Remove padding from hljs to align with line numbers
- Add user-select: none to prevent selecting line numbers
This commit is contained in:
Colin 2026-01-23 09:38:06 -05:00
parent ebcb90ca18
commit 81dea94128
Signed by: colin
SSH Key Fingerprint: SHA256:nRPCQTeMFLdGytxRQmPVK9VXY3/ePKQ5lGRyJhT5DY8
2 changed files with 13 additions and 5 deletions

View File

@ -34,15 +34,19 @@ textarea {
/* the line numbers */
#linenos {
color: #7d7d7d;
z-index: -1000;
color: #7d7d7d;
z-index: 1;
position: absolute;
top: 20px;
left: 0px;
width: 30px; /* 30 to get 20 away from box */
width: 40px;
font-size: 13px;
font-family: monospace;
text-align: right;
line-height: 18.2px;
padding-right: 10px;
box-sizing: border-box;
user-select: none;
}
/* code box when locked */
@ -55,12 +59,14 @@ textarea {
outline: none;
font-size: 13px;
padding-right: 360px;
overflow: inherit;
overflow: inherit;
line-height: 18.2px;
}
#box code {
padding: 0px;
background: transparent !important; /* don't hide hastebox */
line-height: 18.2px;
}
/* key */

View File

@ -7,9 +7,11 @@ Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmai
.hljs {
display: block;
overflow-x: auto;
padding: 0.5em;
padding: 0;
background: #002b36;
color: #839496;
line-height: 18.2px;
font-size: 13px;
}
.hljs-comment,