Skip to content

Commit

Permalink
simplifies and improves table backgrounds
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgalante committed Nov 3, 2017
1 parent 9244974 commit 53c8664
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 deletions.
9 changes: 6 additions & 3 deletions scss/_tables.scss
Expand Up @@ -89,14 +89,12 @@

// Table backgrounds
//
// Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.

@each $color, $value in $theme-colors {
@include table-row-variant($color, theme-color-level($color, -9));
}

@include table-row-variant(active, $table-active-bg);
.table-active { background-color: $table-active-bg; }


// Dark styles
Expand Down Expand Up @@ -149,6 +147,11 @@
}
}
}

&.table-active,
.table-active {
background-color: $table-dark-active-bg;
}
}


Expand Down
2 changes: 1 addition & 1 deletion scss/_variables.scss
Expand Up @@ -310,7 +310,7 @@ $table-dark-accent-bg: rgba($white, .05) !default;
$table-dark-hover-bg: rgba($white, .075) !default;
$table-dark-border-color: lighten($gray-900, 7.5%) !default;
$table-dark-color: $body-bg !default;

$table-dark-active-bg: $table-dark-hover-bg !default;

// Buttons + Forms
//
Expand Down
8 changes: 1 addition & 7 deletions scss/mixins/_table-row.scss
@@ -1,14 +1,8 @@
// Tables

@mixin table-row-variant($state, $background) {
// Exact selectors below required to override `.table-striped` and prevent
// inheritance to nested tables.
.table-#{$state} {
&,
> th,
> td {
background-color: $background;
}
background-color: $background;
}

// Hover states for `.table-hover`
Expand Down

0 comments on commit 53c8664

Please sign in to comment.