Avoid static table backgrounds and use dynamically calculated

Tested with light/dark themes.
This commit is contained in:
Ivan Kravets 2018-10-22 23:02:28 +03:00 committed by 偏右
parent b6681707be
commit 65f85257b0

View File

@ -3,6 +3,8 @@
@table-prefix-cls: ~"@{ant-prefix}-table"; @table-prefix-cls: ~"@{ant-prefix}-table";
@table-header-icon-color: #bfbfbf; @table-header-icon-color: #bfbfbf;
@table-header-sort-active-bg: darken(@table-header-bg, 3%);
@table-header-filter-active-bg: darken(@table-header-sort-active-bg, 5%);
.@{table-prefix-cls}-wrapper { .@{table-prefix-cls}-wrapper {
.clearfix; .clearfix;
@ -103,7 +105,7 @@
.@{table-prefix-cls}-filter-icon { .@{table-prefix-cls}-filter-icon {
&.@{table-prefix-cls}-filter-open { &.@{table-prefix-cls}-filter-open {
color: @text-color-secondary; color: @text-color-secondary;
background: #ebebeb; background: @table-header-filter-active-bg;
} }
} }
// Very complicated styles logic but neccessary // Very complicated styles logic but neccessary
@ -112,7 +114,7 @@
.@{table-prefix-cls}-filter-icon { .@{table-prefix-cls}-filter-icon {
&:hover { &:hover {
color: @text-color-secondary; color: @text-color-secondary;
background: #ebebeb; background: @table-header-filter-active-bg;
} }
&:active { &:active {
color: @text-color; color: @text-color;
@ -124,10 +126,10 @@
&.@{table-prefix-cls}-column-has-sorters { &.@{table-prefix-cls}-column-has-sorters {
cursor: pointer; cursor: pointer;
&:hover { &:hover {
background: #f5f5f5; background: @table-header-sort-active-bg;
.@{iconfont-css-prefix}-filter, .@{iconfont-css-prefix}-filter,
.@{table-prefix-cls}-filter-icon { .@{table-prefix-cls}-filter-icon {
background: #f5f5f5; background: @table-header-sort-active-bg;
} }
} }
&:active { &:active {