alecthomas / alecthomas/chroma

With LineNumbersInTable enabled, highlighted line numbers have wrong height

Abierto
#722 4 comentarios 5 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
5k
Forks
522
Merge medio
1 d 14 h
PR fusionados (30 d)
11

Descripción

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)

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.