git / git/git.github.io

Ensure code-blocks take-up fixed width that's lesser than the content width

オープン
#472 コメント 9 件 リアクション 2 件 担当者 1 名 GitHub で見る

@DhanashreePetare がすでに取り組んでいます。

2025年12月27日 から。

bug
主要言語
CSS
スター
373
フォーク
325
平均マージ
4日 18時間
マージ済み PR(30日)
1

説明

From the discussion in #463:

@mjaix says:

I tried to understand why https://git.github.io/rev_news/2020/08/27/edition-66/, https://git.github.io/rev_news/2020/10/30/edition-68/,
and the actual Rev News have a formatting which results in a very slim
left menu colomn. Failed :-( ... hints are appreciated.

@jnareb says:

If I understand it correctly, 66 and 68 edition has a very slim left menu column because the contents column is exceedingly wide due to overly long line in the code block. The menu column starts in the same place, it is just that it has less place because content column crowds it.

GitRevNews-wide
GitRevNews-narrow

I wonder if it would be possible in CSS to make the left margin slimmer instead of the menu column when contents column gets wide.

@sivaraam says:

Another way to fix this would be to ensure code blocks always take up a fixed width rather than taking up as much width as it wants. I'm thinking of something similar to how code blocks in GitHub issue comments wrap withing the comment box. If that could be achieved, we wouldn't have to worry about how long the code block is.

The "adjusting left-margin" suggestion mentioned by @jnareb has been handled in #471. We still need to look into ensuring the code blocks only fixed width that's lesser than the content width. Particularly, this would ensure the rev-news edition renders well (as a single-page) on mobile screens with smaller width.

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

評価

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

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

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