| 1 |
/* |
| 2 |
* Styles for the <givewp-donation-form> element on non-WordPress pages. |
| 3 |
* Compiled to a string (see the ?inline rule in webpack.config.js) and |
| 4 |
* injected by index.ts, so the embed looks the same as the WordPress block |
| 5 |
* without a separate stylesheet request. |
| 6 |
*/ |
| 7 |
@import '@givewp/src/DonationForms/Blocks/DonationFormBlock/resources/styles/launcher'; |
| 8 |
@import '@givewp/src/Campaigns/Blocks/shared/components/ModalForm/styles'; |
| 9 |
/* The form skeleton the script data carries when the script URL names the form. */ |
| 10 |
@import '@givewp/src/DonationForms/resources/styles/skeleton'; |
| 11 |
|
| 12 |
givewp-donation-form { |
| 13 |
display: block; |
| 14 |
/* The on-page iframe is absolutely positioned until it is revealed. */ |
| 15 |
position: relative; |
| 16 |
} |
| 17 |
|
| 18 |
/* |
| 19 |
* Host pages stack their own chrome at arbitrary z-indexes; the block's |
| 20 |
* values assume a WordPress theme. |
| 21 |
*/ |
| 22 |
.givewp-donation-form-modal__overlay { |
| 23 |
z-index: 2147483646; |
| 24 |
} |
| 25 |
|
| 26 |
.givewp-donation-form-modal__close { |
| 27 |
z-index: 2147483647; |
| 28 |
} |
| 29 |
|
| 30 |
.givewp-embed { |
| 31 |
&__loading { |
| 32 |
display: flex; |
| 33 |
align-items: center; |
| 34 |
justify-content: center; |
| 35 |
min-height: 20rem; |
| 36 |
} |
| 37 |
|
| 38 |
/* A skeleton sits in flow and sets the height itself; its container queries resolve here. */ |
| 39 |
&__loading--skeleton { |
| 40 |
display: block; |
| 41 |
min-height: 0; |
| 42 |
container-type: inline-size; |
| 43 |
} |
| 44 |
|
| 45 |
&__spinner { |
| 46 |
width: 2.5rem; |
| 47 |
height: 2.5rem; |
| 48 |
border-radius: 50%; |
| 49 |
border: 3px solid rgba(0, 0, 0, 0.12); |
| 50 |
border-top-color: rgba(0, 0, 0, 0.55); |
| 51 |
animation: givewp-embed-spin 0.8s linear infinite; |
| 52 |
} |
| 53 |
|
| 54 |
&__focus-guard { |
| 55 |
position: absolute; |
| 56 |
width: 1px; |
| 57 |
height: 1px; |
| 58 |
overflow: hidden; |
| 59 |
clip: rect(0 0 0 0); |
| 60 |
} |
| 61 |
} |
| 62 |
|
| 63 |
@keyframes givewp-embed-spin { |
| 64 |
to { |
| 65 |
transform: rotate(360deg); |
| 66 |
} |
| 67 |
} |
| 68 |
|