python / python/python-docs-theme

Improving readability of documentation tables

未關閉
#311 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

主要語言
CSS
星號
90
分支
78
平均合併
2 天 19 小時
30 天內合併 PR
4

描述

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.

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

研究方向

首先,使用 issue 中提到的 .py.method 和 .describe 選擇器定位文件主題的 CSS 和標記。將目前的表格樣式與提供的範例進行比較,然後驗證交替背景和調整後的間距能夠提升可讀性,同時不會突顯非預期的元素。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
css
領域
design, documentation
Issue 類型
功能
難度
3/5
預估耗時
1-2 天
活躍度
冷清
描述清晰度
基本清楚
新手友好度
55/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。