Skip to content

Commit

Permalink
add default table styles (jekyll#144)
Browse files Browse the repository at this point in the history
Merge pull request 144
  • Loading branch information
ashmaroli authored and jekyllbot committed Aug 15, 2017
1 parent cf28aab commit 3ac5898
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 0 deletions.
17 changes: 17 additions & 0 deletions _posts/2016-05-20-this-post-demonstrates-post-content-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,3 +86,20 @@ Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet b
Praesent nulla tortor, malesuada adipiscing adipiscing sollicitudin, adipiscing eget est.

Proin eget nibh a massa vestibulum pretium. Suspendisse eu nisl a ante aliquet bibendum quis a nunc.

### Tables

Title 1 | Title 2 | Title 3 | Title 4
--------------------- | --------------------- | --------------------- | ---------------------
lorem | lorem ipsum | lorem ipsum dolor | lorem ipsum dolor sit
lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit
lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit
lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit | lorem ipsum dolor sit


Title 1 | Title 2 | Title 3 | Title 4
--- | --- | --- | ---
lorem | lorem ipsum | lorem ipsum dolor | lorem ipsum dolor sit
lorem ipsum dolor sit amet | lorem ipsum dolor sit amet consectetur | lorem ipsum dolor sit amet | lorem ipsum dolor sit
lorem ipsum dolor | lorem ipsum | lorem | lorem ipsum
lorem ipsum dolor | lorem ipsum dolor sit | lorem ipsum dolor sit amet | lorem ipsum dolor sit amet consectetur
2 changes: 2 additions & 0 deletions _sass/minima.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ $grey-color: #828282 !default;
$grey-color-light: lighten($grey-color, 40%) !default;
$grey-color-dark: darken($grey-color, 25%) !default;

$table-text-align: left !default;

// Width of the content area
$content-width: 800px !default;

Expand Down
30 changes: 30 additions & 0 deletions _sass/minima/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -213,3 +213,33 @@ pre {
padding-top: 5px;
}
}



/**
* Tables
*/
table {
margin-bottom: $spacing-unit;
width: 100%;
text-align: $table-text-align;
color: lighten($text-color, 18%);
border-collapse: collapse;
border: 1px solid $grey-color-light;
tr {
&:nth-child(even) {
background-color: lighten($grey-color-light, 6%);
}
}
th, td {
padding: ($spacing-unit / 3) ($spacing-unit / 2);
}
th {
background-color: lighten($grey-color-light, 3%);
border: 1px solid darken($grey-color-light, 4%);
border-bottom-color: darken($grey-color-light, 12%);
}
td {
border: 1px solid $grey-color-light;
}
}

0 comments on commit 3ac5898

Please sign in to comment.