sphinx, restructuredtext: color cell/row of a table

妖精的绣舞 提交于 2019-12-07 20:50:35

问题


Is there a way to color a specific row in a table in sphinx?

I tryed using .. role:: which is related to a CSS file as discused in sphinx, restructuredtext: set color for a single word. However a :role: does not seem to work in a table.


回答1:


No, but there is using the CSS selector :nth-child and applying a class to the parent table element. Then your custom CSS would be something like:

table.myclass tr:nth-child(3) {color: red;}


来源:https://stackoverflow.com/questions/46193561/sphinx-restructuredtext-color-cell-row-of-a-table

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!