- Notifications
You must be signed in to change notification settings - Fork15
Closed
Description
I think the docs would be both easier to understand and nicer to look at by styling the matrices a bit more.
The matrices appear to be tables using the 'inline' class, this may be as simple as applying a CSS style. Below is the one I wrote for matrepr. AFAIK you just have to copy it to the CSS file in the statics directory then just select the class. This style was written for Jupyter so may or may not be a drop-in for Sphinx.
table.matreprmatrix {border-collapse: collapse;}/* remove thin black line under Jupyter table headers */table.matreprmatrix>thead {border:0px;}/* row indices */table.matreprmatrix>tbodytrth {font-size: smaller;vertical-align: middle;text-align: right;}/* col indices */table.matreprmatrix>theadtrth {font-size: smaller;vertical-align: middle;text-align: center;}/* cells */table.matreprmatrix>tbodytrtd {vertical-align: middle;text-align: center;position: relative;}/* left border */table.matreprmatrix>tbodytrtd:first-of-type {border-left: solid2px;}/* right border */table.matreprmatrix>tbodytrtd:last-of-type {border-right: solid2px;}/* prevents empty cells from collapsing, especially empty rows */table.matreprmatrix>tbodytrtd:empty::before {content:"\00a0\00a0\00a0";visibility: hidden;}table.matreprmatrix>tbodytrtd:empty::after {content:"\00a0\00a0\00a0";visibility: hidden;}/* matrix bracket ticks */table.matreprmatrix>tbody>tr:first-child>td:first-of-type::before {content:"";width:4px;position: absolute;top:0;bottom:0;visibility: visible;left:0;right: auto;border-top: solid2px;}table.matreprmatrix>tbody>tr:last-child>td:first-of-type::before {content:"";width:4px;position: absolute;top:0;bottom:0;visibility: visible;left:0;right: auto;border-bottom: solid2px;}table.matreprmatrix>tbody>tr:first-child>td:last-of-type::after {content:"";width:4px;position: absolute;top:0;bottom:0;visibility: visible;left: auto;right:0;border-top: solid2px;}table.matreprmatrix>tbody>tr:last-child>td:last-of-type::after {content:"";width:4px;position: absolute;top:0;bottom:0;visibility: visible;left: auto;right:0;border-bottom: solid2px;}
Metadata
Metadata
Assignees
Labels
No labels