Closed asyncmind0 closed 1 year ago
Welcome to this project and thank you!' first issue
What is the status of that issue?
@jagguli What is the status of this issue?
I have not yet tested without the workaround
I forced the color of the font to black, so the table will be readable even on a dark mode.
I appreciate that this creates discomfort to the minions of dark. As this is a debug function, I hope that this dose of radiation won't be lethal to them? 🙂
Otherwise, here is the code for the make_html()
function in context.py
:
def make_html(rows, header=[], tb_class='macros-tb'):
"Produce an HTML table"
font_color = "#000000" # black
back_color = "#F0FFFF" # light blue
grid_color = "#DCDCDC"
padding = "5px"
style = f"color:{font_color}; border:1px solid {grid_color}; padding: {padding}"
templ = Template("""
<table class="{{ tb_class }}" style="background-color: {{ back_color}}; {{ style }}">
{% for item in header %}
<th style="{{ style }}">{{ item }}</th>
{% endfor %}
{% for row in rows %}
<tr>
{% for item in row %}
<td style="vertical-align:top; {{ style }}">{{ item }}</td>
{% endfor %}
</tr>
{% endfor %}
</table>
""")
return templ.render(locals())
Any modification of the css that works nicely in both cases would be appreciated (to be tested at least with the default template and mkdocs-material).
@jagguli What is the status of that issue for you?
The minions of darkness are not pleased :)
workaround: