| 1 |
@use '../../sass-utilities' as *; |
| 2 |
|
| 3 |
// TODO: clean up unused variables |
| 4 |
// TODO: update grouping comments to // * Table {element} |
| 5 |
|
| 6 |
@include pf-root($table) { |
| 7 |
--#{$table}--BackgroundColor: var(--pf-t--global--background--color--primary--default); |
| 8 |
--#{$table}--BorderColor: var(--pf-t--global--border--color--default); |
| 9 |
--#{$table}--border-width--base: var(--pf-t--global--border--width--divider--default); |
| 10 |
|
| 11 |
// * Table caption |
| 12 |
--#{$table}__caption--FontSize: var(--pf-t--global--font--size--body--default); |
| 13 |
--#{$table}__caption--Color: var(--pf-t--global--text--color--subtle); |
| 14 |
--#{$table}__caption--PaddingBlockStart: var(--pf-t--global--spacer--md); |
| 15 |
--#{$table}__caption--PaddingInlineEnd: var(--pf-t--global--spacer--lg); |
| 16 |
--#{$table}__caption--PaddingBlockEnd: var(--pf-t--global--spacer--md); |
| 17 |
--#{$table}__caption--PaddingInlineStart: var(--pf-t--global--spacer--inset--page-chrome); |
| 18 |
|
| 19 |
// * Table thead cell |
| 20 |
--#{$table}__thead--cell--FontSize: var(--pf-t--global--font--size--body--sm); |
| 21 |
--#{$table}__thead--cell--FontWeight: var(--pf-t--global--font--weight--body--bold); |
| 22 |
|
| 23 |
// * Table thead toggle |
| 24 |
--#{$table}__thead__toggle--PaddingBlockStart: var(--#{$table}--cell--Padding--base); // TODO - remove thead toggle custom padding in breaking change |
| 25 |
--#{$table}__thead__toggle--PaddingBlockEnd: var(--#{$table}--cell--Padding--base); // TODO - remove thead toggle custom padding in breaking change |
| 26 |
|
| 27 |
// * Table body cell |
| 28 |
--#{$table}__tbody--cell--PaddingBlockStart: var(--#{$table}--cell--Padding--base); |
| 29 |
--#{$table}__tbody--cell--PaddingBlockEnd: var(--#{$table}--cell--Padding--base); |
| 30 |
--#{$table}__tbody--cell--FontSize: var(--pf-t--global--font--size--body--default); // set this explicitly for input heights to calc properly |
| 31 |
|
| 32 |
// * Table tr |
| 33 |
--#{$table}__tr--BorderBlockEndWidth: var(--pf-t--global--border--width--divider--default); |
| 34 |
--#{$table}__tr--BorderBlockEndColor: var(--pf-t--global--border--color--default); |
| 35 |
|
| 36 |
// TODO: update these in order of appearance in scss declarations |
| 37 |
|
| 38 |
// * Table cell |
| 39 |
--#{$table}--cell--Padding--base: var(--pf-t--global--spacer--md); |
| 40 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}--cell--Padding--base); |
| 41 |
--#{$table}--cell--PaddingInlineEnd: var(--#{$table}--cell--Padding--base); |
| 42 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}--cell--Padding--base); |
| 43 |
--#{$table}--cell--PaddingInlineStart: var(--#{$table}--cell--Padding--base); |
| 44 |
--#{$table}--cell--FontSize: var(--pf-t--global--font--size--body--default); |
| 45 |
--#{$table}--cell--FontWeight: var(--pf-t--global--font--weight--body--default); |
| 46 |
--#{$table}--cell--LineHeight: var(--pf-t--global--font--line-height--body); |
| 47 |
--#{$table}--cell--Color: var(--pf-t--global--text--color--regular); |
| 48 |
--#{$table}--cell--first-last-child--PaddingInline: var(--pf-t--global--spacer--inset--page-chrome); |
| 49 |
--#{$table}__tr--m-first-cell-offset-reset--cell--PaddingInlineStart: var(--#{$table}--cell--Padding--base); |
| 50 |
|
| 51 |
// * Table cell - default variables |
| 52 |
--#{$table}--cell--MinWidth: calc(var(--#{$table}--cell--PaddingInlineEnd) + var(--#{$table}--cell--PaddingInlineEnd)); |
| 53 |
--#{$table}--cell--MaxWidth: none; |
| 54 |
--#{$table}--cell--Width: auto; |
| 55 |
--#{$table}--cell--Overflow: visible; |
| 56 |
--#{$table}--cell--TextOverflow: clip; |
| 57 |
--#{$table}--cell--WhiteSpace: normal; |
| 58 |
--#{$table}--cell--WordBreak: normal; |
| 59 |
|
| 60 |
// * Table cell border right |
| 61 |
--#{$table}--cell--m-border-right--before--BorderInlineEndWidth: var(--pf-t--global--border--width--divider--default); |
| 62 |
--#{$table}--cell--m-border-right--before--BorderInlineEndColor: var(--pf-t--global--border--color--default); |
| 63 |
--#{$table}--cell--m-border-left--before--BorderInlineStartWidth: var(--pf-t--global--border--width--divider--default); |
| 64 |
--#{$table}--cell--m-border-left--before--BorderInlineStartColor: var(--pf-t--global--border--color--default); |
| 65 |
|
| 66 |
// * Table help |
| 67 |
--#{$table}--cell--m-help--MinWidth: 11ch; |
| 68 |
|
| 69 |
// * Table truncate |
| 70 |
--#{$table}--m-truncate--cell--MaxWidth: 1px; |
| 71 |
--#{$table}--m-truncate--cell--MinWidth: calc(5ch + var(--#{$table}--cell--PaddingInlineEnd) + var(--#{$table}--cell--PaddingInlineStart)); |
| 72 |
|
| 73 |
// * Table truncate |
| 74 |
--#{$table}__text--MinWidth: 100%; |
| 75 |
--#{$table}__text--m-truncate--MinWidth: 5ch; |
| 76 |
--#{$table}--m-truncate__text--MinWidth: 5ch; |
| 77 |
|
| 78 |
// * Table cell hidden visible |
| 79 |
--#{$table}--cell--hidden-visible--Display: table-cell; |
| 80 |
|
| 81 |
// * Table toggle |
| 82 |
--#{$table}__toggle--PaddingBlockStart: var(--pf-t--global--spacer--sm); |
| 83 |
--#{$table}__toggle--PaddingBlockEnd: var(--pf-t--global--spacer--sm); |
| 84 |
--#{$table}__toggle--PaddingInlineStart: var(--pf-t--global--spacer--sm); |
| 85 |
--#{$table}__toggle--PaddingInlineEnd: var(--pf-t--global--spacer--sm); |
| 86 |
--#{$table}__toggle--c-button__toggle-icon--Rotate: 0; |
| 87 |
--#{$table}__toggle--c-button__toggle-icon--TransitionDuration: var(--pf-t--global--motion--duration--icon--default); |
| 88 |
--#{$table}__toggle--c-button__toggle-icon--TransitionTimingFunction: var(--pf-t--global--motion--timing-function--default); |
| 89 |
--#{$table}__toggle--c-button--m-expanded__toggle-icon--Rotate: -180deg; |
| 90 |
|
| 91 |
// * Table button |
| 92 |
--#{$table}__button--PaddingBlockStart: var(--pf-t--global--spacer--control--vertical--plain); |
| 93 |
--#{$table}__button--PaddingBlockEnd: var(--pf-t--global--spacer--control--vertical--plain); |
| 94 |
--#{$table}__button--PaddingInlineStart: var(--pf-t--global--spacer--md); |
| 95 |
--#{$table}__button--PaddingInlineEnd: var(--pf-t--global--spacer--md); |
| 96 |
--#{$table}__button--Color: var(--pf-t--global--text--color--regular); |
| 97 |
--#{$table}__button--BackgroundColor: var(--pf-t--global--background--color--action--plain--default); |
| 98 |
--#{$table}__button--OutlineOffset: calc(var(--pf-t--global--border--width--strong) * -1); |
| 99 |
--#{$table}__button--BorderColor: var(--pf-t--global--border--color--high-contrast); |
| 100 |
--#{$table}__button--BorderWidth: var(--pf-t--global--border--width--action--plain--default); |
| 101 |
--#{$table}__button--hover--BorderWidth: var(--pf-t--global--border--width--action--plain--hover); |
| 102 |
--#{$table}__button--BorderRadius: var(--pf-t--global--border--radius--action--plain--default); |
| 103 |
--#{$table}__button--hover--Color: var(--pf-t--global--text--color--regular); |
| 104 |
--#{$table}__button--hover--BackgroundColor: var(--pf-t--global--background--color--action--plain--hover); |
| 105 |
|
| 106 |
// * Table check |
| 107 |
--#{$table}__check--PaddingInlineStart: var(--pf-t--global--spacer--sm); |
| 108 |
--#{$table}__check--PaddingInlineEnd: var(--pf-t--global--spacer--sm); |
| 109 |
|
| 110 |
// * Table favorite |
| 111 |
--#{$table}__favorite--c-button--FontSize: var(--pf-t--global--font--size--body--default); |
| 112 |
--#{$table}--cell--m-favorite--Color: var(--pf-t--global--text--color--subtle); |
| 113 |
--#{$table}__favorite--m-favorited--c-button--Color: var(--pf-t--global--color--favorite--clicked); |
| 114 |
|
| 115 |
// * Table ghost row |
| 116 |
--#{$table}__tr--m-ghost-row--Opacity: .4; |
| 117 |
--#{$table}__tr--m-ghost-row--BackgroundColor: var(--pf-t--global--background--color--primary--default); |
| 118 |
|
| 119 |
// * Table action |
| 120 |
--#{$table}__action--PaddingBlockStart: var(--pf-t--global--spacer--sm); |
| 121 |
--#{$table}__action--PaddingBlockEnd: var(--pf-t--global--spacer--sm); |
| 122 |
--#{$table}__action--PaddingInlineStart: var(--pf-t--global--spacer--sm); |
| 123 |
--#{$table}__action--PaddingInlineEnd: var(--pf-t--global--spacer--sm); |
| 124 |
|
| 125 |
// * Table expandable row |
| 126 |
--#{$table}__expandable-row--TransitionDuration--expand--slide: 0s; |
| 127 |
--#{$table}__expandable-row--TransitionDuration--expand--fade: var(--pf-t--global--motion--duration--fade--default); |
| 128 |
--#{$table}__expandable-row--TransitionDuration--collapse--slide: 0s; |
| 129 |
--#{$table}__expandable-row--TransitionDuration--collapse--fade: var(--pf-t--global--motion--duration--fade--short); |
| 130 |
--#{$table}__expandable-row--TransitionTimingFunction: var(--pf-t--global--motion--timing-function--default); |
| 131 |
--#{$table}__expandable-row--Opacity: 0; |
| 132 |
--#{$table}__tbody--m-expanded__expandable-row--Opacity: 1; |
| 133 |
--#{$table}__expandable-row--TranslateY: 0; |
| 134 |
--#{$table}__tbody--m-expanded__expandable-row--TranslateY: 0; |
| 135 |
|
| 136 |
@media screen and (prefers-reduced-motion: no-preference) { |
| 137 |
--#{$table}__expandable-row--TransitionDuration--expand--slide: var(--pf-t--global--motion--duration--fade--default); |
| 138 |
--#{$table}__expandable-row--TransitionDuration--collapse--slide: var(--pf-t--global--motion--duration--fade--short); |
| 139 |
--#{$table}__expandable-row--TranslateY: -.5rem; |
| 140 |
} |
| 141 |
|
| 142 |
// * Table expandable row content |
| 143 |
--#{$table}__expandable-row-content--PaddingBlockStart: var(--pf-t--global--spacer--md); |
| 144 |
--#{$table}__expandable-row-content--PaddingBlockEnd: var(--pf-t--global--spacer--md); |
| 145 |
--#{$table}__expandable-row-content--PaddingInlineStart: var(--pf-t--global--spacer--md); |
| 146 |
--#{$table}__expandable-row-content--PaddingInlineEnd: var(--pf-t--global--spacer--md); |
| 147 |
--#{$table}__expandable-row-content--BorderRadius: var(--pf-t--global--border--radius--small); |
| 148 |
--#{$table}__expandable-row-content--BackgroundColor: var(--pf-t--global--background--color--primary--default); |
| 149 |
--#{$table}__expandable-row-content--BorderColor: var(--pf-t--global--border--color--high-contrast); |
| 150 |
--#{$table}__expandable-row-content--BorderWidth: 0; |
| 151 |
|
| 152 |
// * Table control row |
| 153 |
--#{$table}__control-row--BackgroundColor: var(--pf-t--global--background--color--primary--default); |
| 154 |
--#{$table}__control-row--BorderBlockEndWidth: var(--pf-t--global--border--width--divider--default); |
| 155 |
--#{$table}__control-row__tbody--BorderBlockEndColor: var(--pf-t--global--border--color--default); |
| 156 |
|
| 157 |
// * Table icon inline |
| 158 |
--#{$table}__icon-inline--MarginInlineEnd: var(--pf-t--global--spacer--sm); |
| 159 |
|
| 160 |
// * Table sort cell |
| 161 |
--#{$table}__sort--MinWidth: calc(6ch + var(--#{$table}--cell--PaddingInlineEnd) + var(--#{$table}--cell--PaddingInlineStart) + var(--#{$table}__sort-indicator--MarginInlineStart)); |
| 162 |
--#{$table}__sort--m-selected__button--Color: var(--pf-t--global--color--brand--clicked); |
| 163 |
--#{$table}__sort--m-help--MinWidth: 15ch; |
| 164 |
|
| 165 |
// * Table sort button |
| 166 |
--#{$table}__sort__button__text--Color: currentcolor; |
| 167 |
--#{$table}__sort__button--hover__text--Color: currentcolor; |
| 168 |
|
| 169 |
// * Table sort indicator |
| 170 |
--#{$table}__sort-indicator--Color: var(--pf-t--global--icon--color--subtle); |
| 171 |
--#{$table}__sort-indicator--MarginInlineStart: var(--pf-t--global--spacer--md); |
| 172 |
--#{$table}__sort--m-selected__sort-indicator--Color: var(--pf-t--global--color--brand--clicked); |
| 173 |
--#{$table}__sort__button--hover__sort-indicator--Color: var(--pf-t--global--text--color--regular); |
| 174 |
|
| 175 |
// * Table help |
| 176 |
--#{$table}__th--m-help--MinWidth: 11ch; |
| 177 |
|
| 178 |
// * Table header popover |
| 179 |
--#{$table}__column-help--MarginInlineStart: var(--pf-t--global--spacer--sm); |
| 180 |
|
| 181 |
// * Table compound expansion toggle button |
| 182 |
--#{$table}__compound-expansion-toggle__button--Color: var(--pf-t--global--icon--color--brand--default); |
| 183 |
--#{$table}__compound-expansion-toggle__button--BackgroundColor: transparent; |
| 184 |
--#{$table}__compound-expansion-toggle__button--hover--Color: var(--pf-t--global--icon--color--brand--hover); |
| 185 |
--#{$table}__compound-expansion-toggle__button--hover--BackgroundColor: var(--pf-t--global--background--color--primary--hover); |
| 186 |
--#{$table}__compound-expansion-toggle__button--expanded--BackgroundColor: var(--pf-t--global--background--color--primary--clicked); |
| 187 |
|
| 188 |
// * Table compound expansion toggle button after |
| 189 |
--#{$table}__compound-expansion-toggle__button--after--BorderColor: var(--pf-t--global--border--color--clicked); |
| 190 |
--#{$table}__compound-expansion-toggle__button--after--BorderRadius: inherit; |
| 191 |
--#{$table}__compound-expansion-toggle__button--after--BorderBlockStartWidth: 0; |
| 192 |
--#{$table}__compound-expansion-toggle__button--hover--after--BorderBlockStartWidth: 0; |
| 193 |
--#{$table}__compound-expansion-toggle--m-expanded__button--after--BorderBlockStartWidth: var(--pf-t--global--border--width--strong); |
| 194 |
|
| 195 |
// * Compound expandable |
| 196 |
--#{$table}--compound-expansion--m-expanded--BackgroundColor: var(--pf-t--global--background--color--primary--clicked); |
| 197 |
--#{$table}--compound-expansion--m-expanded--BorderWidth: var(--pf-t--global--border--width--high-contrast--regular); |
| 198 |
|
| 199 |
// * Table compact th |
| 200 |
--#{$table}--m-compact__th--PaddingBlockStart: calc(var(--pf-t--global--spacer--sm) + var(--pf-t--global--spacer--xs)); |
| 201 |
--#{$table}--m-compact__th--PaddingBlockEnd: var(--pf-t--global--spacer--sm); |
| 202 |
|
| 203 |
// * Table compact cell |
| 204 |
--#{$table}--m-compact--cell--PaddingBlockStart: var(--pf-t--global--spacer--sm); |
| 205 |
--#{$table}--m-compact--cell--PaddingBlockEnd: var(--pf-t--global--spacer--sm); |
| 206 |
|
| 207 |
// * Table cell with button |
| 208 |
--#{$table}__td--m-action--PaddingBlockStart: var(--pf-t--global--spacer--sm); |
| 209 |
--#{$table}__td--m-action--PaddingBlockEnd: var(--pf-t--global--spacer--sm); |
| 210 |
|
| 211 |
// * Table compact cell with button |
| 212 |
--#{$table}--m-compact__td--m-action--PaddingBlockStart: var(--pf-t--global--spacer--xs); |
| 213 |
--#{$table}--m-compact__td--m-action--PaddingBlockEnd: var(--pf-t--global--spacer--xs); |
| 214 |
|
| 215 |
// * Table compact action |
| 216 |
--#{$table}--m-compact__action--PaddingBlockStart: var(--pf-t--global--spacer--xs); |
| 217 |
--#{$table}--m-compact__action--PaddingBlockEnd: var(--pf-t--global--spacer--xs); |
| 218 |
|
| 219 |
// * Table expandable row expanded |
| 220 |
--#{$table}__expandable-row--m-expanded--BorderBlockEndColor: var(--pf-t--global--border--color--default); |
| 221 |
|
| 222 |
// * Table tr clickable |
| 223 |
--#{$table}__tr--m-clickable--BackgroundColor: transparent; |
| 224 |
--#{$table}__tr--m-clickable--OutlineOffset: calc(-1 * var(--pf-t--global--spacer--xs)); |
| 225 |
--#{$table}__tr--m-clickable--hover--BackgroundColor: var(--pf-t--global--background--color--primary--hover); |
| 226 |
|
| 227 |
// * Table tr selected |
| 228 |
--#{$table}__tr--m-selected--BackgroundColor: var(--pf-t--global--background--color--primary--clicked); |
| 229 |
--#{$table}__tr--m-selected--OutlineOffset: calc(-1 * var(--pf-t--global--spacer--xs)); |
| 230 |
|
| 231 |
// * Table tbody clickable |
| 232 |
--#{$table}__tbody--m-clickable--BackgroundColor: transparent; |
| 233 |
--#{$table}__tbody--m-clickable--OutlineOffset: calc(-1 * var(--pf-t--global--spacer--xs)); |
| 234 |
--#{$table}__tbody--m-clickable--hover--BackgroundColor: var(--pf-t--global--background--color--primary--hover); |
| 235 |
--#{$table}__tbody--m-clickable--m-expanded--BackgroundColor: var(--pf-t--global--background--color--primary--clicked); |
| 236 |
|
| 237 |
// * Table tbody selected |
| 238 |
--#{$table}__tbody--m-selected--BackgroundColor: var(--pf-t--global--background--color--primary--clicked); |
| 239 |
--#{$table}__tbody--m-selected--OutlineOffset: calc(-1 * var(--pf-t--global--spacer--xs)); |
| 240 |
|
| 241 |
// * Table nested column header |
| 242 |
--#{$table}__thead--m-nested-column-header--BorderBlockEndWidth: var(--#{$table}--border-width--base); |
| 243 |
--#{$table}__thead--m-nested-column-header--BorderBlockEndColor: var(--#{$table}--BorderColor); |
| 244 |
--#{$table}__thead--m-nested-column-header--after--ZIndex: initial; |
| 245 |
--#{$table}__thead--m-nested-column-header--button--OutlineOffset: #{pf-size-prem(-3px)}; |
| 246 |
--#{$table}__thead--m-nested-column-header__tr--PaddingBlockStart: var(--pf-t--global--spacer--xs); |
| 247 |
--#{$table}__thead--m-nested-column-header__tr--PaddingBlockEnd: var(--pf-t--global--spacer--md); |
| 248 |
|
| 249 |
// * Table subhead |
| 250 |
--#{$table}__subhead--Color: var(--pf-t--global--text--color--subtle); |
| 251 |
|
| 252 |
// * Table subhead button |
| 253 |
--#{$table}__nested-column-header__button--PaddingInlineStart: calc(var(--#{$table}__button--PaddingInlineStart) - var(--pf-t--global--spacer--control--horizontal--plain)); |
| 254 |
--#{$table}__nested-column-header__button--PaddingInlineEnd: calc(var(--#{$table}__button--PaddingInlineEnd) - (var(--pf-t--global--spacer--control--horizontal--plain) / 2)); |
| 255 |
|
| 256 |
// * Table striped |
| 257 |
--#{$table}--m-striped__tr--BackgroundColor: var(--pf-t--global--background--color--striped--row--default); |
| 258 |
|
| 259 |
// * Table sticky header |
| 260 |
--#{$table}--m-sticky-header--BackgroundColor: var(--pf-t--global--background--color--sticky--default); |
| 261 |
--#{$table}--m-sticky-header--cell--ZIndex: var(--pf-t--global--z-index--xs); |
| 262 |
--#{$table}--m-sticky-header--ZIndex: calc(var(--pf-t--global--z-index--xs) + 1); |
| 263 |
--#{$table}--m-sticky-header--border--ZIndex: calc(var(--pf-t--global--z-index--xs) + 2); |
| 264 |
--#{$table}--m-sticky-header--BorderRadius: 0; |
| 265 |
--#{$table}--m-sticky-header--BoxShadow: 0; |
| 266 |
--#{$table}--m-sticky-header--BorderBlockEndWidth: var(--#{$table}--border-width--base); |
| 267 |
--#{$table}--m-sticky-header--BorderBlockEndColor: var(--#{$table}--BorderColor); |
| 268 |
--#{$table}--m-sticky-header--BorderRadius--glass: var(--pf-t--global--border--radius--medium); |
| 269 |
--#{$table}--m-sticky-header--BoxShadow--glass: var(--pf-t--global--box-shadow--sm); |
| 270 |
--#{$table}--m-sticky-header--TransitionTimingFunction--BackgroundColor: var(--pf-t--global--motion--timing-function--default); |
| 271 |
--#{$table}--m-sticky-header--TransitionDuration--BackgroundColor: var(--pf-t--global--motion--duration--fade--default); |
| 272 |
|
| 273 |
// * Table sticky footer |
| 274 |
--#{$table}--m-sticky-footer--ZIndex: calc(var(--pf-t--global--z-index--xs) + 1); |
| 275 |
--#{$table}--m-sticky-footer--border--ZIndex: calc(var(--pf-t--global--z-index--xs) + 2); |
| 276 |
|
| 277 |
:where(.pf-v6-theme-glass) & { |
| 278 |
--#{$table}--m-sticky-header--BorderBlockEndWidth: 0; |
| 279 |
--#{$table}--m-sticky-header--BoxShadow: var(--#{$table}--m-sticky-header--BoxShadow--glass); |
| 280 |
--#{$table}--m-sticky-header--BorderRadius: var(--#{$table}--m-sticky-header--BorderRadius--glass); |
| 281 |
} |
| 282 |
} |
| 283 |
|
| 284 |
// TODO: update grouping comments to // Table {element} |
| 285 |
// TODO: flatten the modifiers out ex: .#{$table}.pf-m-sticky-header {} |
| 286 |
// - Table |
| 287 |
.#{$table} { |
| 288 |
width: 100%; |
| 289 |
background-color: var(--#{$table}--BackgroundColor); |
| 290 |
|
| 291 |
:where(:root:not(.pf-v6-theme-glass)) &.pf-m-plain, |
| 292 |
:where(:root.pf-v6-theme-glass) &:not(.pf-m-no-plain-on-glass) { |
| 293 |
--#{$table}--BackgroundColor: transparent; |
| 294 |
--#{$table}__expandable-row-content--BackgroundColor: transparent; |
| 295 |
--#{$table}__expandable-row-content--PaddingInlineStart: 0; |
| 296 |
--#{$table}__expandable-row-content--PaddingInlineEnd: 0; |
| 297 |
--#{$table}__control-row--BackgroundColor: transparent; |
| 298 |
} |
| 299 |
|
| 300 |
&.pf-m-fixed { |
| 301 |
table-layout: fixed; |
| 302 |
} |
| 303 |
|
| 304 |
&.pf-m-sticky-header-base > .#{$table}__thead, |
| 305 |
&.pf-m-sticky-header-base > .#{$table}__thead .#{$table}__th { |
| 306 |
&::after { |
| 307 |
opacity: 0; |
| 308 |
transition-timing-function: var(--#{$table}--m-sticky-header--TransitionTimingFunction--BackgroundColor); |
| 309 |
transition-duration: var(--#{$table}--m-sticky-header--TransitionDuration--BackgroundColor); |
| 310 |
transition-property: opacity; |
| 311 |
} |
| 312 |
} |
| 313 |
|
| 314 |
&.pf-m-sticky-header-stuck > .#{$table}__thead, |
| 315 |
&.pf-m-sticky-header-stuck > .#{$table}__thead .#{$table}__th { |
| 316 |
&::after { |
| 317 |
opacity: 1; |
| 318 |
} |
| 319 |
} |
| 320 |
|
| 321 |
&.pf-m-sticky-header, |
| 322 |
&.pf-m-sticky-header-base { |
| 323 |
position: relative; |
| 324 |
|
| 325 |
> .#{$table}__thead { |
| 326 |
position: sticky; |
| 327 |
inset-block-start: 0; |
| 328 |
z-index: var(--#{$table}--m-sticky-header--ZIndex); |
| 329 |
|
| 330 |
&::after { |
| 331 |
position: absolute; |
| 332 |
inset: 0; |
| 333 |
z-index: -1; |
| 334 |
pointer-events: none; |
| 335 |
content: ''; |
| 336 |
border-radius: var(--#{$table}--m-sticky-header--BorderRadius); |
| 337 |
box-shadow: var(--#{$table}--m-sticky-header--BoxShadow); |
| 338 |
} |
| 339 |
|
| 340 |
|
| 341 |
.#{$table}__th::after { |
| 342 |
position: absolute; |
| 343 |
inset: 0; |
| 344 |
z-index: -1; |
| 345 |
pointer-events: none; |
| 346 |
content: ''; |
| 347 |
background-color: var(--#{$table}--m-sticky-header--BackgroundColor); |
| 348 |
border-block-end: var(--#{$table}--m-sticky-header--BorderBlockEndWidth) solid var(--#{$table}--m-sticky-header--BorderBlockEndColor); |
| 349 |
} |
| 350 |
|
| 351 |
.#{$table}__th:first-child::after { |
| 352 |
border-start-start-radius: var(--#{$table}--m-sticky-header--BorderRadius); |
| 353 |
border-end-start-radius: var(--#{$table}--m-sticky-header--BorderRadius); |
| 354 |
} |
| 355 |
|
| 356 |
.#{$table}__th:last-child::after { |
| 357 |
border-start-end-radius: var(--#{$table}--m-sticky-header--BorderRadius); |
| 358 |
border-end-end-radius: var(--#{$table}--m-sticky-header--BorderRadius); |
| 359 |
} |
| 360 |
|
| 361 |
> :where(th, td) { |
| 362 |
z-index: var(--#{$table}--m-sticky-header--cell--ZIndex); // set z-index here to allow sticky column to override |
| 363 |
} |
| 364 |
} |
| 365 |
|
| 366 |
:where(.pf-v6-theme-glass) & { |
| 367 |
.pf-m-nested-column-header { |
| 368 |
--#{$table}--m-sticky-header--BorderRadius: 0; |
| 369 |
--#{$table}__thead--m-nested-column-header--BorderBlockEndWidth: 0; |
| 370 |
} |
| 371 |
} |
| 372 |
} |
| 373 |
|
| 374 |
// - Table not sticky header nested column header |
| 375 |
&:not(.pf-m-sticky-header) > .pf-m-nested-column-header { |
| 376 |
tr:where(.#{$table}__tr):not(:last-child) { |
| 377 |
border-block-end: 0; // hard reset tr borders in nested headers |
| 378 |
|
| 379 |
// stylelint-disable max-nesting-depth |
| 380 |
th:where(.#{$table}__th), |
| 381 |
td:where(.#{$table}__td) { |
| 382 |
&:not([rowspan]) { |
| 383 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}__thead--m-nested-column-header__tr--PaddingBlockEnd); |
| 384 |
} |
| 385 |
} |
| 386 |
// stylelint-enable |
| 387 |
} |
| 388 |
} |
| 389 |
|
| 390 |
// - Table sticky footer |
| 391 |
&.pf-m-sticky-footer { |
| 392 |
> .#{$table}__tfoot { |
| 393 |
position: sticky; |
| 394 |
inset-block-end: 0; |
| 395 |
z-index: var(--#{$table}--m-sticky-footer--ZIndex); |
| 396 |
background: var(--#{$table}--BackgroundColor); |
| 397 |
|
| 398 |
&::before { |
| 399 |
position: absolute; |
| 400 |
inset: 0; |
| 401 |
z-index: var(--#{$table}--m-sticky-footer--border--ZIndex); |
| 402 |
pointer-events: none; |
| 403 |
content: ""; |
| 404 |
border-block-start: var(--#{$table}--border-width--base) solid var(--#{$table}--BorderColor); |
| 405 |
} |
| 406 |
} |
| 407 |
|
| 408 |
> .#{$table}__tbody:last-of-type > .#{$table}__tr:last-of-type { |
| 409 |
border-block-end: 0; |
| 410 |
} |
| 411 |
} |
| 412 |
|
| 413 |
// - Table plain |
| 414 |
&.pf-m-plain { |
| 415 |
--#{$table}--BackgroundColor: transparent; |
| 416 |
} |
| 417 |
|
| 418 |
// - Table striped |
| 419 |
// stylelint-disable |
| 420 |
&.pf-m-striped:not(.pf-m-expandable) > tbody:where(.#{$table}__tbody) > tr:where(.#{$table}__tr):nth-child(odd), // regular table |
| 421 |
&.pf-m-striped.pf-m-expandable > tbody:where(.#{$table}__tbody):nth-of-type(odd) > tr:where(.#{$table}__tr), // expandable table |
| 422 |
> .pf-m-striped > tr:nth-child(odd), // tbody odd |
| 423 |
> .pf-m-striped-even > tr:nth-child(even), // tbody even |
| 424 |
tr:where(.#{$table}__tr).pf-m-striped { // tr |
| 425 |
--#{$table}__sticky-column--BackgroundColor: var(--#{$table}--m-striped__tr--BackgroundColor); |
| 426 |
|
| 427 |
background: var(--#{$table}--m-striped__tr--BackgroundColor); |
| 428 |
} |
| 429 |
// stylelint-enable |
| 430 |
|
| 431 |
// Standard table row (non-expandable) |
| 432 |
// exclude expandable rows |
| 433 |
tr:where(.#{$table}__tr):not(.#{$table}__expandable-row) { |
| 434 |
// stylelint-disable-next-line |
| 435 |
&.pf-m-ghost-row { |
| 436 |
background-color: var(--#{$table}__tr--m-ghost-row--BackgroundColor); |
| 437 |
opacity: var(--#{$table}__tr--m-ghost-row--Opacity); |
| 438 |
} |
| 439 |
} |
| 440 |
|
| 441 |
// - Table th - Table td |
| 442 |
tr:where(.#{$table}__tr) > :where(th, td) { |
| 443 |
@include pf-v6-hidden-visible(var(--#{$table}--cell--hidden-visible--Display)); |
| 444 |
|
| 445 |
position: relative; |
| 446 |
width: var(--#{$table}--cell--Width); |
| 447 |
min-width: var(--#{$table}--cell--MinWidth); |
| 448 |
max-width: var(--#{$table}--cell--MaxWidth); |
| 449 |
padding-block-start: var(--#{$table}--cell--PaddingBlockStart); |
| 450 |
padding-block-end: var(--#{$table}--cell--PaddingBlockEnd); |
| 451 |
padding-inline-start: var(--#{$table}--cell--PaddingInlineStart); |
| 452 |
padding-inline-end: var(--#{$table}--cell--PaddingInlineEnd); |
| 453 |
|
| 454 |
// default settings |
| 455 |
overflow: var(--#{$table}--cell--Overflow); |
| 456 |
text-overflow: var(--#{$table}--cell--TextOverflow); |
| 457 |
font-size: var(--#{$table}--cell--FontSize); |
| 458 |
font-weight: var(--#{$table}--cell--FontWeight); |
| 459 |
line-height: var(--#{$table}--cell--LineHeight); |
| 460 |
color: var(--#{$table}--cell--Color); |
| 461 |
word-break: var(--#{$table}--cell--WordBreak); |
| 462 |
white-space: var(--#{$table}--cell--WhiteSpace); |
| 463 |
|
| 464 |
// First child padding left |
| 465 |
&:first-child { |
| 466 |
padding-inline-start: var(--#{$table}--cell--first-last-child--PaddingInline); |
| 467 |
} |
| 468 |
|
| 469 |
// Last child padding right |
| 470 |
&:last-child { |
| 471 |
padding-inline-end: var(--#{$table}--cell--first-last-child--PaddingInline); |
| 472 |
} |
| 473 |
|
| 474 |
&.pf-m-center { |
| 475 |
text-align: center; |
| 476 |
} |
| 477 |
|
| 478 |
&:is(:empty, .#{$table}__cell-empty) { |
| 479 |
width: auto; |
| 480 |
min-width: 0; |
| 481 |
padding: 0; |
| 482 |
} |
| 483 |
|
| 484 |
&.pf-m-help { |
| 485 |
--#{$table}--cell--MinWidth: var(--#{$table}--cell--m-help--MinWidth); |
| 486 |
} |
| 487 |
|
| 488 |
&.pf-m-favorite { |
| 489 |
--#{$table}__button--Color: var(--#{$table}--cell--m-favorite--Color); |
| 490 |
--#{$table}__sort--MinWidth: fit-content; |
| 491 |
--#{$table}--cell--MaxWidth: fit-content; |
| 492 |
--#{$table}--cell--Overflow: visible; |
| 493 |
} |
| 494 |
|
| 495 |
&.pf-m-border-right::before, |
| 496 |
&.pf-m-border-left::before { |
| 497 |
position: absolute; |
| 498 |
inset: 0; |
| 499 |
pointer-events: none; |
| 500 |
content: ""; |
| 501 |
} |
| 502 |
|
| 503 |
&.pf-m-border-right::before { |
| 504 |
border-inline-end: var(--#{$table}--cell--m-border-right--before--BorderInlineEndWidth) solid var(--#{$table}--cell--m-border-right--before--BorderInlineEndColor); |
| 505 |
} |
| 506 |
|
| 507 |
&.pf-m-border-left::before { |
| 508 |
border-inline-start: var(--#{$table}--cell--m-border-left--before--BorderInlineStartWidth) solid var(--#{$table}--cell--m-border-left--before--BorderInlineStartColor); |
| 509 |
} |
| 510 |
} |
| 511 |
|
| 512 |
// - Table caption |
| 513 |
caption:where(.#{$table}__caption) { |
| 514 |
padding-block-start: var(--#{$table}__caption--PaddingBlockStart); |
| 515 |
padding-block-end: var(--#{$table}__caption--PaddingBlockEnd); |
| 516 |
padding-inline-start: var(--#{$table}__caption--PaddingInlineStart); |
| 517 |
font-size: var(--#{$table}__caption--FontSize); |
| 518 |
color: var(--#{$table}__caption--Color); |
| 519 |
text-align: start; |
| 520 |
background-color: var(--#{$table}--BackgroundColor); |
| 521 |
} |
| 522 |
|
| 523 |
// - Table thead |
| 524 |
thead:where(.#{$table}__thead) { |
| 525 |
--#{$table}--cell--FontSize: var(--#{$table}__thead--cell--FontSize); |
| 526 |
--#{$table}--cell--FontWeight: var(--#{$table}__thead--cell--FontWeight); |
| 527 |
--#{$table}--cell--MinWidth: var(--#{$table}--m-truncate--cell--MinWidth); |
| 528 |
--#{$table}--cell--MaxWidth: var(--#{$table}--m-truncate--cell--MaxWidth); |
| 529 |
--#{$table}--cell--Overflow: hidden; |
| 530 |
--#{$table}--cell--TextOverflow: ellipsis; |
| 531 |
--#{$table}--cell--WhiteSpace: nowrap; |
| 532 |
|
| 533 |
.#{$table}__sort .#{$table}__button { |
| 534 |
margin-block-end: calc(var(--#{$table}__button--PaddingBlockEnd) * -1); |
| 535 |
} |
| 536 |
|
| 537 |
// stylelint-disable |
| 538 |
&.pf-m-nested-column-header { |
| 539 |
button:where(.#{$button}) { |
| 540 |
outline-offset: var(--#{$table}__thead--m-nested-column-header--button--OutlineOffset); |
| 541 |
} |
| 542 |
|
| 543 |
tr:where(.#{$table}__tr):not(:first-child) { |
| 544 |
th:where(.#{$table}__th), |
| 545 |
td:where(.#{$table}__td) { |
| 546 |
&:not([rowspan]) { |
| 547 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}__thead--m-nested-column-header__tr--PaddingBlockStart); |
| 548 |
} |
| 549 |
} |
| 550 |
} |
| 551 |
} |
| 552 |
// stylelint-enable |
| 553 |
|
| 554 |
// - Table subhead |
| 555 |
.#{$table}__subhead { |
| 556 |
--#{$table}__sort__button__text--Color: var(--#{$table}__subhead--Color); |
| 557 |
|
| 558 |
color: var(--#{$table}__subhead--Color); |
| 559 |
} |
| 560 |
} |
| 561 |
|
| 562 |
// - Table tbody |
| 563 |
// stylelint-disable |
| 564 |
tbody:where(.#{$table}__tbody) { |
| 565 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}__tbody--cell--PaddingBlockStart); |
| 566 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}__tbody--cell--PaddingBlockEnd); |
| 567 |
--#{$table}--cell--FontSize: var(--#{$table}__tbody--cell--FontSize); |
| 568 |
|
| 569 |
> tr:where(.#{$table}__tr) > :where(th, td) { |
| 570 |
overflow-wrap: break-word; |
| 571 |
} |
| 572 |
} |
| 573 |
// stylelint-enable |
| 574 |
|
| 575 |
// REMOVE PADDING FOR SPECIAL CELLS THAT CONTAIN BUTTONS |
| 576 |
// ================================================================== |
| 577 |
// unset padding, button adds appropriate padding |
| 578 |
// unset padding for these cells as the button within provides padding |
| 579 |
// .#{$table}__compound-expansion-toggle { |
| 580 |
// &, |
| 581 |
// &:first-child, |
| 582 |
// &:last-child { |
| 583 |
// // explicitly reset padding rather than css variable, as the button within uses the variable |
| 584 |
// padding: 0; |
| 585 |
// } |
| 586 |
// } |
| 587 |
|
| 588 |
.#{$table}__td.pf-m-action { |
| 589 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}__td--m-action--PaddingBlockStart); |
| 590 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}__td--m-action--PaddingBlockEnd); |
| 591 |
} |
| 592 |
|
| 593 |
// - Table sort |
| 594 |
// set property here to increase specificity |
| 595 |
.#{$table}__sort { |
| 596 |
min-width: var(--#{$table}__sort--MinWidth); |
| 597 |
} |
| 598 |
|
| 599 |
:where(.#{$table}__th, .#{$table}__td) { |
| 600 |
&.pf-m-help { |
| 601 |
min-width: var(--#{$table}__th--m-help--MinWidth); |
| 602 |
} |
| 603 |
} |
| 604 |
|
| 605 |
// stylelint-disable selector-no-qualifying-type, selector-max-compound-selectors |
| 606 |
&.pf-m-no-border-rows > tbody:where(.#{$table}__tbody) { |
| 607 |
--#{$table}__tr--BorderBlockEndWidth: 0; |
| 608 |
--#{$table}__tbody--BorderBlockEndWidth: 0; |
| 609 |
--#{$table}--m-expandable__tbody--BorderBlockEndWidth: 0; |
| 610 |
--#{$table}__control-row--BorderBlockEndWidth: 0; |
| 611 |
|
| 612 |
> tr:where(.#{$table}__tr) { |
| 613 |
border-block-end: 0; |
| 614 |
} |
| 615 |
|
| 616 |
&:not(.pf-m-expanded) .#{$table}__compound-expansion-toggle .#{$table}__button::before { |
| 617 |
display: none; |
| 618 |
} |
| 619 |
} |
| 620 |
|
| 621 |
tr.pf-m-clickable:last-child { |
| 622 |
border-block-end-color: transparent; |
| 623 |
} |
| 624 |
|
| 625 |
// - Table tr clickable |
| 626 |
tr:where(.#{$table}__tr) { |
| 627 |
&.pf-m-clickable { |
| 628 |
cursor: pointer; |
| 629 |
outline-offset: var(--#{$table}__tr--m-clickable--OutlineOffset); |
| 630 |
background-color: var(--#{$table}__tr--m-clickable--BackgroundColor); |
| 631 |
|
| 632 |
&:is(:hover, :focus) { |
| 633 |
--#{$table}__tr--m-clickable--BackgroundColor: var(--#{$table}__tr--m-clickable--hover--BackgroundColor); |
| 634 |
} |
| 635 |
} |
| 636 |
|
| 637 |
// tr selected |
| 638 |
&.pf-m-selected { |
| 639 |
position: relative; |
| 640 |
outline-offset: var(--#{$table}__tr--m-selected--OutlineOffset); |
| 641 |
background-color: var(--#{$table}__tr--m-selected--BackgroundColor); |
| 642 |
} |
| 643 |
|
| 644 |
&.pf-m-first-cell-offset-reset > :first-child { |
| 645 |
padding-inline-start: var(--#{$table}__tr--m-first-cell-offset-reset--cell--PaddingInlineStart); |
| 646 |
} |
| 647 |
} |
| 648 |
|
| 649 |
// - Table tbody clickable |
| 650 |
// stylelint-disable no-duplicate-selectors |
| 651 |
tbody:where(.#{$table}__tbody) { |
| 652 |
&.pf-m-clickable { |
| 653 |
cursor: pointer; |
| 654 |
outline-offset: var(--#{$table}__tbody--m-clickable--OutlineOffset); |
| 655 |
background-color: var(--#{$table}__tbody--m-clickable--BackgroundColor); |
| 656 |
|
| 657 |
&:is(:hover, :focus) { |
| 658 |
--#{$table}__tbody--m-clickable--BackgroundColor: var(--#{$table}__tbody--m-clickable--hover--BackgroundColor); |
| 659 |
} |
| 660 |
|
| 661 |
&.pf-m-expanded { |
| 662 |
--#{$table}__tbody--m-clickable--BackgroundColor: var(--#{$table}__tbody--m-clickable--m-expanded--BackgroundColor); |
| 663 |
} |
| 664 |
} |
| 665 |
|
| 666 |
// - Table tbody expanded |
| 667 |
&.pf-m-selected { |
| 668 |
outline-offset: var(--#{$table}__tbody--m-selected--OutlineOffset); |
| 669 |
background-color: var(--#{$table}__tbody--m-selected--BackgroundColor); |
| 670 |
|
| 671 |
.#{$table}__tr.pf-m-expanded:not(.#{$table}__expandable-row) { |
| 672 |
border: none; |
| 673 |
} |
| 674 |
} |
| 675 |
} |
| 676 |
|
| 677 |
&.pf-m-drag-over { |
| 678 |
overflow-anchor: none; |
| 679 |
} |
| 680 |
|
| 681 |
// - Table table |
| 682 |
.#{$table}{ |
| 683 |
background-color: transparent; |
| 684 |
|
| 685 |
&, |
| 686 |
:is(.#{$table}__tbody, .#{$table}__tr:last-child) { |
| 687 |
border-block-end: 0; |
| 688 |
} |
| 689 |
} |
| 690 |
|
| 691 |
.#{$button} .#{$table}__sort-indicator { |
| 692 |
--#{$table}__sort-indicator--MarginInlineStart: 0; |
| 693 |
} |
| 694 |
|
| 695 |
// stylelint-disable max-nesting-depth, selector-max-class |
| 696 |
&.pf-m-animate-expand { |
| 697 |
> .#{$table}__tbody { |
| 698 |
&.pf-m-expanded { |
| 699 |
> .#{$table}__control-row { |
| 700 |
border-block-end: 0; |
| 701 |
} |
| 702 |
} |
| 703 |
|
| 704 |
> .#{$table}__expandable-row { |
| 705 |
display: var(--#{$table}__expandable-row--Display, revert); |
| 706 |
visibility: hidden; |
| 707 |
opacity: var(--#{$table}__expandable-row--Opacity); |
| 708 |
translate: 0 var(--#{$table}__expandable-row--TranslateY); |
| 709 |
transition-delay: 0s, 0s, var(--#{$table}__expandable-row--TransitionDuration--collapse--fade), var(--#{$table}__expandable-row--TransitionDuration--collapse--fade); |
| 710 |
transition-timing-function: var(--#{$table}__expandable-row--TransitionTimingFunction); |
| 711 |
transition-duration: var(--#{$table}__expandable-row--TransitionDuration--collapse--fade), var(--#{$table}__expandable-row--TransitionDuration--collapse--slide), 0s, 0s; |
| 712 |
transition-property: opacity, translate, visibility, background-color; |
| 713 |
|
| 714 |
&[hidden] { |
| 715 |
display: var(--#{$table}__expandable-row--Display, revert); |
| 716 |
} |
| 717 |
|
| 718 |
&.pf-m-expanded { |
| 719 |
visibility: visible; |
| 720 |
opacity: var(--#{$table}__tbody--m-expanded__expandable-row--Opacity); |
| 721 |
translate: 0 var(--#{$table}__tbody--m-expanded__expandable-row--TranslateY); |
| 722 |
transition-delay: 0s; |
| 723 |
transition-duration: var(--#{$table}__expandable-row--TransitionDuration--expand--fade), var(--#{$table}__expandable-row--TransitionDuration--expand--slide), 0s, 0s; |
| 724 |
|
| 725 |
> :is(.#{$table}__td, .#{$table}__th) { |
| 726 |
> .#{$table}__expandable-row-content { |
| 727 |
max-height: 99999px; |
| 728 |
} |
| 729 |
} |
| 730 |
} |
| 731 |
|
| 732 |
&:not(.pf-m-expanded) { |
| 733 |
> :is(.#{$table}__td, .#{$table}__th) { |
| 734 |
&, |
| 735 |
> .#{$table}__expandable-row-content { |
| 736 |
padding: 0; |
| 737 |
overflow: hidden; |
| 738 |
transition-delay: var(--#{$table}__expandable-row--TransitionDuration--collapse--fade); |
| 739 |
transition-property: padding, max-height, overflow; |
| 740 |
} |
| 741 |
|
| 742 |
> .#{$table}__expandable-row-content { |
| 743 |
max-height: 0; |
| 744 |
} |
| 745 |
} |
| 746 |
} |
| 747 |
} |
| 748 |
|
| 749 |
> .#{$table}__tr:has(~ .#{$table}__expandable-row) { |
| 750 |
border-block-end: 0; |
| 751 |
} |
| 752 |
|
| 753 |
> .#{$table}__control-row.pf-m-no-animate-expand ~ .#{$table}__expandable-row { |
| 754 |
--#{$table}__expandable-row--TransitionDuration--collapse--fade: 0s; |
| 755 |
--#{$table}__expandable-row--TransitionDuration--collapse--slide: 0s; |
| 756 |
--#{$table}__expandable-row--TransitionDuration--expand--fade: 0s; |
| 757 |
--#{$table}__expandable-row--TransitionDuration--expand--slide: 0s; |
| 758 |
} |
| 759 |
} |
| 760 |
} |
| 761 |
// stylelint-enable |
| 762 |
} |
| 763 |
|
| 764 |
// - Table truncate - Table wrap - Table nowrap - Table fit content - Table wrap - Table break word |
| 765 |
[class*='#{$table}'] { |
| 766 |
&.pf-m-truncate { |
| 767 |
--#{$table}--cell--MinWidth: var(--#{$table}--m-truncate--cell--MinWidth); |
| 768 |
--#{$table}--cell--MaxWidth: var(--#{$table}--m-truncate--cell--MaxWidth); |
| 769 |
--#{$table}--cell--Overflow: hidden; |
| 770 |
--#{$table}--cell--TextOverflow: ellipsis; |
| 771 |
--#{$table}--cell--WhiteSpace: nowrap; |
| 772 |
} |
| 773 |
|
| 774 |
&.pf-m-wrap { |
| 775 |
--#{$table}--cell--MinWidth: 0; |
| 776 |
--#{$table}--cell--MaxWidth: none; |
| 777 |
--#{$table}--cell--Overflow: visible; |
| 778 |
--#{$table}--cell--TextOverflow: clip; |
| 779 |
--#{$table}--cell--WhiteSpace: normal; |
| 780 |
} |
| 781 |
|
| 782 |
&.pf-m-nowrap { |
| 783 |
--#{$table}--cell--MinWidth: 0; |
| 784 |
--#{$table}--cell--MaxWidth: none; |
| 785 |
--#{$table}--cell--Overflow: visible; |
| 786 |
--#{$table}--cell--TextOverflow: clip; |
| 787 |
--#{$table}--cell--WhiteSpace: nowrap; |
| 788 |
} |
| 789 |
|
| 790 |
.#{$table}__icon, |
| 791 |
&.pf-m-fit-content { |
| 792 |
--#{$table}--cell--MinWidth: fit-content; |
| 793 |
--#{$table}--cell--MaxWidth: none; |
| 794 |
--#{$table}--cell--Width: 1%; |
| 795 |
--#{$table}--cell--Overflow: visible; |
| 796 |
--#{$table}--cell--TextOverflow: clip; |
| 797 |
--#{$table}--cell--WhiteSpace: nowrap; |
| 798 |
} |
| 799 |
|
| 800 |
&.pf-m-break-word { |
| 801 |
--#{$table}--cell--WordBreak: break-word; |
| 802 |
--#{$table}--cell--WhiteSpace: normal; |
| 803 |
} |
| 804 |
} |
| 805 |
|
| 806 |
// - Table text |
| 807 |
.#{$table}__text { |
| 808 |
position: relative; |
| 809 |
display: block; |
| 810 |
width: var(--#{$table}--cell--Width); |
| 811 |
min-width: var(--#{$table}__text--MinWidth); |
| 812 |
max-width: var(--#{$table}--cell--MaxWidth); |
| 813 |
overflow: var(--#{$table}--cell--Overflow); |
| 814 |
text-overflow: var(--#{$table}--cell--TextOverflow); |
| 815 |
line-height: var(--#{$table}--cell--LineHeight); |
| 816 |
word-break: var(--#{$table}--cell--WordBreak); |
| 817 |
white-space: var(--#{$table}--cell--WhiteSpace); |
| 818 |
|
| 819 |
// Only apply these settings if specifically modified |
| 820 |
&.pf-m-truncate { |
| 821 |
--#{$table}--cell--MinWidth: 100%; |
| 822 |
|
| 823 |
min-width: max(var(--#{$table}__text--m-truncate--MinWidth), var(--#{$table}__text--MinWidth)); |
| 824 |
|
| 825 |
> :where(th, td) { |
| 826 |
overflow: var(--#{$table}--cell--Overflow); |
| 827 |
text-overflow: var(--#{$table}--cell--TextOverflow); |
| 828 |
white-space: var(--#{$table}--cell--WhiteSpace); |
| 829 |
} |
| 830 |
} |
| 831 |
} |
| 832 |
|
| 833 |
// - Table button |
| 834 |
.#{$table}__button { |
| 835 |
position: relative; |
| 836 |
width: auto; |
| 837 |
padding-block-start: var(--#{$table}__button--PaddingBlockStart); |
| 838 |
padding-block-end: var(--#{$table}__button--PaddingBlockEnd); |
| 839 |
padding-inline-start: var(--#{$table}__button--PaddingInlineStart); |
| 840 |
padding-inline-end: var(--#{$table}__button--PaddingInlineEnd); |
| 841 |
margin-block-end: calc(var(--#{$table}__button--PaddingBlockEnd) * -1); |
| 842 |
margin-inline-start: calc(var(--#{$table}__button--PaddingInlineStart) * -1); |
| 843 |
font-size: inherit; |
| 844 |
font-weight: inherit; |
| 845 |
color: var(--#{$table}__button--Color); |
| 846 |
text-align: start; |
| 847 |
white-space: inherit; |
| 848 |
user-select: text; |
| 849 |
outline-offset: var(--#{$table}__button--OutlineOffset); |
| 850 |
background-color: var(--#{$table}__button--BackgroundColor); |
| 851 |
border: 0; |
| 852 |
border-radius: var(--#{$table}__button--BorderRadius); |
| 853 |
|
| 854 |
&::after { |
| 855 |
position: absolute; |
| 856 |
inset: 0; |
| 857 |
pointer-events: none; |
| 858 |
content: ''; |
| 859 |
border: var(--#{$table}__button--BorderWidth) solid var(--#{$table}__button--BorderColor); |
| 860 |
border-radius: inherit; |
| 861 |
} |
| 862 |
|
| 863 |
// Table table table button |
| 864 |
.#{$table} .#{$table} & { |
| 865 |
margin-block-end: 0; // remove offset in nested tables |
| 866 |
} |
| 867 |
|
| 868 |
&:is(:hover, :focus) { |
| 869 |
color: var(--#{$table}__button--hover--Color); |
| 870 |
} |
| 871 |
} |
| 872 |
|
| 873 |
// - Table sort - Table compound expansion toggle |
| 874 |
.#{$table}__sort, |
| 875 |
.#{$table}__compound-expansion-toggle { |
| 876 |
// Pass properties to text |
| 877 |
.#{$table}__text { |
| 878 |
display: block; |
| 879 |
width: auto; |
| 880 |
overflow: var(--#{$table}--cell--Overflow); |
| 881 |
text-overflow: var(--#{$table}--cell--TextOverflow); |
| 882 |
white-space: var(--#{$table}--cell--WhiteSpace); |
| 883 |
} |
| 884 |
} |
| 885 |
|
| 886 |
// - Table button content - Table column help |
| 887 |
// display grid for buttons is not supported |
| 888 |
.#{$table}__button-content, |
| 889 |
.#{$table}__column-help { |
| 890 |
display: inline-grid; |
| 891 |
grid-template-columns: auto max-content; |
| 892 |
align-items: last baseline; |
| 893 |
justify-content: start; |
| 894 |
|
| 895 |
.#{$table}__text { |
| 896 |
min-width: auto; |
| 897 |
max-width: 100%; |
| 898 |
} |
| 899 |
|
| 900 |
.#{$table} thead:where(.#{$table}__thead).pf-m-nowrap &, |
| 901 |
.#{$table} tr:where(.#{$table}__tr).pf-m-nowrap &, |
| 902 |
.#{$table} th:where(.#{$table}__th).pf-m-nowrap & { |
| 903 |
grid-template-columns: min-content max-content; |
| 904 |
} |
| 905 |
|
| 906 |
.#{$table} thead:where(.#{$table}__thead).pf-m-fit-content &, |
| 907 |
.#{$table} tr:where(.#{$table}__tr).pf-m-fit-content &, |
| 908 |
.#{$table} th:where(.#{$table}__th).pf-m-fit-content & { |
| 909 |
grid-template-columns: fit-content max-content; |
| 910 |
} |
| 911 |
|
| 912 |
.#{$table} thead:where(.#{$table}__thead).pf-m-wrap &, |
| 913 |
.#{$table} tr:where(.#{$table}__tr).pf-m-wrap &, |
| 914 |
.#{$table} th:where(.#{$table}__th).pf-m-wrap &, |
| 915 |
.#{$table} thead:where(.#{$table}__thead).pf-m-truncate &, |
| 916 |
.#{$table} tr:where(.#{$table}__tr).pf-m-truncate &, |
| 917 |
.#{$table} th:where(.#{$table}__th).pf-m-truncate & { |
| 918 |
grid-template-columns: auto max-content; |
| 919 |
} |
| 920 |
} |
| 921 |
|
| 922 |
// stylelint-disable |
| 923 |
// - Table check - Table toggle - Table action - Table favorite - Table inline-edit-action - Table draggable |
| 924 |
.#{$table} .#{$table}__check, |
| 925 |
.#{$table} .#{$table}__toggle, |
| 926 |
.#{$table} .#{$table}__action, |
| 927 |
.#{$table} .#{$table}__inline-edit-action, |
| 928 |
.#{$table} .#{$table}__draggable { |
| 929 |
--#{$table}--cell--MinWidth: 0; |
| 930 |
--#{$table}--cell--Width: 1%; |
| 931 |
|
| 932 |
max-width: none; |
| 933 |
} |
| 934 |
// stylelint-enable |
| 935 |
|
| 936 |
.#{$table} .#{$table}__favorite { |
| 937 |
--#{$table}--cell--MaxWidth: auto; |
| 938 |
} |
| 939 |
|
| 940 |
// - Table toggle |
| 941 |
.#{$table}__toggle { |
| 942 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}__toggle--PaddingBlockStart); |
| 943 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}__toggle--PaddingBlockEnd); |
| 944 |
--#{$table}--cell--PaddingInlineStart: var(--#{$table}__toggle--PaddingInlineStart); |
| 945 |
--#{$table}--cell--PaddingInlineEnd: var(--#{$table}__toggle--PaddingInlineEnd); |
| 946 |
|
| 947 |
@at-root .#{$table}__thead & { |
| 948 |
.#{$button} { |
| 949 |
margin-block-start: calc(var(--#{$button}--PaddingBlockStart) * -1); |
| 950 |
margin-block-end: calc(var(--#{$button}--PaddingBlockEnd) * -1); |
| 951 |
line-height: 1lh; // set line-height instead of --LineHeight to avoid breaking the min-width calc for plain buttons |
| 952 |
} |
| 953 |
} |
| 954 |
|
| 955 |
.#{$button} { |
| 956 |
&.pf-m-expanded .#{$table}__toggle-icon { |
| 957 |
transform: rotate(var(--#{$table}__toggle--c-button--m-expanded__toggle-icon--Rotate)); |
| 958 |
} |
| 959 |
} |
| 960 |
|
| 961 |
.#{$table}__toggle-icon { |
| 962 |
@include pf-v6-mirror-inline-on-rtl; |
| 963 |
|
| 964 |
transform: rotate(var(--#{$table}__toggle--c-button__toggle-icon--Rotate)); |
| 965 |
transition-timing-function: var(--#{$table}__toggle--c-button__toggle-icon--TransitionTimingFunction); |
| 966 |
transition-duration: var(--#{$table}__toggle--c-button__toggle-icon--TransitionDuration); |
| 967 |
transition-property: transform; |
| 968 |
} |
| 969 |
|
| 970 |
svg { |
| 971 |
pointer-events: none; |
| 972 |
} |
| 973 |
} |
| 974 |
|
| 975 |
// - Table check |
| 976 |
.#{$table}__check { |
| 977 |
--#{$table}--cell--PaddingInlineStart: var(--#{$table}__check--PaddingInlineStart); |
| 978 |
--#{$table}--cell--PaddingInlineEnd: var(--#{$table}__check--PaddingInlineEnd); |
| 979 |
|
| 980 |
vertical-align: top; |
| 981 |
|
| 982 |
.#{$check} { |
| 983 |
--#{$check}__label--FontSize: var(--#{$table}--cell--FontSize); |
| 984 |
--#{$check}__label--LineHeight: var(--#{$table}--cell--LineHeight); |
| 985 |
} |
| 986 |
|
| 987 |
.#{$radio} { |
| 988 |
--#{$radio}__label--FontSize: var(--#{$table}--cell--FontSize); |
| 989 |
--#{$radio}__label--LineHeight: var(--#{$table}--cell--LineHeight); |
| 990 |
} |
| 991 |
|
| 992 |
thead & { |
| 993 |
vertical-align: bottom; |
| 994 |
} |
| 995 |
|
| 996 |
.#{$check}.pf-m-standalone, |
| 997 |
.#{$radio}.pf-m-standalone { |
| 998 |
thead & { |
| 999 |
display: table-cell; |
| 1000 |
height: auto; |
| 1001 |
line-height: 1; |
| 1002 |
vertical-align: baseline; |
| 1003 |
} |
| 1004 |
} |
| 1005 |
} |
| 1006 |
|
| 1007 |
// - Table favorite |
| 1008 |
// TODO in breaking change - remove button styling here that is taken care of by favorite button now |
| 1009 |
.#{$table}__favorite { |
| 1010 |
.#{$button}:not(.pf-m-favorite) { |
| 1011 |
--#{$button}--FontSize: var(--#{$table}__favorite--c-button--FontSize); |
| 1012 |
} |
| 1013 |
|
| 1014 |
&.pf-m-favorited .#{$button}:not(.pf-m-favorited) { |
| 1015 |
--#{$button}--m-plain__icon--Color: var(--#{$table}__favorite--m-favorited--c-button--Color); |
| 1016 |
|
| 1017 |
&:is(:hover, :focus) { |
| 1018 |
--#{$button}--hover__icon--Color: var(--#{$table}__favorite--m-favorited--c-button--Color); |
| 1019 |
} |
| 1020 |
} |
| 1021 |
} |
| 1022 |
|
| 1023 |
// - Table draggable |
| 1024 |
.#{$table}__draggable { |
| 1025 |
.#{$button} { |
| 1026 |
cursor: grab; |
| 1027 |
|
| 1028 |
&:active { |
| 1029 |
cursor: grabbing; |
| 1030 |
} |
| 1031 |
} |
| 1032 |
} |
| 1033 |
|
| 1034 |
// - Table action - Table favorite - Table inline edit action - Table draggable |
| 1035 |
.#{$table}__action, |
| 1036 |
.#{$table}__favorite, |
| 1037 |
.#{$table}__inline-edit-action, |
| 1038 |
.#{$table}__draggable { |
| 1039 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}__action--PaddingBlockStart); |
| 1040 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}__action--PaddingBlockEnd); |
| 1041 |
--#{$table}--cell--PaddingInlineStart: var(--#{$table}__action--PaddingInlineStart); |
| 1042 |
--#{$table}--cell--PaddingInlineEnd: var(--#{$table}__action--PaddingInlineEnd); |
| 1043 |
} |
| 1044 |
|
| 1045 |
// - Table action - Table inline edit action |
| 1046 |
.#{$table}__action, |
| 1047 |
.#{$table}__inline-edit-action { |
| 1048 |
&:last-child { |
| 1049 |
text-align: end; |
| 1050 |
} |
| 1051 |
} |
| 1052 |
|
| 1053 |
// - Table compound expansion toggle |
| 1054 |
.#{$table}__compound-expansion-toggle { |
| 1055 |
--#{$table}__button--Color: var(--#{$table}__compound-expansion-toggle__button--Color); |
| 1056 |
--#{$table}__button--hover--Color: var(--#{$table}__compound-expansion-toggle__button--hover--Color); |
| 1057 |
|
| 1058 |
position: relative; |
| 1059 |
padding: 0; |
| 1060 |
background-color: var(--#{$table}__compound-expansion-toggle__button--BackgroundColor); |
| 1061 |
|
| 1062 |
// show left border, use __text to truncate content |
| 1063 |
&.pf-m-truncate { |
| 1064 |
overflow: visible; |
| 1065 |
} |
| 1066 |
|
| 1067 |
.#{$table}__button { |
| 1068 |
position: static; |
| 1069 |
min-width: 100%; |
| 1070 |
padding: 0; |
| 1071 |
margin: 0; |
| 1072 |
overflow: hidden; |
| 1073 |
|
| 1074 |
// Remove outline and apply to parent td |
| 1075 |
&:is(:hover, :focus) { |
| 1076 |
outline: 0; |
| 1077 |
} |
| 1078 |
} |
| 1079 |
|
| 1080 |
// Apply borders to button to avoid conflicts with expanded states |
| 1081 |
.#{$table}__button::after { |
| 1082 |
position: absolute; |
| 1083 |
inset: 0; |
| 1084 |
content: ''; |
| 1085 |
border: 0; |
| 1086 |
border-block-start: var(--#{$table}__compound-expansion-toggle__button--after--BorderBlockStartWidth) solid var(--#{$table}__compound-expansion-toggle__button--after--BorderColor); |
| 1087 |
border-radius: var(--#{$table}__compound-expansion-toggle__button--after--BorderRadius); |
| 1088 |
} |
| 1089 |
|
| 1090 |
&:hover, |
| 1091 |
&:focus-within { |
| 1092 |
--#{$table}__compound-expansion-toggle__button--BackgroundColor: var(--#{$table}__compound-expansion-toggle__button--hover--BackgroundColor); |
| 1093 |
--#{$table}__compound-expansion-toggle__button--after--BorderBlockStartWidth: var(--#{$table}__compound-expansion-toggle__button--hover--after--BorderBlockStartWidth); |
| 1094 |
} |
| 1095 |
|
| 1096 |
&.pf-m-expanded { |
| 1097 |
--#{$table}__compound-expansion-toggle__button--BackgroundColor: var(--#{$table}__compound-expansion-toggle__button--expanded--BackgroundColor); |
| 1098 |
--#{$table}__compound-expansion-toggle__button--after--BorderBlockStartWidth: var(--#{$table}__compound-expansion-toggle--m-expanded__button--after--BorderBlockStartWidth); |
| 1099 |
} |
| 1100 |
|
| 1101 |
&:focus-within { |
| 1102 |
outline-offset: var(--#{$table}__button--OutlineOffset); |
| 1103 |
|
| 1104 |
// stylelint-disable media-feature-name-no-vendor-prefix |
| 1105 |
@media (-webkit-min-device-pixel-ratio: 0) { |
| 1106 |
outline-style: auto; |
| 1107 |
outline-color: -webkit-focus-ring-color; |
| 1108 |
} |
| 1109 |
// stylelint-enable |
| 1110 |
} |
| 1111 |
} |
| 1112 |
|
| 1113 |
// - Table column help action |
| 1114 |
.#{$table}__column-help-action { |
| 1115 |
align-self: last baseline; |
| 1116 |
margin-inline-start: var(--#{$table}__column-help--MarginInlineStart); |
| 1117 |
|
| 1118 |
.#{$button} { |
| 1119 |
line-height: 1lh; // set line-height instead of --LineHeight to avoid breaking the min-width calc for plain buttons |
| 1120 |
} |
| 1121 |
} |
| 1122 |
|
| 1123 |
// - Table sort |
| 1124 |
.#{$table}__sort { |
| 1125 |
vertical-align: bottom; |
| 1126 |
|
| 1127 |
// - Table button |
| 1128 |
.#{$table}__button { |
| 1129 |
&:is(:hover, :focus) { |
| 1130 |
--#{$table}__sort-indicator--Color: var(--#{$table}__sort__button--hover__sort-indicator--Color); |
| 1131 |
--#{$table}__sort__button__text--Color: var(--#{$table}__sort__button--hover__text--Color); |
| 1132 |
--#{$table}__button--BackgroundColor: var(--#{$table}__button--hover--BackgroundColor); |
| 1133 |
--#{$table}__button--BorderWidth: var(--#{$table}__button--hover--BorderWidth); |
| 1134 |
} |
| 1135 |
|
| 1136 |
// - Table text |
| 1137 |
.#{$table}__text { |
| 1138 |
color: var(--#{$table}__sort__button__text--Color); |
| 1139 |
} |
| 1140 |
} |
| 1141 |
|
| 1142 |
&.pf-m-selected .#{$table}__button, |
| 1143 |
&.pf-m-selected .#{$button} { |
| 1144 |
--#{$table}__sort-indicator--Color: var(--#{$table}__sort--m-selected__sort-indicator--Color); |
| 1145 |
|
| 1146 |
// override state colors on text |
| 1147 |
.#{$table}__text { |
| 1148 |
color: var(--#{$table}__sort--m-selected__button--Color); |
| 1149 |
} |
| 1150 |
} |
| 1151 |
|
| 1152 |
&.pf-m-help { |
| 1153 |
--#{$table}__th--m-help--MinWidth: var(--#{$table}__sort--m-help--MinWidth); |
| 1154 |
} |
| 1155 |
|
| 1156 |
&.pf-m-favorite { |
| 1157 |
.#{$table}__text { |
| 1158 |
font-size: var(--#{$table}__favorite--c-button--FontSize); |
| 1159 |
} |
| 1160 |
} |
| 1161 |
} |
| 1162 |
|
| 1163 |
// - Table sort indicator |
| 1164 |
.#{$table}__sort-indicator { |
| 1165 |
grid-column: 2; |
| 1166 |
align-self: end; |
| 1167 |
margin-inline-start: var(--#{$table}__sort-indicator--MarginInlineStart); // TODO: update this to gap |
| 1168 |
color: var(--#{$table}__sort-indicator--Color); |
| 1169 |
pointer-events: none; |
| 1170 |
} |
| 1171 |
|
| 1172 |
// - Table expandable row |
| 1173 |
.#{$table}__expandable-row { |
| 1174 |
position: relative; |
| 1175 |
border-block-end: 0 solid transparent; |
| 1176 |
|
| 1177 |
// remove top padding from expandable row cells by default |
| 1178 |
:not(.#{$table}__control-row) ~ & { |
| 1179 |
> .#{$table}__th, |
| 1180 |
> .#{$table}__td { |
| 1181 |
padding-block-start: 0; |
| 1182 |
} |
| 1183 |
} |
| 1184 |
|
| 1185 |
// add back padding for compound expandable |
| 1186 |
.#{$table}__control-row ~ &.pf-m-expanded { |
| 1187 |
> :is(.#{$table}__th, .#{$table}__td):not(.pf-m-no-padding) { |
| 1188 |
padding-block-start: var(--#{$table}--cell--PaddingBlockStart); |
| 1189 |
} |
| 1190 |
} |
| 1191 |
|
| 1192 |
td:where(.#{$table}__td), |
| 1193 |
th:where(.#{$table}__th) { |
| 1194 |
&.pf-m-no-padding { |
| 1195 |
padding-block-start: 0; |
| 1196 |
padding-block-end: 0; |
| 1197 |
padding-inline-start: 0; |
| 1198 |
padding-inline-end: 0; |
| 1199 |
|
| 1200 |
.#{$table}__expandable-row-content { |
| 1201 |
padding: 0; |
| 1202 |
border-radius: 0; |
| 1203 |
} |
| 1204 |
} |
| 1205 |
} |
| 1206 |
|
| 1207 |
// - Table expandable row content |
| 1208 |
.#{$table}__expandable-row-content { |
| 1209 |
position: relative; |
| 1210 |
padding-block-start: var(--#{$table}__expandable-row-content--PaddingBlockStart); |
| 1211 |
padding-block-end: var(--#{$table}__expandable-row-content--PaddingBlockEnd); |
| 1212 |
padding-inline-start: var(--#{$table}__expandable-row-content--PaddingInlineStart); |
| 1213 |
padding-inline-end: var(--#{$table}__expandable-row-content--PaddingInlineEnd); |
| 1214 |
background-color: var(--#{$table}__expandable-row-content--BackgroundColor); |
| 1215 |
border: 0; |
| 1216 |
border-radius: var(--#{$table}__expandable-row-content--BorderRadius); |
| 1217 |
|
| 1218 |
&.pf-m-no-background { |
| 1219 |
background-color: transparent; |
| 1220 |
} |
| 1221 |
} |
| 1222 |
|
| 1223 |
.#{$table}__td:not(.pf-m-no-padding) > .#{$table}__expandable-row-content::after { |
| 1224 |
position: absolute; |
| 1225 |
inset: 0; |
| 1226 |
pointer-events: none; |
| 1227 |
content: ""; |
| 1228 |
border: var(--#{$table}__expandable-row-content--BorderWidth) solid var(--#{$table}__expandable-row-content--BorderColor); |
| 1229 |
border-radius: inherit; |
| 1230 |
} |
| 1231 |
|
| 1232 |
|
| 1233 |
// - Table expandable row content expanded |
| 1234 |
&.pf-m-expanded { |
| 1235 |
border-block-end-color: var(--#{$table}__expandable-row--m-expanded--BorderBlockEndColor); |
| 1236 |
border-block-end-width: var(--#{$table}--border-width--base); |
| 1237 |
} |
| 1238 |
|
| 1239 |
&:not(.pf-m-expanded) { |
| 1240 |
display: none; |
| 1241 |
} |
| 1242 |
|
| 1243 |
// - Table expandable row tr last-child |
| 1244 |
tr:last-child { |
| 1245 |
border-block-end: 0; |
| 1246 |
} |
| 1247 |
} |
| 1248 |
|
| 1249 |
// - Table compact |
| 1250 |
.#{$table}.pf-m-compact { |
| 1251 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}--m-compact--cell--PaddingBlockStart); |
| 1252 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}--m-compact--cell--PaddingBlockEnd); |
| 1253 |
|
| 1254 |
// - Table compact table tr |
| 1255 |
tr:where(.#{$table}__tr) { |
| 1256 |
&:not(.#{$table}__expandable-row) { |
| 1257 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}--m-compact--cell--PaddingBlockStart); |
| 1258 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}--m-compact--cell--PaddingBlockEnd); |
| 1259 |
} |
| 1260 |
} |
| 1261 |
|
| 1262 |
// - Table compact thead |
| 1263 |
thead:where(.#{$table}__thead) { |
| 1264 |
th:where(.#{$table}__th), |
| 1265 |
.#{$table}__toggle { |
| 1266 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}--m-compact__th--PaddingBlockStart); |
| 1267 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}--m-compact__th--PaddingBlockEnd); |
| 1268 |
} |
| 1269 |
} |
| 1270 |
|
| 1271 |
.#{$table}__action, |
| 1272 |
.#{$table}__favorite, |
| 1273 |
.#{$table}__toggle, |
| 1274 |
.#{$table}__draggable { |
| 1275 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}--m-compact__action--PaddingBlockStart); |
| 1276 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}--m-compact__action--PaddingBlockEnd); |
| 1277 |
} |
| 1278 |
|
| 1279 |
.#{$table}__td.pf-m-action { |
| 1280 |
--#{$table}--cell--PaddingBlockStart: var(--#{$table}--m-compact__td--m-action--PaddingBlockStart); |
| 1281 |
--#{$table}--cell--PaddingBlockEnd: var(--#{$table}--m-compact__td--m-action--PaddingBlockEnd); |
| 1282 |
} |
| 1283 |
|
| 1284 |
.#{$table}__icon { |
| 1285 |
width: auto; |
| 1286 |
min-width: 0; |
| 1287 |
text-align: center; |
| 1288 |
} |
| 1289 |
} |
| 1290 |
|
| 1291 |
// - Table thead |
| 1292 |
.#{$table}__thead { |
| 1293 |
--#{$table}__tr--BorderBlockEndWidth: 0; |
| 1294 |
--#{$table}__toggle--PaddingBlockStart: var(--#{$table}__thead__toggle--PaddingBlockStart); |
| 1295 |
--#{$table}__toggle--PaddingBlockEnd: var(--#{$table}__thead__toggle--PaddingBlockEnd); |
| 1296 |
|
| 1297 |
vertical-align: bottom; |
| 1298 |
|
| 1299 |
// - Table nested column header button |
| 1300 |
&.pf-m-nested-column-header { |
| 1301 |
--#{$table}--m-sticky-header--BorderBlockEndWidth: 0; |
| 1302 |
|
| 1303 |
position: relative; |
| 1304 |
|
| 1305 |
.#{$table}__tr:last-child:not(.pf-m-border-row) { |
| 1306 |
z-index: var(--#{$table}__thead--m-nested-column-header--after--ZIndex); |
| 1307 |
border-block-end: var(--#{$table}__thead--m-nested-column-header--BorderBlockEndWidth) solid var(--#{$table}__thead--m-nested-column-header--BorderBlockEndColor); |
| 1308 |
} |
| 1309 |
|
| 1310 |
.#{$table}__button { |
| 1311 |
--#{$table}__button--PaddingInlineStart: var(--#{$table}__nested-column-header__button--PaddingInlineStart); |
| 1312 |
--#{$table}__button--PaddingInlineEnd: var(--#{$table}__nested-column-header__button--PaddingInlineEnd); |
| 1313 |
|
| 1314 |
// margin to align with thead padding |
| 1315 |
margin-inline-end: calc(var(--#{$table}__button--PaddingInlineStart) * -1); |
| 1316 |
} |
| 1317 |
} |
| 1318 |
} |
| 1319 |
|
| 1320 |
// - Table tbody |
| 1321 |
.#{$table}__tbody { |
| 1322 |
vertical-align: top; |
| 1323 |
|
| 1324 |
// TODO: make this a class `compound expansion content` |
| 1325 |
.#{$table}__control-row ~ .#{$table}__expandable-row.pf-m-expanded { |
| 1326 |
--#{$table}__expandable-row-content--BorderWidth: var(--#{$table}--compound-expansion--m-expanded--BorderWidth); |
| 1327 |
|
| 1328 |
background-color: var(--#{$table}--compound-expansion--m-expanded--BackgroundColor); |
| 1329 |
} |
| 1330 |
} |
| 1331 |
|
| 1332 |
// Table table tbody expandable |
| 1333 |
.#{$table}.pf-m-expandable { |
| 1334 |
.#{$table}__tr.pf-m-expanded { |
| 1335 |
border-block-end: 0; |
| 1336 |
} |
| 1337 |
|
| 1338 |
// - Table tbody |
| 1339 |
.#{$table}__tbody { |
| 1340 |
border-block-end: var(--#{$table}__tr--BorderBlockEndWidth) solid var(--#{$table}__tr--BorderBlockEndColor); |
| 1341 |
} |
| 1342 |
|
| 1343 |
// - Table tbody - Table tr |
| 1344 |
.#{$table}__tbody.pf-m-expanded { |
| 1345 |
border-block-end: var(--#{$table}__tr--BorderBlockEndWidth) solid var(--#{$table}__tr--BorderBlockEndColor); |
| 1346 |
|
| 1347 |
// - Table tbody table control row |
| 1348 |
.#{$table}__control-row { |
| 1349 |
background-color: var(--#{$table}__control-row--BackgroundColor); |
| 1350 |
border-block-end: var(--#{$table}__control-row--BorderBlockEndWidth) solid var(--#{$table}__control-row__tbody--BorderBlockEndColor); |
| 1351 |
|
| 1352 |
// stylelint-disable max-nesting-depth, selector-max-class |
| 1353 |
&.pf-m-expanded { |
| 1354 |
border-block-end: 0; // TODO this is a dupe of the block above, consolidate in a breaking change |
| 1355 |
} |
| 1356 |
// stylelint-enable |
| 1357 |
} |
| 1358 |
} |
| 1359 |
} |
| 1360 |
|
| 1361 |
// - Table tr |
| 1362 |
.#{$table}__tr { |
| 1363 |
border-block-end: var(--#{$table}__tr--BorderBlockEndWidth) solid var(--#{$table}__tr--BorderBlockEndColor); |
| 1364 |
|
| 1365 |
.#{$table}__thead & { |
| 1366 |
border-block-end: 0; |
| 1367 |
} |
| 1368 |
|
| 1369 |
&.pf-m-border-row { |
| 1370 |
height: var(--#{$table}--border-width--base); |
| 1371 |
background-color: var(--#{$table}--BorderColor); |
| 1372 |
} |
| 1373 |
} |
| 1374 |
|
| 1375 |
// - Table tfoot |
| 1376 |
.#{$table}__tfoot { |
| 1377 |
--#{$table}__tr--BorderBlockEndWidth: 0; |
| 1378 |
|
| 1379 |
vertical-align: top; |
| 1380 |
} |
| 1381 |
|
| 1382 |
// - Table icon inline |
| 1383 |
.#{$table}__icon-inline { |
| 1384 |
display: flex; |
| 1385 |
align-items: center; |
| 1386 |
|
| 1387 |
> :not(:last-child) { |
| 1388 |
margin-inline-end: var(--#{$table}__icon-inline--MarginInlineEnd); |
| 1389 |
} |
| 1390 |
} |
| 1391 |
|
| 1392 |
// - Table width |
| 1393 |
// stylelint-disable |
| 1394 |
.#{$table} .pf-m-width-10 { |
| 1395 |
--#{$table}--cell--Width: 10%; |
| 1396 |
} |
| 1397 |
|
| 1398 |
.#{$table} .pf-m-width-15 { |
| 1399 |
--#{$table}--cell--Width: 15%; |
| 1400 |
} |
| 1401 |
|
| 1402 |
.#{$table} .pf-m-width-20 { |
| 1403 |
--#{$table}--cell--Width: 20%; |
| 1404 |
} |
| 1405 |
|
| 1406 |
.#{$table} .pf-m-width-25 { |
| 1407 |
--#{$table}--cell--Width: 25%; |
| 1408 |
} |
| 1409 |
|
| 1410 |
.#{$table} .pf-m-width-30 { |
| 1411 |
--#{$table}--cell--Width: 30%; |
| 1412 |
} |
| 1413 |
|
| 1414 |
.#{$table} .pf-m-width-35 { |
| 1415 |
--#{$table}--cell--Width: 35%; |
| 1416 |
} |
| 1417 |
|
| 1418 |
.#{$table} .pf-m-width-40 { |
| 1419 |
--#{$table}--cell--Width: 40%; |
| 1420 |
} |
| 1421 |
|
| 1422 |
.#{$table} .pf-m-width-45 { |
| 1423 |
--#{$table}--cell--Width: 45%; |
| 1424 |
} |
| 1425 |
|
| 1426 |
.#{$table} .pf-m-width-50 { |
| 1427 |
--#{$table}--cell--Width: 50%; |
| 1428 |
} |
| 1429 |
|
| 1430 |
.#{$table} .pf-m-width-60 { |
| 1431 |
--#{$table}--cell--Width: 60%; |
| 1432 |
} |
| 1433 |
|
| 1434 |
.#{$table} .pf-m-width-70 { |
| 1435 |
--#{$table}--cell--Width: 70%; |
| 1436 |
} |
| 1437 |
|
| 1438 |
.#{$table} .pf-m-width-80 { |
| 1439 |
--#{$table}--cell--Width: 80%; |
| 1440 |
} |
| 1441 |
|
| 1442 |
.#{$table} .pf-m-width-90 { |
| 1443 |
--#{$table}--cell--Width: 90%; |
| 1444 |
} |
| 1445 |
|
| 1446 |
.#{$table} .pf-m-width-100 { |
| 1447 |
--#{$table}--cell--Width: 100%; |
| 1448 |
} |
| 1449 |
// stylelint-enable |