This answer is aside of the question. I was solving the problem of defining different table styles inside one Markdown document. I'm using Python-Markdown.
The default table stile:
Item No | Name | Description | Price
--------|------|-------------|------
1 | Chair | Kitchen chair | 101.50
2 | Table | Kitchen table | 450.00
The "plated" table style:
<div class="tablePlated"></div>
|Item No | Name | Description | Price|
|--------|------|-------------|------|
|1 | Chair | Kitchen chair | 101.50|
|2 | Table | Kitchen table | 450.00|
And the "gridded" table style:
<div class="tableGridded"></div>
Item No | Name | Description | Price
--------|------|-------------|------
1 | Chair | Kitchen chair | 101.50
2 | Table | Kitchen table | 450.00
Here are the CSS rules:
table {
font-size: 16px;
}
td, th {
padding: 7px 14px;
}
div.tablePlated+table {
border-spacing: 1px;
border-collapse: separate;
}
div.tablePlated+table td, div.tablePlated+table th {
background-color: lightblue;
}
div.tableGridded+table {
border-spacing: 0;
border-collapse: collapse;
}
div.tableGridded+table td, div.tableGridded+table th {
border: solid 1px dodgerblue;
}
And here is the result:
