git / git/git.github.io

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

Ouverte
#472 9 commentaires 2 réactions 1 personne assignée Voir sur GitHub

@DhanashreePetare y travaille déjà.

Depuis le 27/12/2025.

bug
Langage dominant
CSS
Étoiles
373
Forks
325
Merge moyen
4 j 18 h
PR mergées (30 j)
1

Description

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.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.