| 1 |
/* |
| 2 |
* The form skeleton drawn by RenderFormSkeleton (PHP). Compiled to build/donationFormSkeletonCss.css |
| 3 |
* and inlined next to the markup, in the block's output and inside the form view, so the sketch |
| 4 |
* paints before any enqueued stylesheet arrives. Host pages do not load the design system |
| 5 |
* foundation stylesheet, so every value here is self-contained. |
| 6 |
* |
| 7 |
* Hand-copied from the core form designs: the 0.5rem radius, the header band, the section padding |
| 8 |
* clamp and the 51.5rem classic width. Container units stand in for the vw the real designs use, |
| 9 |
* because the form's viewport is the iframe, which is this box. Everything is neutral grey, even |
| 10 |
* where the real form is colored, so the sketch reads as a placeholder and not as content. |
| 11 |
*/ |
| 12 |
.givewp-embed-skeleton { |
| 13 |
--givewp-skeleton-bar: rgba(0, 0, 0, 0.08); |
| 14 |
--givewp-skeleton-shine: rgba(255, 255, 255, 0.5); |
| 15 |
--givewp-skeleton-radius: 0.5rem; |
| 16 |
--givewp-skeleton-padding: clamp(1.5rem, 4vw, 5rem); |
| 17 |
|
| 18 |
/* A cqi value inside a custom property is invalid at use time without support, so it is gated. */ |
| 19 |
@supports (padding: 1cqi) { |
| 20 |
--givewp-skeleton-padding: clamp(1.5rem, 7cqi, 5rem); |
| 21 |
} |
| 22 |
width: 100%; |
| 23 |
max-width: 51.5rem; |
| 24 |
margin: 0 auto; |
| 25 |
|
| 26 |
&__bar { |
| 27 |
display: block; |
| 28 |
border-radius: 0.25rem; |
| 29 |
background-color: var(--givewp-skeleton-bar); |
| 30 |
background-image: linear-gradient(90deg, transparent, var(--givewp-skeleton-shine), transparent); |
| 31 |
background-size: 200% 100%; |
| 32 |
animation: givewp-embed-skeleton-shine 1.4s ease-in-out infinite; |
| 33 |
} |
| 34 |
|
| 35 |
&__header { |
| 36 |
display: flex; |
| 37 |
flex-direction: column; |
| 38 |
align-items: center; |
| 39 |
gap: 1rem; |
| 40 |
padding: var(--givewp-skeleton-padding); |
| 41 |
border-radius: var(--givewp-skeleton-radius); |
| 42 |
background-color: rgba(0, 0, 0, 0.04); |
| 43 |
} |
| 44 |
|
| 45 |
&__form { |
| 46 |
display: flex; |
| 47 |
flex-direction: column; |
| 48 |
border-radius: var(--givewp-skeleton-radius); |
| 49 |
background-color: #fff; |
| 50 |
border: 1px solid rgba(0, 0, 0, 0.08); |
| 51 |
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); |
| 52 |
} |
| 53 |
|
| 54 |
&__section { |
| 55 |
display: flex; |
| 56 |
flex-direction: column; |
| 57 |
gap: 1.75rem; |
| 58 |
padding: var(--givewp-skeleton-padding); |
| 59 |
|
| 60 |
&:last-child { |
| 61 |
padding-top: 0; |
| 62 |
} |
| 63 |
} |
| 64 |
|
| 65 |
&__section-header { |
| 66 |
display: flex; |
| 67 |
flex-direction: column; |
| 68 |
gap: 0.75rem; |
| 69 |
} |
| 70 |
|
| 71 |
&__field { |
| 72 |
display: flex; |
| 73 |
flex-direction: column; |
| 74 |
gap: 0.5rem; |
| 75 |
} |
| 76 |
|
| 77 |
&__image { |
| 78 |
width: 100%; |
| 79 |
height: 12rem; |
| 80 |
border-radius: var(--givewp-skeleton-radius); |
| 81 |
} |
| 82 |
|
| 83 |
&__title { |
| 84 |
width: 60%; |
| 85 |
height: 2rem; |
| 86 |
} |
| 87 |
|
| 88 |
&__heading { |
| 89 |
width: 45%; |
| 90 |
height: 1.5rem; |
| 91 |
} |
| 92 |
|
| 93 |
&__panel { |
| 94 |
width: 100%; |
| 95 |
height: 14rem; |
| 96 |
border-radius: var(--givewp-skeleton-radius); |
| 97 |
|
| 98 |
&--tall { |
| 99 |
height: 15rem; |
| 100 |
} |
| 101 |
} |
| 102 |
|
| 103 |
&__line { |
| 104 |
width: 90%; |
| 105 |
height: 1rem; |
| 106 |
|
| 107 |
&--short { |
| 108 |
width: 55%; |
| 109 |
} |
| 110 |
} |
| 111 |
|
| 112 |
&__goal { |
| 113 |
width: 100%; |
| 114 |
height: 4rem; |
| 115 |
border-radius: var(--givewp-skeleton-radius); |
| 116 |
} |
| 117 |
|
| 118 |
&__label { |
| 119 |
width: 35%; |
| 120 |
height: 1rem; |
| 121 |
} |
| 122 |
|
| 123 |
&__input { |
| 124 |
width: 100%; |
| 125 |
height: 3.5rem; |
| 126 |
|
| 127 |
&--tall { |
| 128 |
height: 4.5rem; |
| 129 |
} |
| 130 |
} |
| 131 |
|
| 132 |
/* |
| 133 |
* The real levels grid is one column under the form's 576px breakpoint and three above. The |
| 134 |
* media query is the fallback for browsers without container queries; the container query |
| 135 |
* comes later so it wins where supported. |
| 136 |
*/ |
| 137 |
&__levels { |
| 138 |
display: grid; |
| 139 |
grid-template-columns: 1fr; |
| 140 |
gap: 0.5rem; |
| 141 |
|
| 142 |
@media (min-width: 36rem) { |
| 143 |
grid-template-columns: repeat(3, 1fr); |
| 144 |
} |
| 145 |
|
| 146 |
@container (max-width: 36rem) { |
| 147 |
grid-template-columns: 1fr; |
| 148 |
} |
| 149 |
|
| 150 |
@container (min-width: 36rem) { |
| 151 |
grid-template-columns: repeat(3, 1fr); |
| 152 |
} |
| 153 |
} |
| 154 |
|
| 155 |
&__level { |
| 156 |
height: 3rem; |
| 157 |
} |
| 158 |
|
| 159 |
&__field--gateways { |
| 160 |
gap: 1rem; |
| 161 |
} |
| 162 |
|
| 163 |
&__button { |
| 164 |
width: 100%; |
| 165 |
height: 4rem; |
| 166 |
background-color: rgba(0, 0, 0, 0.14); |
| 167 |
} |
| 168 |
|
| 169 |
&--classic &__header { |
| 170 |
border-bottom-left-radius: 0; |
| 171 |
border-bottom-right-radius: 0; |
| 172 |
} |
| 173 |
|
| 174 |
&--classic &__header + &__form { |
| 175 |
border-top-left-radius: 0; |
| 176 |
border-top-right-radius: 0; |
| 177 |
} |
| 178 |
|
| 179 |
/* Multi-step: a 35rem card, a 50px step title bar with a progress line, 2rem body padding. */ |
| 180 |
&__step { |
| 181 |
--givewp-skeleton-padding: 2rem; |
| 182 |
|
| 183 |
max-width: 35rem; |
| 184 |
margin: 0 auto; |
| 185 |
width: 100%; |
| 186 |
} |
| 187 |
|
| 188 |
&__step-header { |
| 189 |
display: flex; |
| 190 |
flex-direction: column; |
| 191 |
align-items: center; |
| 192 |
justify-content: center; |
| 193 |
gap: 0.75rem; |
| 194 |
height: 3.625rem; |
| 195 |
margin-bottom: 1.5rem; |
| 196 |
border-bottom: 0.5rem solid rgba(0, 0, 0, 0.08); |
| 197 |
} |
| 198 |
|
| 199 |
&__step-title { |
| 200 |
width: 60%; |
| 201 |
height: 1.25rem; |
| 202 |
} |
| 203 |
|
| 204 |
&__secure { |
| 205 |
width: 10rem; |
| 206 |
height: 1.25rem; |
| 207 |
margin: 0 auto 1.5rem; |
| 208 |
} |
| 209 |
|
| 210 |
&--multi-step &__form &__header { |
| 211 |
background-color: transparent; |
| 212 |
|
| 213 |
+ .givewp-embed-skeleton__section { |
| 214 |
padding-top: 0; |
| 215 |
} |
| 216 |
} |
| 217 |
|
| 218 |
&--two-panel { |
| 219 |
display: flex; |
| 220 |
align-items: flex-start; |
| 221 |
gap: 0.5rem; |
| 222 |
max-width: 78rem; |
| 223 |
|
| 224 |
.givewp-embed-skeleton__header { |
| 225 |
flex: 1 1 42.5rem; |
| 226 |
background-color: transparent; |
| 227 |
} |
| 228 |
|
| 229 |
.givewp-embed-skeleton__form { |
| 230 |
flex: 1 1 35.5rem; |
| 231 |
max-width: none; |
| 232 |
} |
| 233 |
|
| 234 |
@media (max-width: 53.5rem) { |
| 235 |
flex-direction: column; |
| 236 |
gap: 0; |
| 237 |
max-width: 35rem; |
| 238 |
|
| 239 |
.givewp-embed-skeleton__header, |
| 240 |
.givewp-embed-skeleton__form { |
| 241 |
flex-basis: auto; |
| 242 |
width: 100%; |
| 243 |
} |
| 244 |
} |
| 245 |
|
| 246 |
@container (max-width: 53.5rem) { |
| 247 |
flex-direction: column; |
| 248 |
gap: 0; |
| 249 |
max-width: 35rem; |
| 250 |
|
| 251 |
.givewp-embed-skeleton__header, |
| 252 |
.givewp-embed-skeleton__form { |
| 253 |
flex-basis: auto; |
| 254 |
width: 100%; |
| 255 |
} |
| 256 |
} |
| 257 |
} |
| 258 |
} |
| 259 |
|
| 260 |
@keyframes givewp-embed-skeleton-shine { |
| 261 |
from { |
| 262 |
background-position: 200% 0; |
| 263 |
} |
| 264 |
|
| 265 |
to { |
| 266 |
background-position: -200% 0; |
| 267 |
} |
| 268 |
} |
| 269 |
|
| 270 |
@media (prefers-reduced-motion: reduce) { |
| 271 |
.givewp-embed-skeleton__bar { |
| 272 |
animation: none; |
| 273 |
} |
| 274 |
} |
| 275 |
|