|
123 | 123 | --#{$table}__expandable-row--TransitionDuration--expand--fade: var(--pf-t--global--motion--duration--fade--default); |
124 | 124 | --#{$table}__expandable-row--TransitionDuration--collapse--slide: 0s; |
125 | 125 | --#{$table}__expandable-row--TransitionDuration--collapse--fade: var(--pf-t--global--motion--duration--fade--short); |
126 | | - --#{$table}__expandable-row--TransitionDuration--slide: var(--#{$table}__expandable-row--TransitionDuration--collapse--slide); |
127 | | - --#{$table}__expandable-row--TransitionDuration--fade: var(--#{$table}__expandable-row--TransitionDuration--collapse--fade); |
128 | 126 | --#{$table}__expandable-row--TransitionTimingFunction: var(--pf-t--global--motion--timing-function--default); |
129 | 127 | --#{$table}__expandable-row--Opacity: 0; |
130 | 128 | --#{$table}__tbody--m-expanded__expandable-row--Opacity: 1; |
|
581 | 579 | .#{$button} .#{$table}__sort-indicator { |
582 | 580 | --#{$table}__sort-indicator--MarginInlineStart: 0; |
583 | 581 | } |
| 582 | + |
| 583 | + // stylelint-disable max-nesting-depth, selector-max-class |
| 584 | + &.pf-m-animate-expand { |
| 585 | + > .#{$table}__tbody { |
| 586 | + > .#{$table}__expandable-row { |
| 587 | + display: revert; |
| 588 | + visibility: hidden; |
| 589 | + opacity: var(--#{$table}__expandable-row--Opacity); |
| 590 | + transition-delay: 0s, 0s, var(--#{$table}__expandable-row--TransitionDuration--collapse--fade); |
| 591 | + transition-timing-function: var(--#{$table}__expandable-row--TransitionTimingFunction); |
| 592 | + transition-duration: var(--#{$table}__expandable-row--TransitionDuration--collapse--fade), var(--#{$table}__expandable-row--TransitionDuration--collapse--slide), 0s; |
| 593 | + transition-property: opacity, translate, visibility; |
| 594 | + translate: 0 var(--#{$table}__expandable-row--TranslateY); |
| 595 | + |
| 596 | + &[hidden] { |
| 597 | + display: revert; |
| 598 | + } |
| 599 | + |
| 600 | + &.pf-m-expanded { |
| 601 | + visibility: visible; |
| 602 | + opacity: var(--#{$table}__tbody--m-expanded__expandable-row--Opacity); |
| 603 | + transition-delay: 0s; |
| 604 | + transition-duration: var(--#{$table}__expandable-row--TransitionDuration--expand--fade), var(--#{$table}__expandable-row--TransitionDuration--expand--slide), 0s, 0s; |
| 605 | + translate: 0 var(--#{$table}__tbody--m-expanded__expandable-row--TranslateY); |
| 606 | + |
| 607 | + > :is(.#{$table}__td, .#{$table}__th) { |
| 608 | + > .#{$table}__expandable-row-content { |
| 609 | + max-height: 99999px; |
| 610 | + } |
| 611 | + } |
| 612 | + } |
| 613 | + |
| 614 | + &:not(.pf-m-expanded) { |
| 615 | + > :is(.#{$table}__td, .#{$table}__th) { |
| 616 | + &, |
| 617 | + > .#{$table}__expandable-row-content { |
| 618 | + padding: 0; |
| 619 | + overflow: hidden; |
| 620 | + transition-delay: var(--#{$table}__expandable-row--TransitionDuration--collapse--fade); |
| 621 | + transition-property: padding, max-height, overflow; |
| 622 | + } |
| 623 | + |
| 624 | + > .#{$table}__expandable-row-content { |
| 625 | + max-height: 0; |
| 626 | + } |
| 627 | + } |
| 628 | + } |
| 629 | + } |
| 630 | + } |
| 631 | + } |
| 632 | + // stylelint-enable max-nesting-depth, selector-max-class |
584 | 633 | } |
585 | 634 |
|
586 | 635 | // - Table truncate - Table wrap - Table nowrap - Table fit content - Table wrap - Table break word |
|
972 | 1021 | .#{$table}__expandable-row { |
973 | 1022 | position: relative; |
974 | 1023 | border-block-end: 0 solid transparent; |
975 | | - opacity: var(--#{$table}__expandable-row--Opacity); |
976 | | - transition-timing-function: var(--#{$table}__expandable-row--TransitionTimingFunction); |
977 | | - transition-duration: var(--#{$table}__expandable-row--TransitionDuration--fade), var(--#{$table}__expandable-row--TransitionDuration--slide), var(--#{$table}__expandable-row--TransitionDuration--fade); |
978 | | - transition-property: opacity, translate, display; |
979 | | - transition-behavior: allow-discrete; |
980 | | - translate: 0 var(--#{$table}__expandable-row--TranslateY); |
981 | | - |
982 | | - @at-root :not(.#{$table}__control-row) ~ .#{$table}__expandable-row { |
| 1024 | + |
| 1025 | + // Remove top padding from regular expandable |
| 1026 | + > .#{$table}__th, |
| 1027 | + > .#{$table}__td { |
| 1028 | + padding-block-start: 0; |
| 1029 | + } |
| 1030 | + |
| 1031 | + // Add padding back to compound expandable |
| 1032 | + .#{$table}__control-row ~ & { |
983 | 1033 | > .#{$table}__th, |
984 | 1034 | > .#{$table}__td { |
985 | | - padding-block-start: 0; |
| 1035 | + padding-block-start: var(--#{$table}--cell--PaddingBlockStart); |
986 | 1036 | } |
987 | 1037 | } |
988 | 1038 |
|
989 | | - td:where(.#{$table}__td), |
990 | | - th:where(.#{$table}__th) { |
| 1039 | + .#{$table}__td, |
| 1040 | + .#{$table}__th { |
991 | 1041 | &.pf-m-no-padding { |
992 | 1042 | padding-block-start: 0; |
993 | 1043 | padding-block-end: 0; |
|
996 | 1046 |
|
997 | 1047 | .#{$table}__expandable-row-content { |
998 | 1048 | padding: 0; |
| 1049 | + border-radius: 0; |
999 | 1050 | } |
1000 | 1051 | } |
1001 | 1052 | } |
|
1008 | 1059 | padding-inline-end: var(--#{$table}__expandable-row-content--PaddingInlineEnd); |
1009 | 1060 | background-color: var(--#{$table}__expandable-row-content--BackgroundColor); |
1010 | 1061 | border-radius: var(--#{$table}__expandable-row-content--BorderRadius); |
| 1062 | + |
| 1063 | + &.pf-m-no-background { |
| 1064 | + background-color: transparent; |
| 1065 | + } |
1011 | 1066 | } |
1012 | 1067 |
|
1013 | 1068 | // - Table expandable row content expanded |
1014 | 1069 | &.pf-m-expanded { |
1015 | 1070 | border-block-end-color: var(--#{$table}__expandable-row--m-expanded--BorderBlockEndColor); |
1016 | 1071 | border-block-end-width: var(--#{$table}--border-width--base); |
1017 | | - opacity: var(--#{$table}__tbody--m-expanded__expandable-row--Opacity); |
1018 | | - transition-duration: var(--#{$table}__expandable-row--TransitionDuration--expand--fade), var(--#{$table}__expandable-row--TransitionDuration--expand--slide), var(--#{$table}__expandable-row--TransitionDuration--expand--fade); |
1019 | | - translate: 0 var(--#{$table}__tbody--m-expanded__expandable-row--TranslateY); |
1020 | | - |
1021 | | - @starting-style { |
1022 | | - opacity: var(--#{$table}__expandable-row--Opacity); |
1023 | | - translate: 0 var(--#{$table}__expandable-row--TranslateY); |
1024 | | - } |
1025 | 1072 | } |
1026 | 1073 |
|
1027 | 1074 | &:not(.pf-m-expanded) { |
|
1034 | 1081 | } |
1035 | 1082 | } |
1036 | 1083 |
|
| 1084 | +.#{$table}__tr:has(~ .#{$table}__expandable-row) { |
| 1085 | + border-block-end: 0; |
| 1086 | +} |
| 1087 | + |
1037 | 1088 | // - Table compact |
1038 | 1089 | .#{$table}.pf-m-compact { |
1039 | 1090 | --#{$table}--cell--PaddingBlockStart: var(--#{$table}--m-compact--cell--PaddingBlockStart); |
|
1118 | 1169 | // - Table tbody table control row |
1119 | 1170 | .#{$table}__control-row { |
1120 | 1171 | background-color: var(--#{$table}__control-row--BackgroundColor); |
1121 | | - border-block-end: var(--#{$table}__control-row--BorderBlockEndWidth) solid var(--#{$table}__control-row__tbody--BorderBlockEndColor); |
| 1172 | + border-block-end: 0; |
1122 | 1173 | } |
1123 | 1174 | } |
1124 | 1175 | } |
|
0 commit comments