Skip to content

Commit

Permalink
Merge branch 'release/v0.7.16'
Browse files Browse the repository at this point in the history
  • Loading branch information
carl0zen committed Apr 30, 2015
2 parents ed81bbb + 752da7e commit 8b46b7b
Show file tree
Hide file tree
Showing 3 changed files with 107 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "paint",
"version": "0.7.15",
"version": "0.7.16",
"homepage": "https://github.com/alphasights/paint",
"authors": [
"Eugenio Depalo <[email protected]>",
Expand Down
105 changes: 105 additions & 0 deletions components/_table.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
$include-html-paint-table: true !default;

$table-row-background-color: $white !default;
$table-odd-background-color: darken($white, 3%) !default;
$table-highlighted-row-background-color: lighten($primary-color, 47%) !default;
$table-highlighted-row-color: $jet !default;
$table-column-padding: $column-gutter / 2 !default;

%table {
width: 100%;

thead {
tr {
background-color: darken($table-row-background-color, 5%);
}

th {
color: $small-font-color;
font-size: $small-font-size;
font-weight: $font-weight-bold;
padding: $table-column-padding;
text-align: left;
text-transform: uppercase;
}
}

tbody {
tr {
background-color: $table-row-background-color;
border-bottom: 1px solid $table-odd-background-color;

&:last-child {
border: 0;
}

td {
line-height: $base-line-height;
padding: $table-column-padding;
}
}
}
}

%table-stripped {
tr {
&:nth-of-type(2n) {
background-color: $table-odd-background-color;
}
}
}

%table-highlighted-row {
background-color: $table-highlighted-row-background-color;
color: $table-highlighted-row-color;

td {
border-bottom: 1px solid darken($table-highlighted-row-background-color, 7%);
border-top: 1px solid darken($table-highlighted-row-background-color, 7%);
font-weight: $font-weight-bold;
}
}

%table-rounded {
border-radius: $global-radius;

thead th {
&:first-child {
border-radius: $global-radius 0 0;
}

&:last-child {
border-radius: 0 $global-radius 0 0;
}
}

tbody tr:last-child td {
&:first-child {
border-radius: 0 0 0 $global-radius;
}

&:last-child {
border-radius: 0 $global-radius 0 0;
}
}
}

@include exports('paint-table') {
@if $include-html-paint-table {
.table {
@extend %table;

&.stripped {
@extend %table-stripped;
}

&.rounded {
@extend %table-rounded;
}

.highlighted-row {
@extend %table-highlighted-row;
}
}
}
}
1 change: 1 addition & 0 deletions paint.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
@import 'components/icon';
@import 'components/label';
@import 'components/layout';
@import 'components/table';
@import 'components/progress-bar';
@import 'components/side-panel';
@import 'components/vertical-align';
Expand Down

0 comments on commit 8b46b7b

Please sign in to comment.