| 1 |
@use '../../sass-utilities' as *; |
| 2 |
|
| 3 |
@include pf-root($tile) { |
| 4 |
--#{$tile}--PaddingBlockStart: var(--pf-t--global--spacer--lg); |
| 5 |
--#{$tile}--PaddingInlineEnd: var(--pf-t--global--spacer--lg); |
| 6 |
--#{$tile}--PaddingBlockEnd: var(--pf-t--global--spacer--lg); |
| 7 |
--#{$tile}--PaddingInlineStart: var(--pf-t--global--spacer--lg); |
| 8 |
--#{$tile}--BackgroundColor: var(--pf-t--global--background--color--primary--default); |
| 9 |
--#{$tile}--BorderRadius: var(--pf-t--global--border--radius--medium); |
| 10 |
|
| 11 |
// borders |
| 12 |
--#{$tile}--before--BorderColor: var(--pf-t--global--border--color--default); |
| 13 |
--#{$tile}--before--BorderWidth: var(--pf-t--global--border--width--box--default); |
| 14 |
--#{$tile}--before--BorderRadius: var(--#{$tile}--BorderRadius); |
| 15 |
--#{$tile}--after--BackgroundColor: transparent; |
| 16 |
|
| 17 |
// icon |
| 18 |
--#{$tile}__icon--MarginInlineEnd: var(--pf-t--global--spacer--sm); |
| 19 |
--#{$tile}__icon--FontSize: var(--pf-t--global--icon--size--font--body--default); |
| 20 |
--#{$tile}__icon--Color: var(--pf-t--global--icon--color--regular); |
| 21 |
|
| 22 |
// title |
| 23 |
--#{$tile}__title--Color: var(--pf-t--global--text--color--regular); |
| 24 |
--#{$tile}__title--FontWeight: var(--pf-t--global--font--weight--body--bold); |
| 25 |
|
| 26 |
// body |
| 27 |
--#{$tile}__body--Color: var(--pf-t--global--text--color--regular); |
| 28 |
--#{$tile}__body--FontSize: var(--pf-t--global--font--size--body--sm); |
| 29 |
|
| 30 |
// hover |
| 31 |
--#{$tile}--hover--before--BorderColor: var(--pf-t--global--border--color--hover); |
| 32 |
|
| 33 |
// selected |
| 34 |
--#{$tile}--m-selected--before--BorderColor: var(--pf-t--global--border--color--clicked); |
| 35 |
--#{$tile}--m-selected--before--BorderWidth: var(--pf-t--global--border--width--box--clicked); |
| 36 |
|
| 37 |
// disabled |
| 38 |
--#{$tile}--m-disabled--BackgroundColor: var(--pf-t--global--background--color--disabled--default); |
| 39 |
--#{$tile}--m-disabled__title--Color: var(--pf-t--global--text--color--on-disabled); |
| 40 |
--#{$tile}--m-disabled__icon--Color: var(--pf-t--global--icon--color--on-disabled); |
| 41 |
--#{$tile}--m-disabled__body--Color: var(--pf-t--global--text--color--on-disabled); |
| 42 |
|
| 43 |
// Stacked variatiion |
| 44 |
--#{$tile}__header--m-stacked__icon--MarginBlockEnd: var(--pf-t--global--spacer--md); |
| 45 |
--#{$tile}__header--m-stacked__icon--FontSize: var(--pf-t--global--icon--size--xl); |
| 46 |
|
| 47 |
// large variation |
| 48 |
--#{$tile}--m-display-lg__header--m-stacked__icon--FontSize: var(--pf-t--global--icon--size--2xl); |
| 49 |
} |
| 50 |
|
| 51 |
.#{$tile} { |
| 52 |
position: relative; |
| 53 |
display: inline-grid; |
| 54 |
grid-template-rows: min-content; |
| 55 |
padding-block-start: var(--#{$tile}--PaddingBlockStart); |
| 56 |
padding-block-end: var(--#{$tile}--PaddingBlockEnd); |
| 57 |
padding-inline-start: var(--#{$tile}--PaddingInlineStart); |
| 58 |
padding-inline-end: var(--#{$tile}--PaddingInlineEnd); |
| 59 |
cursor: pointer; |
| 60 |
background-color: var(--#{$tile}--BackgroundColor); |
| 61 |
border-radius: var(--#{$tile}--BorderRadius); |
| 62 |
|
| 63 |
&::before, |
| 64 |
&::after { |
| 65 |
position: absolute; |
| 66 |
pointer-events: none; |
| 67 |
content: ""; |
| 68 |
} |
| 69 |
|
| 70 |
&::before { |
| 71 |
inset: 0; |
| 72 |
border: var(--#{$tile}--before--BorderWidth) solid var(--#{$tile}--before--BorderColor); |
| 73 |
border-radius: var(--#{$tile}--before--BorderRadius); |
| 74 |
} |
| 75 |
|
| 76 |
&:hover { |
| 77 |
--#{$tile}--before--BorderColor: var(--#{$tile}--hover--before--BorderColor); |
| 78 |
} |
| 79 |
|
| 80 |
&.pf-m-selected { |
| 81 |
--#{$tile}--before--BorderColor: var(--#{$tile}--m-selected--before--BorderColor); |
| 82 |
--#{$tile}--before--BorderWidth: var(--#{$tile}--m-selected--before--BorderWidth); |
| 83 |
} |
| 84 |
|
| 85 |
&.pf-m-disabled { |
| 86 |
--#{$tile}--BackgroundColor: var(--#{$tile}--m-disabled--BackgroundColor); |
| 87 |
--#{$tile}__title--Color: var(--#{$tile}--m-disabled__title--Color); |
| 88 |
--#{$tile}__icon--Color: var(--#{$tile}--m-disabled__icon--Color); |
| 89 |
--#{$tile}__body--Color: var(--#{$tile}--m-disabled__body--Color); |
| 90 |
--#{$tile}--before--BorderWidth: 0; |
| 91 |
|
| 92 |
pointer-events: none; |
| 93 |
} |
| 94 |
|
| 95 |
&.pf-m-display-lg { |
| 96 |
.#{$tile}__header.pf-m-stacked { |
| 97 |
--#{$tile}__icon--FontSize: var(--#{$tile}--m-display-lg__header--m-stacked__icon--FontSize); |
| 98 |
} |
| 99 |
} |
| 100 |
} |
| 101 |
|
| 102 |
.#{$tile}__header { |
| 103 |
display: flex; |
| 104 |
align-items: center; |
| 105 |
|
| 106 |
&.pf-m-stacked { |
| 107 |
--#{$tile}__icon--MarginInlineEnd: 0; |
| 108 |
--#{$tile}__icon--FontSize: var(--#{$tile}__header--m-stacked__icon--FontSize); |
| 109 |
|
| 110 |
flex-direction: column; |
| 111 |
align-items: flex-start; |
| 112 |
|
| 113 |
.#{$tile}__icon { |
| 114 |
display: flex; |
| 115 |
align-items: center; |
| 116 |
margin-block-end: var(--#{$tile}__header--m-stacked__icon--MarginBlockEnd); |
| 117 |
} |
| 118 |
} |
| 119 |
} |
| 120 |
|
| 121 |
.#{$tile}__title { |
| 122 |
font-weight: var(--#{$tile}__title--FontWeight); |
| 123 |
color: var(--#{$tile}__title--Color); |
| 124 |
} |
| 125 |
|
| 126 |
.#{$tile}__body { |
| 127 |
font-size: var(--#{$tile}__body--FontSize); |
| 128 |
color: var(--#{$tile}__body--Color); |
| 129 |
} |
| 130 |
|
| 131 |
.#{$tile}__icon { |
| 132 |
margin-inline-end: var(--#{$tile}__icon--MarginInlineEnd); |
| 133 |
font-size: var(--#{$tile}__icon--FontSize); |
| 134 |
color: var(--#{$tile}__icon--Color); |
| 135 |
} |
| 136 |
|