python / python/python-docs-theme

Improving readability of documentation tables

Ouverte
#311 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
CSS
Étoiles
90
Forks
78
Merge moyen
2 j 19 h
PR mergées (30 j)
4

Description

Documentation

I was reading through the documentation and I thought of a way you could make it read better.
You could do the thing thats done with tables where you alternate the background color to make the elements easier to distinguish at a glance.

I made a quick example using inspect element to color every other method in the documentation.
Image

vs what it looks like currently.
Image

My quick test was done by adding

.py.method:nth-child(odd) {
  background-color: #2d2d2d;
}

And replacing the margin on the dl elements with padding so the background color would fill it.

I originally used dl:nth-child(odd) but .py.method:nth-child(odd) worked better, but it would probably be better to add a new class to the elements you want highlight instead, because dl:nth-child(odd) highlights too much and .py.method:nth-child(odd) doesnt highlight all of the elements you would probably want highlighted.

*:is(.py.method, .describe):nth-child(odd of *:is(.py.method, .describe)) {
   background-color: #2b2b2b;
}

Should work but adding a new class is probably easier to maintain and you could reuse it in more places.

Guide de contribution

Ouvrir le guide de contribution

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.

Piste de recherche

Commencez par localiser le CSS et le balisage du thème de documentation à l’aide des sélecteurs .py.method et .describe mentionnés dans l’issue. Comparez le style actuel du tableau avec les exemples fournis, puis vérifiez que les arrière-plans alternés et l’espacement ajusté améliorent la lisibilité sans mettre en évidence des éléments involontaires.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
css
Domaine
design, documentation
Type d'issue
Fonctionnalité
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
55/100

Recevez les nouvelles issues par e-mail

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