|
17 | 17 | /// @param {String} $header-border-width [null] - The border width used for header borders.
|
18 | 18 | /// @param {String} $header-border-style [null] - The border style used for header borders.
|
19 | 19 | /// @param {Color} $header-border-color [null] - The color used for header borders.
|
| 20 | +/// @param {Color} $header-selected-background [null] - The table header background color when selected (ex. column selection). |
| 21 | +/// @param {Color} $header-selected-text-color [null] - The table header text color when selected (ex. column selection). |
20 | 22 | ///
|
21 | 23 | /// @param {Color} $sorted-header-icon-color [null] - The sort icon color when sorted.
|
22 | 24 | /// @param {color} $sortable-header-icon-hover-color [null] - The icon color on hover in grid header when the column is sortable.
|
|
126 | 128 | $header-border-style: null,
|
127 | 129 | $header-border-color: null,
|
128 | 130 |
|
| 131 | + $header-selected-background: null, |
| 132 | + $header-selected-text-color: null, |
| 133 | +
|
129 | 134 | $sorted-header-icon-color: null,
|
130 | 135 |
|
131 | 136 | $content-background: null,
|
|
230 | 235 |
|
231 | 236 | $tree-selected-filtered-row-text-color: rgba(text-contrast(map-get($theme, 'row-selected-background')), .5);
|
232 | 237 | $tree-selected-filtered-cell-text-color: rgba(text-contrast(map-get($theme, 'cell-selected-background')), .5);
|
233 |
| - $row-selected-cell-background: darken-color(map-get($theme, 'row-selected-background'), 8%); |
| 238 | + |
| 239 | + $rs-bg: if( |
| 240 | + $row-selected-background, |
| 241 | + $row-selected-background, |
| 242 | + map-get($theme, 'row-selected-background') |
| 243 | + ); |
| 244 | + |
| 245 | + $row-selected-cell-background: null; |
| 246 | + |
| 247 | + @if type-of($rs-bg) == 'color' { |
| 248 | + @if luminance($rs-bg) < .5 { |
| 249 | + $row-selected-cell-background: lighten-color($rs-bg, 8%); |
| 250 | + } @else { |
| 251 | + $row-selected-cell-background: darken-color($rs-bg, 8%); |
| 252 | + } |
| 253 | + } |
234 | 254 |
|
235 | 255 | @if not($ghost-header-icon-color) and $ghost-header-background {
|
236 | 256 | @if type-of($ghost-header-background) == 'color' {
|
|
250 | 270 | $header-text-color: text-contrast($header-background);
|
251 | 271 | }
|
252 | 272 |
|
| 273 | + @if not($header-selected-text-color) and $header-selected-background { |
| 274 | + $header-selected-text-color: text-contrast($header-selected-background); |
| 275 | + } |
| 276 | + |
253 | 277 | @if not($header-border-color) and $header-background {
|
254 | 278 | @if type-of($header-background) == 'color' {
|
255 | 279 | $header-border-color: rgba(text-contrast($header-background), .24);
|
|
442 | 466 |
|
443 | 467 | header-background: $header-background,
|
444 | 468 | header-text-color: $header-text-color,
|
| 469 | + header-selected-background: $header-selected-background, |
| 470 | + header-selected-text-color: $header-selected-text-color, |
445 | 471 | header-border-width: $header-border-width,
|
446 | 472 | header-border-style: $header-border-style,
|
447 | 473 | header-border-color: $header-border-color,
|
|
979 | 1005 | &:hover {
|
980 | 1006 | background: --var($theme, 'row-hover-background');
|
981 | 1007 | color: --var($theme, 'row-hover-text-color');
|
| 1008 | + |
| 1009 | + %grid-cell--column-selected { |
| 1010 | + background: --var($theme, 'row-selected-hover-background'); |
| 1011 | + } |
| 1012 | + |
| 1013 | + %grid-cell--cross-selected { |
| 1014 | + color: --var($theme, 'row-selected-text-color'); |
| 1015 | + background: --var($theme, 'row-selected-cell-background'); |
| 1016 | + } |
982 | 1017 | }
|
983 | 1018 |
|
984 | 1019 | &%igx-grid__tr--ghost {
|
|
1063 | 1098 | &:hover {
|
1064 | 1099 | background: --var($theme, 'row-selected-hover-background');
|
1065 | 1100 | color: --var($theme, 'row-selected-text-color');
|
| 1101 | + |
| 1102 | + %grid-cell--column-selected { |
| 1103 | + color: --var($theme, 'row-selected-text-color'); |
| 1104 | + background: --var($theme, 'row-selected-hover-background'); |
| 1105 | + } |
1066 | 1106 | }
|
1067 | 1107 |
|
1068 | 1108 | %igx-grid__tree-grouping-indicator {
|
|
1293 | 1333 | %grid-cell--column-selected {
|
1294 | 1334 | color: --var($theme, 'row-selected-text-color');
|
1295 | 1335 | background: --var($theme, 'row-selected-background');
|
1296 |
| - |
1297 |
| - &:hover { |
1298 |
| - background: --var($theme, 'row-selected-hover-background'); |
1299 |
| - color: --var($theme, 'row-selected-text-color'); |
1300 |
| - } |
1301 | 1336 | }
|
1302 | 1337 |
|
1303 | 1338 | %grid-cell--cross-selected {
|
| 1339 | + color: --var($theme, 'row-selected-text-color'); |
1304 | 1340 | background: --var($theme, 'row-selected-cell-background');
|
1305 | 1341 | }
|
1306 | 1342 |
|
|
1476 | 1512 | }
|
1477 | 1513 |
|
1478 | 1514 | %igx-grid__th--selectable {
|
1479 |
| - color: --var($theme, 'row-selected-text-color'); |
1480 |
| - background: --var($theme, 'row-selected-background'); |
| 1515 | + color: --var($theme, 'header-selected-text-color'); |
| 1516 | + background: --var($theme, 'header-selected-background'); |
1481 | 1517 | opacity: .7;
|
1482 | 1518 | }
|
1483 | 1519 |
|
1484 | 1520 | %igx-grid__th--selected {
|
1485 |
| - color: --var($theme, 'row-selected-text-color'); |
1486 |
| - background: --var($theme, 'row-selected-cell-background'); |
| 1521 | + color: --var($theme, 'header-selected-text-color'); |
| 1522 | + background: --var($theme, 'header-selected-background'); |
1487 | 1523 | }
|
1488 | 1524 |
|
1489 | 1525 | %igx-grid__th--sortable {
|
|
2212 | 2248 | }
|
2213 | 2249 |
|
2214 | 2250 | %igx-grid__filtering-cell--selected {
|
2215 |
| - color: --var($theme, 'row-selected-text-color'); |
2216 |
| - background: --var($theme, 'row-selected-cell-background'); |
| 2251 | + color: --var($theme, 'header-selected-text-color'); |
| 2252 | + background: --var($theme, 'header-selected-background'); |
2217 | 2253 | }
|
2218 | 2254 |
|
2219 | 2255 | %igx-grid__filtering-cell-indicator {
|
|
0 commit comments