Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat add support for inline block borders #181

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
376 changes: 220 additions & 156 deletions examples/Demo/Resources/AdvancedTable.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,35 @@
</head>
<body>
<table align="center" border="1">
<tbody>
<tr>
<td align="center" style="background-color: rgb(135,206,235);" colspan="2"><strong><span style="font-size: 13px; font-family: tahoma;">Change Type</span></strong></td>
<td align="center" style="background-color: rgb(135,206,235);"><strong><span style="font-size: 13px; font-family: tahoma;">Change Risk</span></strong></td>
<td align="center" style="background-color: rgb(135,206,235);"><strong><span style="font-size: 13px; font-family: tahoma;">Approval Body</span></strong></td>
</tr>
<tr>
<td rowspan="4"><strong><span style="font-size: 13px; font-family: tahoma;">Emergency</span></strong></td>
<td rowspan="4"><strong><span style="font-size: 13px; font-family: tahoma;">Normal</span></strong></td>
<td align="center" style="background-color: rgb(255,0,0);"><strong><span style="font-size: 13px; font-family: tahoma;">Level 1</span></strong></td>
<td align="center"><span style="font-size: 13px; font-family: tahoma;">MS COO</span></td>
</tr>
<tr>
<td align="center" style="background-color: rgb(255,165,0);"><strong><span style="font-size: 13px; font-family: tahoma;">Level 2</span></strong></td>
<td align="center"><span style="font-size: 13px; font-family: tahoma;">CAB or E-CAB</span></td>
</tr>
<tr>
<td align="center" style="background-color: rgb(255,215,0);"><strong><span style="font-size: 13px; font-family: tahoma;">Level 3</span></strong></td>
<td align="center"><span style="font-size: 13px; font-family: tahoma;">CAB or E-CAB</span></td>
</tr>
<tr>
<td align="center" style="background-color: rgb(255,255,0);" rowspan="2"><strong><span style="font-size: 13px; font-family: tahoma;">Level 4</span></strong></td>
<td align="center"><span style="font-size: 13px; font-family: tahoma;">Originator's Manager</span></td>
</tr>
<tr>
<td align="center" colspan="2"><strong><span style="font-size: 13px; font-family: tahoma;">Standard</span></strong></td>
<td align="center"><span style="font-size: 13px; font-family: tahoma;">Originator's Manager</span></td>
</tr>
</tbody>
<tbody>
<tr>
<td align="center" style="background-color: rgb(135,206,235);" colspan="2"><strong><span style="font-size: 13px; font-family: tahoma;">Change Type</span></strong></td>
<td align="center" style="background-color: rgb(135,206,235);"><strong><span style="font-size: 13px; font-family: tahoma;">Change Risk</span></strong></td>
<td align="center" style="background-color: rgb(135,206,235);"><strong><span style="font-size: 13px; font-family: tahoma;">Approval Body</span></strong></td>
</tr>
<tr>
<td rowspan="4"><strong><span style="font-size: 13px; font-family: tahoma;">Emergency</span></strong></td>
<td rowspan="4"><strong><span style="font-size: 13px; font-family: tahoma;">Normal</span></strong></td>
<td align="center" style="background-color: rgb(255,0,0);"><strong><span style="font-size: 13px; font-family: tahoma;">Level 1</span></strong></td>
<td align="center"><span style="font-size: 13px; font-family: tahoma;">MS COO</span></td>
</tr>
<tr>
<td align="center" style="background-color: rgb(255,165,0);"><strong><span style="font-size: 13px; font-family: tahoma;">Level 2</span></strong></td>
<td align="center"><span style="font-size: 13px; font-family: tahoma;">CAB or E-CAB</span></td>
</tr>
<tr>
<td align="center" style="background-color: rgb(255,215,0);"><strong><span style="font-size: 13px; font-family: tahoma;">Level 3</span></strong></td>
<td align="center"><span style="font-size: 13px; font-family: tahoma;">CAB or E-CAB</span></td>
</tr>
<tr>
<td align="center" style="background-color: rgb(255,255,0);" rowspan="2"><strong><span style="font-size: 13px; font-family: tahoma;">Level 4</span></strong></td>
<td align="center"><span style="font-size: 13px; font-family: tahoma;">Originator's Manager</span></td>
</tr>
<tr>
<td align="center" colspan="2"><strong><span style="font-size: 13px; font-family: tahoma;">Standard</span></strong></td>
<td align="center"><span style="font-size: 13px; font-family: tahoma;">Originator's Manager</span></td>
</tr>
</tbody>
</table>

