alecthomas / alecthomas/chroma

With LineNumbersInTable enabled, highlighted line numbers have wrong height

Aperta
#722 4 commenti 5 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Go
Stelle
5k
Fork
522
Merge medio
1g 14h
PR unite (30g)
11

Descrizione

With `LineNumbersInTable` enabled, if the inherited CSS line height is greater than one, then the height of highlighted numbers is not equal to the height of the highlighted code.

![image](https://user-images.githubusercontent.com/335669/211472836-ecafff3c-8568-405c-8031-2e464b77f15f.png)

@willfaught suggested the following fix:

```css
.chroma .lntable .lnt,
.chroma .lntable .hl {
display: flex;
}
```

And while the body is open, perhaps we could make the second column take up the remaining width. You can see the difference above.

Using the [adjacent sibling combinator](https://developer.mozilla.org/en-US/docs/Web/CSS/Adjacent_sibling_combinator):

```css
.lntable .lntd + .lntd {
width: 100%;
}
```

With both of these changes:

![image](https://user-images.githubusercontent.com/335669/211476193-f15a0f28-5f06-4197-8f75-9992da2bd2b1.png)

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.