Skip to content

fix(table): use solid color for sorting arrow #11533

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions src/lib/sort/_sort-theme.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,17 @@
// Empty mixins to be consistent with all other components.
@mixin mat-sort-theme($theme) { }
@mixin mat-sort-theme($theme) {
$background: map-get($theme, background);
$foreground: map-get($theme, foreground);

.mat-sort-header-arrow {
// Because the arrow is made up of multiple elements that are stacked on top of each other,
// we can't use the semi-trasparent color from the theme directly. We convert it into a solid
// color by taking the opacity from the rgba value and using the value to determine the
// percentage of the background to put into foreground when mixing the colors together.
$table-background: mat-color($background, 'card');
$text-color: mat-color($foreground, secondary-text);
$text-opacity: opacity($text-color);
color: mix($table-background, rgba($text-color, 1), (1 - $text-opacity) * 100%);
}
}

@mixin mat-sort-typography($config) { }