alecthomas / alecthomas/chroma

With LineNumbersInTable enabled, highlighted line numbers have wrong height

オープン
#722 コメント 4 件 リアクション 5 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
5k
フォーク
522
平均マージ
1日 14時間
マージ済み PR(30日)
11

説明

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)

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。