Fix line numbers display and alignment
ci/woodpecker/push/woodpecker Pipeline failed
Details
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:
parent
ebcb90ca18
commit
81dea94128
|
|
@ -34,15 +34,19 @@ textarea {
|
||||||
/* the line numbers */
|
/* the line numbers */
|
||||||
|
|
||||||
#linenos {
|
#linenos {
|
||||||
color: #7d7d7d;
|
color: #7d7d7d;
|
||||||
z-index: -1000;
|
z-index: 1;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 20px;
|
top: 20px;
|
||||||
left: 0px;
|
left: 0px;
|
||||||
width: 30px; /* 30 to get 20 away from box */
|
width: 40px;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
font-family: monospace;
|
font-family: monospace;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
line-height: 18.2px;
|
||||||
|
padding-right: 10px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
user-select: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* code box when locked */
|
/* code box when locked */
|
||||||
|
|
@ -55,12 +59,14 @@ textarea {
|
||||||
outline: none;
|
outline: none;
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
padding-right: 360px;
|
padding-right: 360px;
|
||||||
overflow: inherit;
|
overflow: inherit;
|
||||||
|
line-height: 18.2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#box code {
|
#box code {
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
background: transparent !important; /* don't hide hastebox */
|
background: transparent !important; /* don't hide hastebox */
|
||||||
|
line-height: 18.2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* key */
|
/* key */
|
||||||
|
|
|
||||||
|
|
@ -7,9 +7,11 @@ Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull <sourdrums@gmai
|
||||||
.hljs {
|
.hljs {
|
||||||
display: block;
|
display: block;
|
||||||
overflow-x: auto;
|
overflow-x: auto;
|
||||||
padding: 0.5em;
|
padding: 0;
|
||||||
background: #002b36;
|
background: #002b36;
|
||||||
color: #839496;
|
color: #839496;
|
||||||
|
line-height: 18.2px;
|
||||||
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hljs-comment,
|
.hljs-comment,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue