|
30 | 30 | } |
31 | 31 |
|
32 | 32 | .quick-add-modal__content { |
| 33 | + --modal-height-offset: 3.2rem; |
33 | 34 | position: absolute; |
34 | 35 | top: 0; |
35 | 36 | left: 50%; |
36 | 37 | transform: translateX(-50%); |
37 | | - margin: 3.2rem auto 0; |
| 38 | + margin: var(--modal-height-offset) auto 0; |
38 | 39 | width: 100%; |
39 | 40 | background-color: rgb(var(--color-background)); |
40 | 41 | overflow: hidden; |
|
44 | 45 |
|
45 | 46 | @media screen and (min-width: 750px) { |
46 | 47 | .quick-add-modal__content { |
47 | | - margin-top: 10rem; |
| 48 | + --modal-height-offset: 10rem; |
| 49 | + margin-top: var(--modal-height-offset); |
48 | 50 | width: 80%; |
49 | | - max-height: calc(100% - 20rem); |
| 51 | + max-height: calc(100% - var(--modal-height-offset) * 2); |
50 | 52 | overflow-y: auto; |
51 | 53 | } |
52 | 54 |
|
|
67 | 69 | } |
68 | 70 |
|
69 | 71 | .quick-add-modal__content-info { |
| 72 | + --modal-padding: 2.5rem; |
70 | 73 | padding-right: 4.4rem; |
71 | 74 | display: flex; |
72 | 75 | overflow-y: auto; |
73 | | - padding: 2.5rem; |
| 76 | + padding: var(--modal-padding); |
74 | 77 | height: 100%; |
75 | 78 | } |
76 | 79 |
|
|
88 | 91 | } |
89 | 92 |
|
90 | 93 | .quick-add-modal__content { |
91 | | - bottom: 3.2rem; |
| 94 | + bottom: var(--modal-height-offset); |
92 | 95 | } |
93 | 96 |
|
94 | 97 | .quick-add-modal__content-info > * { |
@@ -210,7 +213,12 @@ quick-add-modal .product-form__buttons { |
210 | 213 | box-sizing: border-box; |
211 | 214 | } |
212 | 215 |
|
213 | | -quick-add-modal .product-media-container.constrain-height .media { |
214 | | - /* constrain behavior tbd, negate constrain effects on quick add modal for now */ |
215 | | - padding-top: var(--ratio-percent); |
| 216 | +quick-add-modal .product-media-container.constrain-height { |
| 217 | + --viewport-offset: calc((var(--modal-height-offset) + var(--modal-padding) + var(--popup-border-width)) * 2); |
| 218 | +} |
| 219 | + |
| 220 | +@media screen and (min-width: 750px) { |
| 221 | + quick-add-modal .product-media-container.constrain-height { |
| 222 | + --constrained-min-height: 400px; |
| 223 | + } |
216 | 224 | } |
0 commit comments