<table border="1">
Expand Down Expand Up @@ -62,7 +62,7 @@
</tbody>
</table>
<!-- style="margin: 40px;" -->
<table cellspacing="0" cellpadding="10" border="1" >
<table cellspacing="0" cellpadding="10" border="1">
<tbody>
<tr>
<td>Hello</td>
Expand All @@ -82,132 +82,196 @@
</tr>
</tbody>
</table>


<table style="width: 90%;" cellspacing="0" cellpadding="2" align="center" border=0>
<tbody>
<tr align="center">
<td><span style="background-color: #f0f;">Reviewed by: ________________________________</span></td>
<td><span style="background-color: #ffffff;">Acceptance: ________________________________</span></td>
</tr>
<tr align="center">
<td><span style="background-color: #ffffff;">(Producer name / date)</span></td>
<td style='color:red'><span style="background-color: #ffffff;">(Representative name / date)</span></td>
</tr>
</tbody>
</table>

<table style="border-width: 0px; border-style: solid; width: 90%;" border="5" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr align="center">
<td><span style="background-color: #ffffff;">Reviewed by: ________________________________</span></td>
<td><span style="background-color: #ffffff;">Acceptance: ________________________________</span></td>
</tr>
<tr align="center">
<td><span style="background-color: #ffffff;">(Producer name / date)</span></td>
<td><span style="background-color: #ffffff;">(Representative name / date)</span></td>
</tr>
</tbody>
</table>



<table width="60%" cellspacing="2" cellpadding="2" align="left" border="1">
<caption>Some caption about this table</caption>
<tr>
<td>Some content...</td>
</tr>
</table>

<table width="60%" cellspacing="2" cellpadding="2" align="left" border="1">
<caption>Some caption about this table</caption>
<tbody>
<tr>
<td>Some content... with caption and tbody</td>
</tr>
</tbody>
<thead>
<tr>
<td>Header and caption</td>
</tr>
</thead>
</table>

<table width="100%" cellspacing="2" border="1">
<tbody>
<tr>
<td><b>The containing table</b>
<table width="60%" cellspacing="2" cellpadding="2" align="left" border="1">
<tr>
<td>A nested table</td>
</tr>
</table>
</td>
</tr>
</tbody>
<thead>
<tr>
<td>Header</td>
</tr>
</thead>
</table>

<table width="50%" align="center" border="1">
<tr>
<td rowspan="2">Anime Studio</td>
<td>Pixar</td>
</tr>
<tr>
<td>Studio Ghibli</td>
</tr>
</table>

<table width="100%" border="1">
<tr style="font-weight: bold">
<td>Studio</td>
<td colspan="2">Animes</td>
</tr>
<tr>
<td>Pixar</td>
<td>The incredibles</td>
<td>Ratatouille</td>
</tr>
<tr>
<td>Studio Ghibli</td>
<td>Grave of the Fireflies</td>
<td>Spirited Away</td>
</tr>
</table>

<table width="50%" align="center" border="1">
<tr>
<td rowspan="2" style="writing-mode: tb-lr;">Anime Studio</td>
<td>Pixar</td>
</tr>
<tr>
<td>Studio Ghibli</td>
</tr>
</table>

<table style="width: 100%;">
<tbody>
<tr>
<th style="background-color: #d5d5d5;text-decoration: underline line-through">Component</th>
<th style="background-color: #d5d5d5;">Area m²</th>
<th style="background-color: #d5d5d5; text-align: right;">%</th>
</tr>
<tr>
<td style="width: 40%; text-align: left;"> </td>
<td style="width: 30%; text-align: right;"> </td>
<td style="width: 30%; text-align: right;"> </td>
</tr>
<tr>
<td style="width: 40%; text-align: left;">Total</td>
<td style="width: 30%; text-align: right;"> </td>
<td style="width: 30%; text-align: right;">100.0</td>
</tr>
</tbody>
</table>


<table style="width: 90%;" cellspacing="0" cellpadding="2" align="center" border=0>
<tbody>
<tr align="center">
<td><span style="background-color: #f0f;">Reviewed by: ________________________________</span></td>
<td><span style="background-color: #ffffff;">Acceptance: ________________________________</span></td>
</tr>
<tr align="center">
<td><span style="background-color: #ffffff;">(Producer name / date)</span></td>
<td style='color:red'><span style="background-color: #ffffff;">(Representative name / date)</span></td>
</tr>
</tbody>
</table>

