Skip to content

Commit

Permalink
Table Example: Styling and Additional Rows (pull #561)
Browse files Browse the repository at this point in the history
For issue #242, complete table.css and add two more rows to the example table.
  • Loading branch information
jongund authored and mcking65 committed Dec 7, 2017
1 parent 346556b commit 3be59e5
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
32 changes: 32 additions & 0 deletions examples/table/css/table.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,35 @@
font-style: italic;
color: #366ED4;
}

[role="table"] {
display: table;
}

[role="table"] > div[id] {
display: table-caption;
font-style: italic;
}

[role="table"] [role="row"] {
display: table-row;
}

[role="table"] [role="cell"],
[role="table"] [role="columnheader"] {
display: table-cell;
padding: 0.125em 0.25em;
width: 8em;
}

[role="table"] [role="columnheader"] {
font-weight: bold;
border-bottom: thin solid #888;
}

[role="table"] [role="rowgroup"]:last-child [role="row"]:nth-child(odd) {
background-color: #ddd;
}



12 changes: 12 additions & 0 deletions examples/table/table.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,18 @@ <h2 id="ex_label">Example</h2>
<span role="cell">Acme, Inc.</span>
<span role="cell">123 Broad St.</span>
</div>
<div role="row">
<span role="cell">Ralph</span>
<span role="cell">Jefferson</span>
<span role="cell">XYZ, Inc.</span>
<span role="cell">456 Main St.</span>
</div>
<div role="row">
<span role="cell">Nancy</span>
<span role="cell">Jensen</span>
<span role="cell">XYZ, Inc.</span>
<span role="cell">456 Main St.</span>
</div>
</div>
</div>
</div>
Expand Down

0 comments on commit 3be59e5

Please sign in to comment.