|
139 | 139 | --mod-button-content-color-down: var(--spectrum-table-header-text-color);
|
140 | 140 | --mod-button-edge-to-text: var(--spectrum-table-cell-inline-spacing);
|
141 | 141 | --mod-button-padding-label-to-icon: var(--spectrum-table-visual-to-text);
|
142 |
| - --mod-button-height: var(--spectrum-table-min-header-row-height); |
| 142 | + --mod-button-border-radius: calc(var(--mod-table-border-radius, var(--spectrum-table-focused-cell-border-radius)) - var(--mod-table-border-width, var(--spectrum-table-border-width))); |
143 | 143 | --mod-button-focus-ring-border-radius: calc(var(--mod-table-border-radius, var(--spectrum-table-focused-cell-border-radius)) - var(--mod-table-border-width, var(--spectrum-table-border-width)));
|
144 | 144 |
|
145 | 145 | &:dir(rtl) {
|
|
256 | 256 | &.is-sortable,
|
257 | 257 | &.spectrum-Table-hasMenuButton,
|
258 | 258 | .spectrum-Table-sortButton {
|
259 |
| - --spectrum-table-icon-color: var(--mod-table-header-icons-color-default, var(--spectrum-table-header-icons-color-default)); |
| 259 | + --spectrum-table-icon-color: var(--highcontrast-table-icon-color, var(--mod-table-header-icons-color-default, var(--spectrum-table-header-icons-color-default))); |
260 | 260 |
|
261 | 261 | &:hover {
|
262 | 262 | --spectrum-table-icon-color: var(--highcontrast-table-icon-color-focus, var(--mod-table-header-icons-color-hover, var(--spectrum-table-header-icons-color-hover)));
|
|
401 | 401 | }
|
402 | 402 | }
|
403 | 403 |
|
404 |
| -/* Quiet table header rows do not have inline borders */ |
405 |
| -.spectrum-Table--quiet .spectrum-Table-headRow:first-child { |
406 |
| - .spectrum-Table-headCell:first-child { |
407 |
| - border-inline-start: 0; |
408 |
| - } |
409 |
| - |
410 |
| - .spectrum-Table-headCell:last-child { |
411 |
| - border-inline-end: 0; |
412 |
| - } |
413 |
| -} |
414 |
| - |
415 | 404 | /********* ICONS- SORT, DISCLOSURE/MENU *********/
|
416 | 405 | /* Head cell column text */
|
417 | 406 | .spectrum-Table-columnTitle {
|
|
423 | 412 | .spectrum-Table-headCell.is-sortable {
|
424 | 413 | padding: 0;
|
425 | 414 |
|
| 415 | + /* Ensure the button text color is the same as the header text color, particularly in high contrast mode. */ |
| 416 | + .spectrum-Table-sortButton { |
| 417 | + color: var(--highcontrast-table-header-text-color, var(--mod-table-header-text-color, var(--spectrum-table-header-text-color))); |
| 418 | + |
| 419 | + /* Avoids flash of a different text color from the button in WHCM. */ |
| 420 | + forced-color-adjust: none; |
| 421 | + |
| 422 | + &:hover, |
| 423 | + &:focus, |
| 424 | + &:focus-visible, |
| 425 | + &:active { |
| 426 | + color: var(--highcontrast-table-header-text-color-hover, var(--mod-table-header-text-color, var(--spectrum-table-header-text-color))); |
| 427 | + } |
| 428 | + } |
| 429 | + |
426 | 430 | /* Focus indicator- brings the focus indicator above the border and matches the table cell dimensions. */
|
427 | 431 | .spectrum-Table-sortButton::after {
|
428 | 432 | inset: calc(3 * var(--mod-table-border-width, var(--spectrum-table-border-width)));
|
|
438 | 442 | /* Head cell column text in the button that opens the menu */
|
439 | 443 | .spectrum-Table-headCell.spectrum-Table-hasMenuButton {
|
440 | 444 | .spectrum-Table-sortButton {
|
441 |
| - min-block-size: calc(var(--spectrum-table-min-header-row-height) + var(--mod-table-border-width, var(--spectrum-table-border-width))); |
442 | 445 | min-inline-size: 100%;
|
443 | 446 | justify-content: flex-start;
|
| 447 | + color: var(--highcontrast-table-header-text-color, var(--mod-table-header-text-color, var(--spectrum-table-header-text-color))); |
| 448 | + |
| 449 | + /* Avoids flash of a different text color from the button in WHCM. */ |
| 450 | + forced-color-adjust: none; |
| 451 | + |
| 452 | + &:hover { |
| 453 | + color: var(--highcontrast-table-header-text-color-hover, var(--mod-table-header-text-color, var(--spectrum-table-header-text-color))); |
| 454 | + } |
444 | 455 |
|
445 | 456 | /* Focus indicator- brings the focus indicator above the cell borders and matches the table cell dimensions. */
|
446 | 457 | &:focus-visible::after,
|
|
931 | 942 |
|
932 | 943 | &:focus-visible,
|
933 | 944 | &.is-keyboardFocused {
|
934 |
| - --spectrum-table-icon-color: var(--highcontrast-table-icon-color, var(--mod-table-icon-color-key-focus, var(--spectrum-table-icon-color-key-focus))); |
| 945 | + --spectrum-table-icon-color: var(--highcontrast-table-icon-color-focus, var(--mod-table-icon-color-key-focus, var(--spectrum-table-icon-color-key-focus))); |
935 | 946 |
|
936 | 947 | outline-width: var(--mod-table-focus-indicator-thickness, var(--spectrum-table-focus-indicator-thickness));
|
937 | 948 | outline-style: solid;
|
|
981 | 992 | --highcontrast-table-selected-row-background-color: Highlight;
|
982 | 993 | --highcontrast-table-selected-row-text-color: HighlightText;
|
983 | 994 |
|
| 995 | + /* Button text colors */ |
| 996 | + --highcontrast-table-header-text-color: CanvasText; |
| 997 | + --highcontrast-table-header-text-color-hover: Highlight; |
| 998 | + |
984 | 999 | @supports (color: SelectedItem) {
|
985 | 1000 | --highcontrast-table-selected-row-background-color: SelectedItem;
|
986 | 1001 | --highcontrast-table-selected-row-text-color: SelectedItemText;
|
|
0 commit comments