<table style="border-width: 0px; border-style: solid; width: 90%;" border="5" cellspacing="0" cellpadding="0" align="center">
<tbody>
<tr align="center">
<td><span style="background-color: #ffffff;">Reviewed by: ________________________________</span></td>
<td><span style="background-color: #ffffff;">Acceptance: ________________________________</span></td>
</tr>
<tr align="center">
<td><span style="background-color: #ffffff;">(Producer name / date)</span></td>
<td><span style="background-color: #ffffff;">(Representative name / date)</span></td>
</tr>
</tbody>
</table>



<table width="60%" cellspacing="2" cellpadding="2" align="left" border="1">
<caption>Some caption about this table</caption>
<tr>
<td>Some content...</td>
</tr>
</table>

<table width="60%" cellspacing="2" cellpadding="2" align="left" border="1">
<caption>Some caption about this table</caption>
<tbody>
<tr>
<td>Some content... with caption and tbody</td>
</tr>
</tbody>
<thead>
<tr>
<td>Header and caption</td>
</tr>
</thead>
</table>

<table width="100%" cellspacing="2" border="1">
<tbody>
<tr>
<td>
<b>The containing table</b>
<table width="60%" cellspacing="2" cellpadding="2" align="left" border="1">
<tr>
<td>A nested table</td>
</tr>
</table>
</td>
</tr>
</tbody>
<thead>
<tr>
<td>Header</td>
</tr>
</thead>
</table>

<table width="50%" align="center" border="1">
<tr>
<td rowspan="2">Anime Studio</td>
<td>Pixar</td>
</tr>
<tr>
<td>Studio Ghibli</td>
</tr>
</table>

<table width="100%" border="1">
<tr style="font-weight: bold">
<td>Studio</td>
<td colspan="2">Animes</td>
</tr>
<tr>
<td>Pixar</td>
<td>The incredibles</td>
<td>Ratatouille</td>
</tr>
<tr>
<td>Studio Ghibli</td>
<td>Grave of the Fireflies</td>
<td>Spirited Away</td>
</tr>
</table>

<table width="50%" align="center" border="1">
<tr>
<td rowspan="2" style="writing-mode: tb-lr;">Anime Studio</td>
<td>Pixar</td>
</tr>
<tr>
<td>Studio Ghibli</td>
</tr>
</table>

<table style="width: 100%;">
<tbody>
<tr>
<th style="background-color: #d5d5d5;text-decoration: underline line-through">Component</th>
<th style="background-color: #d5d5d5;">Area m²</th>
<th style="background-color: #d5d5d5; text-align: right;">%</th>
</tr>
<tr>
<td style="width: 40%; text-align: left;"> </td>
<td style="width: 30%; text-align: right;"> </td>
<td style="width: 30%; text-align: right;"> </td>
</tr>
<tr>
<td style="width: 40%; text-align: left;">Total</td>
<td style="width: 30%; text-align: right;"> </td>
<td style="width: 30%; text-align: right;">100.0</td>
</tr>
</tbody>
</table>


<table style="border:1px solid black;">
<tr>
<th style="border:1px solid red;">Header 1</th>
<th style="border:1px solid green;">Header 2</th>
</tr>
<tr>
<td style="border:1px solid blue;">Cell 1</td>
<td style="border:1px solid purple;">Cell 2</td>
</tr>
</table>


<table style="border:1px solid black; border-inline:2px dashed blue; border-block:2px dotted red;">
<tr>
<td>Cell A</td>
<td>Cell B</td>
</tr>
<tr>
<td>Cell C</td>
<td>Cell D</td>
</tr>
</table>



<table style="border:1px solid black;">
<tr>
<td>
Outer Cell 1
<table style="border:1px solid gray;">
<tr>
<td>Inner Cell 1</td>
<td>Inner Cell 2</td>
</tr>
</table>
</td>
<td>Outer Cell 2</td>
</tr>
</table>


<table style="border:1px solid black;">
<tr>
<td rowspan="2" style="border:1px solid black;">Rowspan 2</td>
<td style="border:1px solid black;">Cell 1</td>
</tr>
<tr>
<td style="border:1px solid black;">Cell 2</td>
</tr>
<tr>
<td colspan="2" style="border:1px solid black;">Colspan 2</td>
</tr>
</table>


<table style="border:1px solid black; border-collapse:separate; border-spacing:10px;">
<tr>
<td style="padding:10px;">Cell with padding</td>
<td style="padding:10px;">Another cell</td>
</tr>
</table>

</body>
</html>
Loading