| 1 |
@use '../../sass-utilities' as *; |
| 2 |
|
| 3 |
@include pf-root($about-modal-box) { |
| 4 |
// Component variables |
| 5 |
--#{$about-modal-box}--BackgroundImage: none; |
| 6 |
--#{$about-modal-box}--BackgroundColor: var(--pf-t--global--background--color--floating--default); |
| 7 |
--#{$about-modal-box}--BackgroundSize--min-width: 200px; |
| 8 |
--#{$about-modal-box}--BackgroundSize--width: 60%; |
| 9 |
--#{$about-modal-box}--BackgroundSize--max-width: 600px; |
| 10 |
--#{$about-modal-box}--BackgroundSize: clamp(var(--#{$about-modal-box}--BackgroundSize--min-width), var(--#{$about-modal-box}--BackgroundSize--width), var(--#{$about-modal-box}--BackgroundSize--max-width)); |
| 11 |
--#{$about-modal-box}--Height: 100%; |
| 12 |
--#{$about-modal-box}--lg--Height: #{pf-size-prem(762px)}; // Height is optimized for the exact height desired |
| 13 |
--#{$about-modal-box}--Width: 100%; |
| 14 |
--#{$about-modal-box}--sm--GridTemplateColumns: 5fr 1fr; |
| 15 |
--#{$about-modal-box}--lg--GridTemplateColumns: 1fr .6fr; |
| 16 |
|
| 17 |
// Brand |
| 18 |
--#{$about-modal-box}__brand--PaddingBlockStart: var(--pf-t--global--spacer--2xl); |
| 19 |
--#{$about-modal-box}__brand--PaddingInlineEnd: var(--pf-t--global--spacer--xl); |
| 20 |
--#{$about-modal-box}__brand--PaddingInlineStart: var(--pf-t--global--spacer--xl); |
| 21 |
--#{$about-modal-box}__brand--PaddingBlockEnd: var(--pf-t--global--spacer--xl); |
| 22 |
--#{$about-modal-box}__brand--sm--PaddingInlineEnd: var(--pf-t--global--spacer--3xl); |
| 23 |
--#{$about-modal-box}__brand--sm--PaddingInlineStart: var(--pf-t--global--spacer--3xl); |
| 24 |
--#{$about-modal-box}__brand--sm--PaddingBlockEnd: var(--pf-t--global--spacer--3xl); |
| 25 |
|
| 26 |
@media screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 27 |
--#{$about-modal-box}__brand--PaddingInlineEnd: var(--#{$about-modal-box}__brand--sm--PaddingInlineEnd); |
| 28 |
--#{$about-modal-box}__brand--PaddingInlineStart: var(--#{$about-modal-box}__brand--sm--PaddingInlineStart); |
| 29 |
--#{$about-modal-box}__brand--PaddingBlockEnd: var(--#{$about-modal-box}__brand--sm--PaddingBlockEnd); |
| 30 |
} |
| 31 |
|
| 32 |
// Close |
| 33 |
--#{$about-modal-box}__close--ZIndex: var(--pf-t--global--z-index--2xl); |
| 34 |
--#{$about-modal-box}__close--PaddingBlockStart: var(--pf-t--global--spacer--2xl); |
| 35 |
--#{$about-modal-box}__close--PaddingInlineEnd: var(--pf-t--global--spacer--xl); |
| 36 |
--#{$about-modal-box}__close--PaddingBlockEnd: var(--pf-t--global--spacer--xl); |
| 37 |
--#{$about-modal-box}__close--sm--PaddingBlockEnd: var(--pf-t--global--spacer--3xl); |
| 38 |
--#{$about-modal-box}__close--lg--PaddingInlineEnd: var(--pf-t--global--spacer--3xl); |
| 39 |
|
| 40 |
@media only screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 41 |
--#{$about-modal-box}__close--PaddingBlockEnd: var(--#{$about-modal-box}__close--sm--PaddingBlockEnd); |
| 42 |
} |
| 43 |
|
| 44 |
@media only screen and (min-width: $pf-v6-global--breakpoint--lg) { |
| 45 |
--#{$about-modal-box}__close--PaddingInlineEnd: var(--#{$about-modal-box}__close--lg--PaddingInlineEnd); |
| 46 |
} |
| 47 |
|
| 48 |
// Close Button |
| 49 |
--#{$about-modal-box}__close--c-button--FontSize: var(--pf-t--global--icon--size--lg); |
| 50 |
|
| 51 |
// Brand img |
| 52 |
--#{$about-modal-box}__brand-image--Height: #{pf-size-prem(37px)}; |
| 53 |
|
| 54 |
// Header |
| 55 |
--#{$about-modal-box}__header--PaddingInlineEnd: var(--pf-t--global--spacer--xl); |
| 56 |
--#{$about-modal-box}__header--PaddingBlockEnd: var(--pf-t--global--spacer--sm); |
| 57 |
--#{$about-modal-box}__header--PaddingInlineStart: var(--pf-t--global--spacer--xl); |
| 58 |
--#{$about-modal-box}__header--sm--PaddingInlineEnd: var(--pf-t--global--spacer--3xl); |
| 59 |
--#{$about-modal-box}__header--sm--PaddingInlineStart: var(--pf-t--global--spacer--3xl); |
| 60 |
|
| 61 |
@media only screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 62 |
--#{$about-modal-box}__header--PaddingInlineEnd: var(--#{$about-modal-box}__header--sm--PaddingInlineEnd); |
| 63 |
--#{$about-modal-box}__header--PaddingInlineStart: var(--#{$about-modal-box}__header--sm--PaddingInlineStart); |
| 64 |
} |
| 65 |
|
| 66 |
// Strapline |
| 67 |
--#{$about-modal-box}__strapline--PaddingBlockStart: var(--pf-t--global--spacer--xl); |
| 68 |
--#{$about-modal-box}__strapline--FontSize: var(--pf-t--global--font--size--body--sm); |
| 69 |
--#{$about-modal-box}__strapline--Color: var(--pf-t--global--text--color--subtle); |
| 70 |
--#{$about-modal-box}__strapline--sm--PaddingBlockStart: var(--pf-t--global--spacer--2xl); |
| 71 |
|
| 72 |
@media only screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 73 |
--#{$about-modal-box}__strapline--PaddingBlockStart: var(--#{$about-modal-box}__strapline--sm--PaddingBlockStart); |
| 74 |
} |
| 75 |
|
| 76 |
// Content |
| 77 |
--#{$about-modal-box}__content--MarginBlockStart: var(--pf-t--global--spacer--xl); |
| 78 |
--#{$about-modal-box}__content--MarginInlineEnd: var(--pf-t--global--spacer--xl); |
| 79 |
--#{$about-modal-box}__content--MarginBlockEnd: var(--pf-t--global--spacer--xl); |
| 80 |
--#{$about-modal-box}__content--MarginInlineStart: var(--pf-t--global--spacer--xl); |
| 81 |
--#{$about-modal-box}__content--sm--MarginBlockStart: var(--pf-t--global--spacer--2xl); |
| 82 |
--#{$about-modal-box}__content--sm--MarginInlineEnd: var(--pf-t--global--spacer--3xl); |
| 83 |
--#{$about-modal-box}__content--sm--MarginBlockEnd: var(--pf-t--global--spacer--2xl); |
| 84 |
--#{$about-modal-box}__content--sm--MarginInlineStart: var(--pf-t--global--spacer--3xl); |
| 85 |
|
| 86 |
@media only screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 87 |
--#{$about-modal-box}__content--MarginBlockStart: var(--#{$about-modal-box}__content--sm--MarginBlockStart); |
| 88 |
--#{$about-modal-box}__content--MarginInlineEnd: var(--#{$about-modal-box}__content--sm--MarginInlineEnd); |
| 89 |
--#{$about-modal-box}__content--MarginBlockEnd: var(--#{$about-modal-box}__content--sm--MarginBlockEnd); |
| 90 |
--#{$about-modal-box}__content--MarginInlineStart: var(--#{$about-modal-box}__content--sm--MarginInlineStart); |
| 91 |
} |
| 92 |
} |
| 93 |
|
| 94 |
.#{$about-modal-box} { |
| 95 |
position: relative; |
| 96 |
display: grid; |
| 97 |
grid-template-areas: |
| 98 |
"brand close" |
| 99 |
"header header" |
| 100 |
"content content"; |
| 101 |
grid-template-rows: max-content max-content auto; |
| 102 |
width: var(--#{$about-modal-box}--Width); |
| 103 |
height: var(--#{$about-modal-box}--Height); |
| 104 |
overflow-x: hidden; |
| 105 |
overflow-y: auto; |
| 106 |
background-color: var(--#{$about-modal-box}--BackgroundColor); |
| 107 |
background-image: var(--#{$about-modal-box}--BackgroundImage); |
| 108 |
background-repeat: no-repeat; |
| 109 |
background-position: var(--#{$about-modal-box}--BackgroundPosition); |
| 110 |
background-size: var(--#{$about-modal-box}--BackgroundSize); |
| 111 |
|
| 112 |
@media only screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 113 |
grid-template-areas: |
| 114 |
"brand close" |
| 115 |
"header close" |
| 116 |
"content close"; |
| 117 |
grid-template-columns: var(--#{$about-modal-box}--sm--GridTemplateColumns); |
| 118 |
} |
| 119 |
|
| 120 |
@media only screen and (min-width: $pf-v6-global--breakpoint--lg) { |
| 121 |
--#{$about-modal-box}--Height: var(--#{$about-modal-box}--lg--Height); |
| 122 |
--#{$about-modal-box}--Width: var(--#{$about-modal-box}--lg--Width); |
| 123 |
|
| 124 |
grid-template-rows: max-content max-content auto; |
| 125 |
grid-template-columns: var(--#{$about-modal-box}--lg--GridTemplateColumns); |
| 126 |
} |
| 127 |
|
| 128 |
@include pf-v6-bidirectional-style ( |
| 129 |
$prop: --#{$about-modal-box}--BackgroundPosition, |
| 130 |
$ltr-val: bottom right, |
| 131 |
$rtl-val: bottom left |
| 132 |
); |
| 133 |
} |
| 134 |
|
| 135 |
// Brand |
| 136 |
.#{$about-modal-box}__brand { |
| 137 |
display: flex; |
| 138 |
grid-area: brand; |
| 139 |
padding-block-start: var(--#{$about-modal-box}__brand--PaddingBlockStart); |
| 140 |
padding-block-end: var(--#{$about-modal-box}__brand--PaddingBlockEnd); |
| 141 |
padding-inline-start: var(--#{$about-modal-box}__brand--PaddingInlineStart); |
| 142 |
padding-inline-end: var(--#{$about-modal-box}__brand--PaddingInlineEnd); |
| 143 |
} |
| 144 |
|
| 145 |
.#{$about-modal-box}__brand-image { |
| 146 |
height: var(--#{$about-modal-box}__brand-image--Height); |
| 147 |
} |
| 148 |
|
| 149 |
// Header |
| 150 |
.#{$about-modal-box}__header { |
| 151 |
display: flex; |
| 152 |
flex-direction: column; |
| 153 |
grid-area: header; |
| 154 |
padding-block-end: var(--#{$about-modal-box}__header--PaddingBlockEnd); |
| 155 |
padding-inline-start: var(--#{$about-modal-box}__header--PaddingInlineStart); |
| 156 |
padding-inline-end: var(--#{$about-modal-box}__header--PaddingInlineEnd); |
| 157 |
} |
| 158 |
|
| 159 |
// Strapline |
| 160 |
.#{$about-modal-box}__strapline { |
| 161 |
padding-block-start: var(--#{$about-modal-box}__strapline--PaddingBlockStart); |
| 162 |
margin-block-start: auto; |
| 163 |
font-size: var(--#{$about-modal-box}__strapline--FontSize); |
| 164 |
color: var(--#{$about-modal-box}__strapline--Color); |
| 165 |
} |
| 166 |
|
| 167 |
// Content |
| 168 |
.#{$about-modal-box}__content { |
| 169 |
display: flex; |
| 170 |
flex-direction: column; |
| 171 |
grid-area: content; |
| 172 |
margin-block-start: var(--#{$about-modal-box}__content--MarginBlockStart); |
| 173 |
margin-block-end: var(--#{$about-modal-box}__content--MarginBlockEnd); |
| 174 |
margin-inline-start: var(--#{$about-modal-box}__content--MarginInlineStart); // Using margin instead of padding to prevent scrollbar extending to top of content block |
| 175 |
margin-inline-end: var(--#{$about-modal-box}__content--MarginInlineEnd); |
| 176 |
overflow-x: hidden; |
| 177 |
overflow-y: auto; |
| 178 |
overscroll-behavior: contain; |
| 179 |
overflow-wrap: anywhere; |
| 180 |
-webkit-overflow-scrolling: touch; |
| 181 |
|
| 182 |
@media screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 183 |
overflow: visible; |
| 184 |
overscroll-behavior: auto; |
| 185 |
} |
| 186 |
} |
| 187 |
|
| 188 |
// Close |
| 189 |
.#{$about-modal-box}__close { |
| 190 |
position: sticky; |
| 191 |
inset-block-start: 0; |
| 192 |
display: flex; |
| 193 |
grid-area: close; |
| 194 |
align-items: flex-start; |
| 195 |
justify-content: flex-end; |
| 196 |
padding-block-start: var(--#{$about-modal-box}__close--PaddingBlockStart); |
| 197 |
padding-block-end: var(--#{$about-modal-box}__close--PaddingBlockEnd); |
| 198 |
padding-inline-end: var(--#{$about-modal-box}__close--PaddingInlineEnd); |
| 199 |
|
| 200 |
@media only screen and (min-width: $pf-v6-global--breakpoint--sm) { |
| 201 |
grid-area: 1 / 2; |
| 202 |
justify-content: center; |
| 203 |
} |
| 204 |
|
| 205 |
@media only screen and (min-width: $pf-v6-global--breakpoint--lg) { |
| 206 |
justify-content: flex-end; |
| 207 |
} |
| 208 |
|
| 209 |
// Close button |
| 210 |
// Since this btn is unique to the about modal, use contextual selectors in this specific instance |
| 211 |
.#{$button}.pf-m-plain { |
| 212 |
font-size: var(--#{$about-modal-box}__close--c-button--FontSize); |
| 213 |
} |
| 214 |
} |