Skip to content

Commit

Permalink
feat(table): add style rule to make tables pop out
Browse files Browse the repository at this point in the history
fix #440
  • Loading branch information
talha131 committed Aug 10, 2019
1 parent 0b78d46 commit 6a8500b
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
18 changes: 18 additions & 0 deletions documentation/content/Components/table.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
authors: Talha Mansoor
Title: Tables
Tags: remarkable
Date: 2019-08-11 01:16
Slug: tables
Category: Components
---

Tables in Elegant theme have rounded borders and striped alternating rows.

| Season | Episodes | First aired |
| ------ | :------- | :----------------- |
| 1 | 13 | June 2, 2002 |
| 2 | 12 | June 1, 2003 |
| 3 | 12 | September 19, 2004 |
| 4 | 13 | September 10, 2006 |
| 5 | 10 | January 6, 2008 |
53 changes: 53 additions & 0 deletions static/css/elegant.css
Original file line number Diff line number Diff line change
Expand Up @@ -663,3 +663,56 @@ div.figure.align-left,
.gist table {
table-layout: initial;
}
/* Table */
table {
max-width: 100%;
background-color: transparent;
border-collapse: collapse;
border-spacing: 0;
border: 1px solid #bfbfbf;
border-collapse: separate;
*border-collapse: collapse;
border-left: 0;
-webkit-border-radius: 6px;
-moz-border-radius: 6px;
border-radius: 6px;
}

table th,
table td {
border-left: 1px solid #bfbfbf;
padding-left: 2px;
padding-right: 2px;
}

table thead:first-child tr:first-child th {
border-top: 0;
}

table thead:first-child tr:first-child > th:first-child {
-webkit-border-top-left-radius: 6px;
border-top-left-radius: 6px;
-moz-border-radius-topleft: 6px;
}

table thead:first-child tr:first-child > th:last-child {
-webkit-border-top-right-radius: 6px;
border-top-right-radius: 6px;
-moz-border-radius-topright: 6px;
}

table tbody:last-child tr:last-child > td:first-child {
-webkit-border-bottom-left-radius: 6px;
border-bottom-left-radius: 6px;
-moz-border-radius-bottomleft: 6px;
}

table tbody:last-child tr:last-child > td:last-child {
-webkit-border-bottom-right-radius: 6px;
border-bottom-right-radius: 6px;
-moz-border-radius-bottomright: 6px;
}

table tbody > tr:nth-child(odd) > td {
background-color: #ebebeb;
}

0 comments on commit 6a8500b

Please sign in to comment.