问题
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