python / python/python-docs-theme
Improving readability of documentation tables
还没有人认领这个 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.
vs what it looks like currently.
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.
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
首先,使用 issue 中提到的 .py.method 和 .describe 选择器定位文档主题的 CSS 和标记。将当前的表格样式与提供的示例进行比较,然后验证交替背景和调整后的间距能够提高可读性,同时不会突出显示非预期元素。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- css
- 领域
- design, documentation
- Issue 类型
- 功能
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 55/100